-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·80 lines (58 loc) · 2.01 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: hthomas <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/09/08 14:55:13 by edal--ce #+# #+# #
# Updated: 2021/10/27 12:54:48 by hthomas ### ########.fr #
# #
# **************************************************************************** #
NAME = webserv
DIRSRC = srcs
OBJD = obj
INCLUDE = incl
INCLUDEF = $(INCLUDE)/includes.hpp \
$(INCLUDE)/location.hpp \
$(INCLUDE)/request.hpp \
$(INCLUDE)/server.hpp \
$(INCLUDE)/client.hpp \
$(INCLUDE)/webserv.hpp \
$(INCLUDE)/log.hpp
SRC = main.cpp \
location.cpp \
parse.cpp \
request.cpp \
server.cpp \
utils_header.cpp \
utils_parsing.cpp \
client.cpp \
webserv.cpp
OBJ = $(SRC:.cpp=.o)
OBJS = $(OBJ:%=$(OBJD)/%)
CFLAGS = -Wall -Wextra -Werror -std=c++98# -g3 -fsanitize=address -Ofast
CC = clang++
RM = rm -rf
DEBUG = 0
$(NAME) : $(OBJD) $(OBJS) $(INCLUDEF)
$(CC) -I ./$(INCLUDE) $(CFLAGS) $(OBJS) -o $(NAME)
@mkdir -p www/uploads
$(OBJD) :
@mkdir $(OBJD)
$(OBJD)/%.o : $(DIRSRC)/%.cpp $(INCLUDEF)
$(CC) -I ./$(INCLUDE) $(CFLAGS) -D DEBUG_ACTIVE=$(DEBUG) -o $@ -c $<
all : $(NAME)
clean :
$(RM) $(OBJS)
fclean : clean
$(RM) $(NAME) $(LIB)
run : all
./webserv config/base.conf
run_config : all
./webserv config/$(filter-out $@, $(MAKECMDGOALS)).conf
%:
@:
bonus : all
re : fclean all
.PHONY : all clean re fclean