-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
123 lines (104 loc) · 5.91 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: esafar <esafar@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/12/19 13:23:13 by esafar #+# #+# #
# Updated: 2023/01/13 17:24:17 by esafar ### ########.fr #
# #
# **************************************************************************** #
# for the ascii art:
# https://patorjk.com/software/taag/#p=display&h=2&v=3&c=echo&f=Isometric1&t=
NAME = ft_containers
SRC = tests/containers/vector_test.cpp \
tests/containers/stack_test.cpp \
tests/containers/map_test.cpp \
main.cpp
OBJ = $(SRC:.cpp=.o)
CC = clang++
CFLAGS = -Wall -Wextra -Werror -std=c++98 -g3
RED = \033[1;31m
GREEN = \033[1;32m
END = \033[0m
CYAN = \033[1;36m
YELLOW = \033[1;33m
MAGENTA = \033[1;35m
WHITE = \033[1;37m
GREY = \033[1;90m
all: $(NAME)
$(NAME): $(OBJ)
@$(CC) $(CFLAGS) -o $(NAME) main.o
@echo "$(GREEN)$(NAME): ft_containers executable created$(END)"
@echo "$(CYAN)"
@echo " ___ ___ ___ ___ ___ ___ ___ ___ ___ "
@echo " /\ \ /\ \ /\__\ /\ \ /\ \ ___ /\__\ /\ \ /\ \ /\ \ "
@echo " /::\ \ /::\ \ /::| | \:\ \ /::\ \ /\ \ /::| | /::\ \ /::\ \ /::\ \ "
@echo " /:/\:\ \ /:/\:\ \ /:|:| | \:\ \ /:/\:\ \ \:\ \ /:|:| | /:/\:\ \ /:/\:\ \ /:/\ \ \ "
@echo " /:/ \:\ \ /:/ \:\ \ /:/|:| |__ /::\ \ /::\~\:\ \ /::\__\/:/|:| |__ /::\~\:\ \ /::\~\:\ \ _\:\~\ \ \ "
@echo " /:/__/ \:\__\/:/__/ \:\__\/:/ |:| /\__\/:/\:\__\/:/\:\ \:\__\__/:/\/__/:/ |:| /\__\/:/\:\ \:\__\/:/\:\ \:\__\/\ \:\ \ \__\ "
@echo " \:\ \ \/__/\:\ \ /:/ /\/__|:|/:/ /:/ \/__/\/__\:\/:/ /\/:/ / \/__|:|/:/ /\:\~\:\ \/__/\/_|::\/:/ /\:\ \:\ \/__/ "
@echo " \:\ \ \:\ /:/ / |:/:/ /:/ / \::/ /\::/__/ |:/:/ / \:\ \:\__\ |:|::/ / \:\ \:\__\ "
@echo " \:\ \ \:\/:/ / |::/ /\/__/ /:/ / \:\__\ |::/ / \:\ \/__/ |:|\/__/ \:\/:/ / "
@echo " \:\__\ \::/ / /:/ / /:/ / \/__/ /:/ / \:\__\ |:| | \::/ / "
@echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \|__| \/__/ "
@echo "$(END)"
%.o: %.cpp
@$(CC) $(CFLAGS) -c $< -o $@
clean:
@rm -f $(OBJ)
@echo "$(RED)$(NAME): objects deleted$(END)"
fclean: clean
@rm -f $(NAME) vector stack map
@echo "$(RED)$(NAME): deleted$(END)"
re: fclean all
vector: $(OBJ)
@$(CC) $(CFLAGS) -o vector tests/containers/vector_test.o
@echo "$(GREEN)$(NAME): vector executable created$(END)"
@echo "$(MAGENTA)"
@echo " ___ ___ ___ ___ ___ ___ "
@echo " /\__\ /\ \ /\ \ /\ \ /\ \ /\ \ "
@echo " /:/ / /::\ \ /::\ \ \:\ \ /::\ \ /::\ \ "
@echo " /:/ / /:/\:\ \ /:/\:\ \ \:\ \ /:/\:\ \ /:/\:\ \ "
@echo " /:/__/ ___ /::\~\:\ \ /:/ \:\ \ /::\ \ /:/ \:\ \ /::\~\:\ \ "
@echo " |:| | /\__\/:/\:\ \:\__\/:/__/ \:\__\/:/\:\__\/:/__/ \:\__\/:/\:\ \:\__\ "
@echo " |:| |/:/ /\:\~\:\ \/__/\:\ \ \/__/:/ \/__/\:\ \ /:/ /\/_|::\/:/ / "
@echo " |:|__/:/ / \:\ \:\__\ \:\ \ /:/ / \:\ /:/ / |:|::/ / "
@echo " \::::/__/ \:\ \/__/ \:\ \ \/__/ \:\/:/ / |:|\/__/ "
@echo " ~~~~ \:\__\ \:\__\ \::/ / |:| | "
@echo " \/__/ \/__/ \/__/ \|__| "
@echo "$(END)"
stack: $(OBJ)
@$(CC) $(CFLAGS) -o stack tests/containers/stack_test.o
@echo "$(GREEN)$(NAME): stack executable created$(END)"
@echo "$(YELLOW)"
@echo " ___ ___ ___ ___ ___ "
@echo " /\ \ /\ \ /\ \ /\ \ /\__\ "
@echo " /::\ \ \:\ \ /::\ \ /::\ \ /:/ / "
@echo " /:/\ \ \ \:\ \ /:/\:\ \ /:/\:\ \ /:/__/ "
@echo " _\:\~\ \ \ /::\ \ /::\~\:\ \ /:/ \:\ \ /::\__\____ "
@echo " /\ \:\ \ \__\/:/\:\__\/:/\:\ \:\__\/:/__/ \:\__\/:/\:::::\__\ "
@echo " \:\ \:\ \/__/:/ \/__/\/__\:\/:/ /\:\ \ \/__/\/_|:|~~|~ "
@echo " \:\ \:\__\/:/ / \::/ / \:\ \ |:| | "
@echo " \:\/:/ /\/__/ /:/ / \:\ \ |:| | "
@echo " \::/ / /:/ / \:\__\ |:| | "
@echo " \/__/ \/__/ \/__/ \|__| "
@echo "$(END)"
map: $(OBJ)
@$(CC) $(CFLAGS) -o map tests/containers/map_test.o
@echo "$(GREEN)$(NAME): map executable created$(END)"
@echo "$(GREEN)"
@echo " ___ ___ ___ "
@echo " /\__\ /\ \ /\ \ "
@echo " /::| | /::\ \ /::\ \ "
@echo " /:|:| | /:/\:\ \ /:/\:\ \ "
@echo " /:/|:|__|__ /::\~\:\ \ /::\~\:\ \ "
@echo " /:/ |::::\__\/:/\:\ \:\__\/:/\:\ \:\__\ "
@echo " \/__/~~/:/ /\/__\:\/:/ /\/__\:\/:/ / "
@echo " /:/ / \::/ / \::/ / "
@echo " /:/ / /:/ / \/__/ "
@echo " /:/ / /:/ / "
@echo " \/__/ \/__/ "
@echo "$(END)"
.PHONY: all clean fclean re