-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (48 loc) · 1.65 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: hyunghki <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/08/29 08:40:27 by hyunghki #+# #+# #
# Updated: 2024/08/29 08:40:28 by hyunghki ### ########.fr #
# #
# **************************************************************************** #
NAME= webserv
CXXFLAGS= -Wall -Werror -Wextra -std=c++98
LIBS=
INCLUDE= \
-Iincludes/rules \
-Iincludes/utils
SRC_DIR= ./srcs/
SRCS= $(SRC_DIR)main.cpp \
$(SRC_DIR)utils/FileManager.cpp \
$(SRC_DIR)utils/NetInfo.cpp \
$(SRC_DIR)rules/SyntaxChecker.cpp \
$(SRC_DIR)rules/ARule.cpp \
$(SRC_DIR)rules/MainRule.cpp \
$(SRC_DIR)rules/HttpRule.cpp \
$(SRC_DIR)rules/ServerRule.cpp \
$(SRC_DIR)rules/LocationRule.cpp \
$(SRC_DIR)rules/MethodRule.cpp
OBJS= $(SRCS:.cpp=.o)
ifdef DEBUG
DEBUG_FLAG = -D_DEBUG
endif
all: $(NAME)
.PHONY: re clean fclean debug
re:
make fclean
make all
clean:
rm -f $(OBJS)
fclean:
make clean
rm -f $(NAME)
debug:
@make DEBUG=1 all
$(NAME): $(OBJS)
c++ -o $@ $^
%.o: %.cpp
c++ $(CXXFLAGS) -o $@ -c $< $(INCLUDE) $(DEBUG_FLAG)