-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (50 loc) · 2.3 KB
/
Makefile
File metadata and controls
68 lines (50 loc) · 2.3 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
67
68
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: zlafou <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/05/28 18:05:37 by zlafou #+# #+# #
# Updated: 2023/06/11 19:32:14 by zlafou ### ########.fr #
# #
# **************************************************************************** #
NAME = webserv
SRCS = main.cpp Server.cpp Response.cpp Logger.cpp
OBJS = $(SRCS:.cpp=.o)
CPPFLAGS = -Wall -Wextra -Werror -std=c++98 -I ./includes #-g -fsanitize=address
CPP = c++
VPATH = ./srcs
HEADER = "\033[0;35m █░░░█ █▀▀ █▀▀▄ █▀▀ █▀▀ █▀▀█ ▀█░█▀ \n █▄█▄█ █▀▀ █▀▀▄ ▀▀█ █▀▀ █▄▄▀ ░█▄█░ \n ░▀░▀░ ▀▀▀ ▀▀▀░ ▀▀▀ ▀▀▀ ▀░▀▀ ░░▀░░\033[0;0m"
FOOTER = "\033[0;35m➔\033[0;0m type \033[0;34m./$(NAME)\033[0;0m to run the webserver."
vpath $(SRCS) $(VPATH)
all: $(NAME) | footer
header :
@echo
@echo $(HEADER)
@echo
footer :
@echo $(FOOTER)
.cpp.o:
@sleep 0.003
@printf "\33[2K\r\033[1mmaking object \033[0;34m➔\033[0;0m\033[0;35m $@ \033[0;0m"
-@$(CPP) $(CPPFLAGS) -c $< -o $@
$(NAME): | header $(OBJS)
@echo
@echo
@echo "\033[0;35m\033[1m────── making webserv ──────\033[0;0m"
@printf "\033[2m"
$(CPP) ${OBJS} $(CPPFLAGS) -o ${NAME}
@echo "\033[0;0"
clean: | header
@echo "\033[0;35m\033[1m────── clean webserv ──────\033[0;0m"
@printf "\033[2m"
rm -rf $(OBJS)
@echo "\033[0;0m"
fclean: clean | header
@echo "\033[0;35m\033[1m────── fclean webserv ──────\033[0;0m"
@printf "\033[2m"
rm -rf $(NAME)
@echo "\033[0;0m"
re: fclean all
.PHONY: all clean fclean re minishell