-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 918 Bytes
/
Makefile
File metadata and controls
53 lines (37 loc) · 918 Bytes
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
CXX = c++
NAME = webserv
RM = rm -rf
SRCS_DIR = src
OBJS_DIR = obj
CXXFLAGS = -Wall -Wextra -Werror -MP -MD -std=c++98 -Iinc
SRCS = \
$(SRCS_DIR)/CGI.cpp \
$(SRCS_DIR)/Server.cpp \
$(SRCS_DIR)/Log.cpp \
$(SRCS_DIR)/Request.cpp \
$(SRCS_DIR)/Director.cpp \
$(SRCS_DIR)/Config.cpp \
$(SRCS_DIR)/ConfigParser.cpp \
$(SRCS_DIR)/ConfigSetters.cpp \
$(SRCS_DIR)/Utils.cpp \
$(SRCS_DIR)/main.cpp
OBJS = $(SRCS:${SRCS_DIR}/%.cpp=${OBJS_DIR}/%.o)
DEPS = $(OBJS:%.o=%.d)
$(NAME): $(OBJS)
$(CXX) $(CXXFLAGS) -o $(NAME) $(OBJS) -lpthread
$(OBJS_DIR)/%.o: $(SRCS_DIR)/%.cpp
mkdir -p $(OBJS_DIR)
$(CXX) $(CXXFLAGS) -c $< -o $@
all : $(NAME)
fclean : clean
$(RM) ./logs
$(RM) ./error_pages
$(RM) $(NAME)
$(RM) $(TEST_OBJS_DIR)
$(RM) $(OBJS_DIR)
$(RM) webserv.d
clean:
$(RM) $(OBJS)
re : fclean all
-include $(DEPS)
.PHONY : all clean fclean re