-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (59 loc) · 2.87 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
62
63
64
65
66
67
68
69
70
71
72
73
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: roybakker <roybakker@student.codam.nl> +#+ #
# +#+ #
# Created: 2021/02/25 14:55:06 by roybakker #+# #+# #
# Updated: 2021/05/18 14:53:56 by gbouwen ######## odam.nl #
# #
# **************************************************************************** #
NAME = webserv
SOURCES = webserver/main.cpp \
webserver/gnl/get_next_line.cpp \
webserver/gnl/get_next_line_utils.cpp \
webserver/server/location_context.cpp \
webserver/server/file_descriptors.cpp \
webserver/server/response.cpp \
webserver/server/server.cpp \
webserver/server/webserver.cpp \
webserver/server/header_handler.cpp \
webserver/server/request_buf.cpp \
webserver/server/client.cpp \
webserver/helper/check_functions.cpp \
webserver/helper/lib_functions.cpp \
webserver/helper/parse_functions.cpp \
webserver/helper/signal_handler.cpp \
webserver/helper/verify_file_location_functions.cpp \
webserver/server/Base64.cpp
TEMP_FILES = server_files/www/temp_files/cgi_in \
server_files/www/temp_files/cgi_out \
server_files/www/downloads/file_should_exist_after \
server_files/www/downloads/POST_file \
server_files/www/downloads/multiple_same
OBJECTS = ${SOURCES:%.cpp=%.o}
FLAGS = -Wall -Wextra -Werror -Ofast -std=c++98
COMPILE = clang++
GREEN = \033[38;5;46m
WHITE = \033[38;5;15m
GREY = \033[38;5;8m
ORANGE = \033[38;5;202m
RED = \033[38;5;160m
RESET = \033[0m
all: $(NAME)
$(NAME): $(OBJECTS)
@echo "$(GREEN)----------------------------------------------------"
@$(COMPILE) $(FLAGS) -o $(NAME) $(OBJECTS)
@echo "Executable ./webserv"
@echo "----------------------------------------------------$(RESET)"
%.o: %.cpp
@echo "$(GREY)Compiling... $(GREY)$<"
@$(COMPILE) $(FLAGS) -c -o $@ $<
clean:
@echo "$(RED)----------------------------------------------------"
@echo "$(GREY)DELETE ./webserv"
@echo "$(RED)----------------------------------------------------"
@/bin/rm -f $(NAME) $(TEMP_FILES) $(OBJECTS)
re: clean all
.PHONY: all clean re