Adding src so far
This commit is contained in:
24
Makefile
Normal file
24
Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
CFLAGS = -std=c17
|
||||
CPPFLAGS = -std=c++17
|
||||
APPS_DIR = ./apps
|
||||
TARGETS_DIR = ./targets
|
||||
OBJECTS_DIR = ./build
|
||||
LIBS_DIR = ./src
|
||||
INCLUDES = -I ./include
|
||||
TESTS_DIR = ./tests
|
||||
VPATH = $(TARGETS_DIR) $(OBJECTS_DIR) $(APPS_DIR) $(LIBS_DIR) $(TESTS_DIR)
|
||||
|
||||
main: main.c requests.o
|
||||
cc $(CFLAGS) $(INCLUDES) -lcurl $(APPS_DIR)/main.c $(LIBS_DIR)/requests.c -o $(TARGETS_DIR)/main
|
||||
|
||||
requests.o: requests.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c $(LIBS_DIR)/requests.c -o $(OBJECTS_DIR)/requests.o
|
||||
|
||||
test: test_requests
|
||||
$(TARGETS_DIR)/test_requests
|
||||
|
||||
test_requests: test_requests.cpp requests.o
|
||||
$(CXX) $(CPPFLAGS) $(INCLUDES) -lcurl -lgtest -lgtest_main $(TESTS_DIR)/test_requests.cpp $(OBJECTS_DIR)/requests.o -o $(TARGETS_DIR)/test_requests
|
||||
|
||||
clean:
|
||||
rm $(TARGETS_DIR)/* $(OBJECTS_DIR)/*
|
||||
Reference in New Issue
Block a user