-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (38 loc) · 1021 Bytes
/
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
NAME = webserv
SRCS_LIST = \
main.cpp \
Config/Config.cpp \
Config/InputArgs.cpp \
Config/RequestConfig.cpp \
Config/ServerConfig.cpp \
HTTP/CGI.cpp \
HTTP/Client.cpp \
HTTP/Request.cpp \
HTTP/Response.cpp \
HTTP/Server.cpp \
Utils/Base64.cpp \
Utils/File.cpp \
Utils/get_next_line.cpp \
Utils/Logger.cpp \
Utils/MimeTypes.cpp \
Utils/StatusCode.cpp \
Utils/StringUtils.cpp \
Utils/Utils.cpp
SRCS_FOLDER = srcs
SRCS = $(addprefix ${SRCS_FOLDER}/, ${SRCS_LIST})
OBJS = ${SRCS:.cpp=.o}
INCLUDES = -I includes/Config -I includes/Utils -I includes/HTTP
CC = clang++
CFLAGS = -Wall -Wextra -Werror -std=c++98 -pthread
RM = rm -f
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) $(OBJS) -o $(NAME)
%.o: %.cpp
${CC} ${CFLAGS} $(INCLUDES) -o $@ -c $<
clean:
${RM} ${OBJS}
fclean: clean
${RM} ${NAME}
re: fclean all
.PHONY: all fclean clean re