-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
81 lines (64 loc) · 2.08 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
78
79
80
81
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: agras <agras@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/04/10 17:11:19 by trobert #+# #+# #
# Updated: 2023/08/01 20:53:58 by agras ### ########.fr #
# #
# **************************************************************************** #
NAME = webserv
SRCS_FILES = main.cpp \
Webserv.cpp \
Server.cpp \
ConfigFile.cpp \
ServerContext.cpp \
Directive.cpp \
utils.cpp \
HttpWorker.cpp \
headerFields.cpp \
ResponseBuilder.cpp \
HttpTables.cpp \
CGIHandler.cpp \
Request.cpp \
Connection.cpp \
Response.cpp
INC_FILES = Webserv.hpp \
Server.hpp \
ConfigFile.hpp \
ServerContext.hpp \
Directive.hpp \
directives.hpp \
utils.hpp \
HttpWorker.hpp \
header.hpp \
headerFields.hpp \
httpDatas.hpp \
ResponseBuilder.hpp \
HttpTables.hpp \
CGIHandler.hpp \
Request.hpp \
Connection.hpp \
Response.hpp
SRCS = $(addprefix srcs/, $(SRCS_FILES))
INCS = $(addprefix includes/, $(INC_FILES))
CC = c++
CFLAGS = -Wall -Wextra -Werror -std=c++98 -g3
OBJS_FILES = $(SRCS_FILES:%.cpp=%.o)
OBJS = $(addprefix objs/, $(OBJS_FILES))
DEP = $(OBJS:%.o=%.d)
all : $(NAME)
$(NAME) : $(OBJS)
$(CC) $(CFLAGS) -o $(NAME) $(OBJS)
clean :
rm -rf $(OBJS) $(DEP)
rm -rf objs/
fclean : clean
rm -rf $(NAME)
re : fclean all
objs/%.o : srcs/%.cpp $(INCS)
mkdir -p objs
$(CC) $(CFLAGS) -MMD -o $@ -c $<
.PHONY: all clean fclean re