-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
57 lines (44 loc) · 1.52 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: yolee <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/03/31 01:14:02 by yolee #+# #+# #
# Updated: 2023/04/09 02:07:00 by yolee ### ########.fr #
# #
# **************************************************************************** #
NAME = webserv
VPATH = ./srcs
INCLUDE_DIR = ./include
CXX = c++
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
CPPFLAGS = -MMD -I$(INCLUDE_DIR)
SRCS = webserv.cpp \
ConfigInfo.cpp \
ServerConfig.cpp \
LocationConfig.cpp \
utils.cpp \
ServerHandler.cpp \
HTTPMessage.cpp \
HTTPRequest.cpp \
HTTPResponse.cpp \
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
all : $(NAME)
$(NAME) : $(OBJS)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OBJS) -o $(NAME)
%.o : %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
clean :
$(RM) $(OBJS)
$(RM) $(DEPS)
fclean :
$(MAKE) clean
$(RM) $(NAME)
re :
$(MAKE) fclean
$(MAKE) all
.PHONY : all clean fclean re
-include $(DEPS)