-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (49 loc) · 1.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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: pruiz-ca <pruiz-ca@student.42madrid.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/08/07 00:18:05 by pruiz-ca #+# #+# #
# Updated: 2021/11/10 16:44:45 by pruiz-ca ### ########.fr #
# #
# **************************************************************************** #
SHELL = /bin/bash
NAME = a.out
SRC_DIR = src/
OBJ_DIR = obj/
INC_DIR = inc/
NOCOL = \033[0m
ORG = \033[0;33m
GRN = \033[1;32m
CYN = \033[0;36m
SRCS = main.cpp
OBJS = $(SRCS:.cpp=.o)
HEADER = -Icontainers -Iiterators -Iutils
CXX = clang++
CXXFLAGS = -std=c++98 $(HEADER) -Wall -Wextra -Werror
DEBUGFLAGS = -g3 -fsanitize=address
MSG_SUCCESS = echo -e "$(GRN)=> Success!$(NOCOL)"
MSG_DEBUG = echo -e "$(CYN)=> Debug mode ON$(NOCOL)"
all: $(NAME)
$(NAME): $(OBJS)
@$(CXX) $(CXXFLAGS) $^ -o $@
@$(MSG_SUCCESS)
@./a.out 42
clean:
@$(RM) $(OBJS)
fclean: clean
@$(RM) $(NAME)
@find . -name ".DS_Store" -delete
@find . -name "*.out" -delete
@find . -name "*.dSYM" -exec rm -R "{}" +
re: fclean all
debug: CXX += -g -fsanitize=address
debug: MSG_SUCCESS = $(MSG_DEBUG)
debug: re
tests:
@cd _tests/containers_test && ./do.sh vector stack map set
@make -C _tests/benchmarks
@make fclean
.PHONY: all clean fclean re debug debugflags tests