-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
77 lines (56 loc) · 1.81 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
72
73
74
75
76
77
NAME = webserv
CXX = c++
CXXFLAGS = -std=c++98 -pedantic -Wall -Wextra -Werror -g3 #-fsanitize=address
#conf_file
CONFIGSRCS = ConfParser.cpp \
httpBlock/HttpBlock.cpp \
httpBlock/HttpBase.cpp \
LocationBlock/LocBlock.cpp \
serverBlock/ServBlock.cpp \
otherBlock/OtherBlock.cpp
CONFIGOBJS = $(addprefix ./modules/config/, $(CONFIGSRCS:.cpp=.o))
EVENTSRCS = Features/Cgi.cpp \
Features/Kqueue.cpp \
Handler/EventHandler.cpp \
Handler/HttpResponseHandler.cpp
EVENTOBJS = $(addprefix ./modules/Event/, $(EVENTSRCS:.cpp=.o))
#WebServ
WEBSERVSRCS = WebServ.cpp \
ServManager.cpp
WEBSERVOBJS = $(addprefix ./modules/webserv/, $(WEBSERVSRCS:.cpp=.o))
#UData
UDATASRCS = UData.cpp \
HttpRequest/HttpRequest.cpp \
HttpResponse/HttpResponse.cpp \
HttpResponse/Store/MimeStore.cpp \
HttpResponse/Store/StatusMsgStore.cpp \
HttpResponse/Features/AutoIndex.cpp \
HttpResponse/Features/Session.cpp
#HttpResponse/HttpResponse.cpp
UDATASOBJS = $(addprefix ./modules/UData/, $(UDATASRCS:.cpp=.o))
TOOLSRCS = ParseTool.cpp FileTool.cpp
TOOLOBJS = $(addprefix ./modules/Tools/, $(TOOLSRCS:.cpp=.o))
#main문
MAINSRC = main.cpp
MAINOBJ = $(addprefix ./, $(MAINSRC:.cpp=.o))
TEST_FILE = ./var/www/YoupiBanane/upload_put/file_should_exist_after.txt \
./var/www/YoupiBanane/upload_post.txt \
./var/www/YoupiBanane/upload_put/multiple_same.txt \
./var/www/YoupiBanane/upload_post/*.png
OBJS = $(CONFIGOBJS) $(EVENTOBJS) $(WEBSERVOBJS) $(UDATASOBJS) $(TOOLOBJS) $(MAINOBJ)
RM = rm -rf
all : $(NAME)
$(NAME) : $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^
%.o : %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $^
clean:
$(RM) $(OBJS)
$(RM) $(COBJS)
fclean: clean
$(RM) $(NAME)
$(RM) $(TEST_FILE)
re:
make fclean
make all
.PHONY: all clean fclean re