-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (47 loc) · 1.18 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
SHELL = /bin/sh
NAME_FILE = webserver
FLAGS = -Wall -Wextra -Werror -std=c++98
SRCS = Config.cpp \
IConfig.cpp \
CgiWorker.cpp \
Cluster.cpp \
HttpRequest.cpp \
HttpResponce.cpp \
HttpResponseBuilder.cpp \
IOSocket.cpp \
main.cpp \
PhysicalServer.cpp \
RequestBuilder.cpp \
SocketContainer.cpp \
VirtualServer.cpp \
Worker.cpp \
OBJS = $(SRCS:.cpp=.o)
HEADER_PATH = ./includes/
HEADER_PATH_CFG = ./includes/config
HEADERS = Config.h \
IOSocket.h \
CgiWorker.h \
Cluster.h \
PhysicalServer.h \
RequestBuilder.h \
SocketContainer.h \
HttpResponse.h \
VirtualServer.h \
IConfig.h \
Worker.h \
HttpRequest.h \
raii_ptr.h \
HttpResponseBuilder.h \
vpath %.cpp ./srcs/config ./srcs
vpath %.h ./includes/ ./includes/config
.PHONY: clean fclean re
all: $(NAME_FILE)
$(NAME_FILE): $(OBJS)
@g++ -o $(NAME_FILE) $(OBJS)
$(OBJS): %.o:%.cpp $(HEADERS)
@g++ -c $< -I$(HEADER_PATH) -I$(HEADER_PATH_CFG) $(FLAGS) -o $@
clean:
@rm -f $(OBJS)
fclean: clean
@rm -f $(NAME_FILE)
re: fclean all