-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (47 loc) · 1.04 KB
/
Makefile
File metadata and controls
67 lines (47 loc) · 1.04 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
CXX = c++
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
# CXXFLAGS += -fsanitize=address -g3
# MAKEFLAGS = -j
NAME = webserv
SPATH = ./Sources/
SRC = main.cpp \
ServerManager.cpp\
CgiExecutor.cpp \
HttpResponse.cpp \
client.cpp \
network.cpp \
server.cpp \
Headers.cpp \
request.cpp \
RequestLine.cpp \
Utils.cpp \
ConfigParse/ConfigFileParser.cpp \
ConfigParse/ConfigFileReader.cpp\
ConfigParse/Configs.cpp\
Methods/Get.cpp \
Methods/Post.cpp \
Methods/Delete.cpp \
SRCS = $(addprefix $(SPATH), $(SRC))
OPATH = ./dependencies/
OBJ = $(SRC:.cpp=.o)
OBJS = $(addprefix $(OPATH),$(OBJ))
DEPS = $(OBJS:.o=.d)
INC = -I ./Includes/\
all: $(OPATH) $(NAME)
$(OPATH):
mkdir -p $(OPATH)
mkdir -p $(OPATH)ConfigParse
mkdir -p $(OPATH)Methods
$(OPATH)%.o: $(SPATH)%.cpp
$(CXX) $(CXXFLAGS) -MMD -MP -c $< -o $@ $(INC)
$(NAME): $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) -o $@ $(INC)
-include $(DEPS)
clean:
rm -f $(OBJS) $(DEPS)
fclean: clean
rm -f $(NAME)
rm -rf $(OPATH)
re: fclean
make all
.PHONY: all clean fclean re