-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (78 loc) · 2.92 KB
/
Copy pathMakefile
File metadata and controls
97 lines (78 loc) · 2.92 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: alienard@student.42.fr <alienard> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/03/09 12:07:05 by dboyer #+# #+# #
# Updated: 2021/09/08 13:26:33 by alienard@st ### ########.fr #
# #
# **************************************************************************** #
################################################################################
# SOURCES
################################################################################
NAME = webserv
MAIN = ./srcs/main.cpp
SRCS = socket\
server \
config\
parsing/parser\
parsing/locationKeys\
parsing/dataStructure\
parsing/serverKeys\
parsing/parsingExceptions\
parsing/utils\
utils/ft_itoa\
utils/strtrim\
cgi \
request\
response\
statusCode\
handleGET\
handleRequest\
handlePOST\
handleDELETE\
INCLUDES = -I ./includes
HEADERS = ./includes/webserv.hpp\
./includes/statusCode.hpp\
./includes/socket.hpp\
./includes/server.hpp\
./includes/response.hpp\
./includes/request.hpp\
./includes/config.hpp\
./includes/cgi.hpp\
./includes/utils/utils.hpp\
./includes/parsing/dataStructure.hpp\
./includes/parsing/parser.hpp\
./includes/parsing/parsingExceptions.hpp\
./includes/parsing/utils.hpp\
./includes/handleRequest.hpp
OBJS_MAIN = $(MAIN:.cpp=.o)
OBJS = $(FIL:.cpp=.o)
FIL = $(addsuffix .cpp, $(addprefix srcs/, $(SRCS)))
CXXFLAGS = -Werror -Wall -Wextra -std=c++98 -O3 -g ${INCLUDES}
CXX = clang++
RM = rm -f
################################################################################
# Basic Rules
################################################################################
%.o: %.cpp ${HEADERS}
$(CXX) $(CXXFLAGS) -c $< -o $@
all : $(NAME)
$(NAME) : $(OBJS) $(OBJS_MAIN)
${CXX} ${CXXFLAGS} -o ${NAME} ${OBJS} ${OBJS_MAIN}
clean :
$(RM) $(OBJS)
$(RM) ${OBJS_MAIN}
fclean : clean
$(RM) $(NAME)
re : fclean all
################################################################################
# Extra Rules
################################################################################
run : all
./${NAME}
valgrind : all
valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all ./${NAME}
.PHONY : all clean fclean re bonus%