-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
71 lines (53 loc) · 1.32 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
NAME = Webserver
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
CXXFLAGS_EXTRA = -Wall -Wextra -Wshadow -std=c++98 -Wuninitialized -fsanitize=address,undefined
CXX = c++
OBJS = $(SRCS:%.cpp=%.o)
SRCS = main.cpp\
Request.cpp\
tools.cpp\
Response.cpp\
socket/TcpStream.cpp\
socket/kqueue.cpp\
socket/tcpListener.cpp\
socket/File.cpp\
parsing/location.cpp\
parsing/parser.cpp\
parsing/serverInfo.cpp\
parsing/tokengen.cpp\
SRCS_TEST = tests.cpp\
Request.cpp\
tools.cpp\
Response.cpp\
socket/TcpStream.cpp\
socket/kqueue.cpp\
socket/tcpListener.cpp\
parsing/location.cpp\
parsing/parser.cpp\
parsing/serverInfo.cpp\
parsing/tokengen.cpp\
HEADERS = socket/kqueue.hpp\
socket/tcpListener.hpp\
socket/TcpStream.hpp\
Request.hpp\
Response.hpp\
tools.hpp
all: $(NAME)
extra: $(SRCS) $(HEADERS)
c++ $(CXXFLAGS_EXTRA) $(SRCS) -o $(NAME)_extra && ./$(NAME)_extra config
debug: $(SRCS) $(HEADERS)
g++ -pg $(CXXFLAGS) $(SRCS) -o $(NAME)_debug
test: $(TEST) $(HEADERS)
c++ $(CXXFLAGS) $(SRCS_TEST) -o $(NAME)_test
./$(NAME)_test
run: all
@./$(NAME) config
$(NAME) : $(HEADERS) $(SRCS) $(OBJS)
c++ -Wall -Wextra -Wshadow -std=c++98 -o $(NAME) $(OBJS)
clean:
@rm -rf $(OBJS)
fclean: clean
@rm -rf $(NAME)
@rm -rf $(NAME)_extra
@rm -rf $(NAME)_test
re: fclean all