forked from UTAP/APHTTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
44 lines (31 loc) · 2.39 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CC=g++
STD=-std=c++11 -Wall -pedantic
CF=$(STD)
BUILD_DIR=build
TEMPLATE_DIR=.template
all: $(BUILD_DIR) myserver.out
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(BUILD_DIR)/template_parser.o: utils/template_parser.cpp utils/template_parser.hpp utils/request.cpp utils/request.hpp utils/utilities.hpp utils/utilities.cpp
$(CC) $(CF) -c utils/template_parser.cpp -o $(BUILD_DIR)/template_parser.o
$(BUILD_DIR)/response.o: utils/response.cpp utils/response.hpp utils/include.hpp
$(CC) $(CF) -c utils/response.cpp -o $(BUILD_DIR)/response.o
$(BUILD_DIR)/request.o: utils/request.cpp utils/request.hpp utils/include.hpp utils/utilities.hpp
$(CC) $(CF) -c utils/request.cpp -o $(BUILD_DIR)/request.o
$(BUILD_DIR)/utilities.o: utils/utilities.cpp utils/utilities.hpp
$(CC) $(CF) -c utils/utilities.cpp -o $(BUILD_DIR)/utilities.o
$(BUILD_DIR)/server.o: server/server.cpp server/server.hpp server/route.hpp utils/utilities.hpp utils/response.hpp utils/request.hpp utils/include.hpp utils/template_parser.hpp utils/template_parser.cpp
$(CC) $(CF) -c server/server.cpp -o $(BUILD_DIR)/server.o
$(BUILD_DIR)/route.o: server/route.cpp server/route.hpp utils/utilities.hpp utils/response.hpp utils/request.hpp utils/include.hpp
$(CC) $(CF) -c server/route.cpp -o $(BUILD_DIR)/route.o
$(BUILD_DIR)/handlers.o: examples/handlers.cpp server/server.hpp utils/utilities.hpp utils/response.hpp utils/request.hpp utils/include.hpp
$(CC) $(CF) -c examples/handlers.cpp -o $(BUILD_DIR)/handlers.o
$(BUILD_DIR)/my_server.o: examples/my_server.cpp server/server.hpp utils/utilities.hpp utils/response.hpp utils/request.hpp utils/include.hpp
$(CC) $(CF) -c examples/my_server.cpp -o $(BUILD_DIR)/my_server.o
$(BUILD_DIR)/main.o: examples/main.cpp server/server.hpp utils/utilities.hpp utils/response.hpp utils/request.hpp utils/include.hpp
$(CC) $(CF) -c examples/main.cpp -o $(BUILD_DIR)/main.o
myserver.out: $(BUILD_DIR)/my_server.o $(BUILD_DIR)/main.o $(BUILD_DIR)/handlers.o $(BUILD_DIR)/response.o $(BUILD_DIR)/request.o $(BUILD_DIR)/utilities.o $(BUILD_DIR)/server.o $(BUILD_DIR)/route.o $(BUILD_DIR)/template_parser.o
$(CC) $(CF) $(BUILD_DIR)/my_server.o $(BUILD_DIR)/main.o $(BUILD_DIR)/handlers.o $(BUILD_DIR)/response.o $(BUILD_DIR)/request.o $(BUILD_DIR)/utilities.o $(BUILD_DIR)/server.o $(BUILD_DIR)/route.o $(BUILD_DIR)/template_parser.o -o myserver.out
.PHONY: clean
clean:
rm -rf $(BUILD_DIR) $(TEMPLATE_DIR) *.o *.out &> /dev/null