-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (46 loc) · 1.26 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
NAME = ft_containers
STD_NAME = std_containers
CC = c++
FLAGS = -Wall -Werror -Wextra -std=c++98
OBJ = $(SRC:.cpp=.o)
STD_OBJ = $(STD_SRC:.cpp=.o)
SRC = ./TestFiles/main.cpp\
./TestFiles/ft_set_tests.cpp\
./TestFiles/ft_map_tests.cpp\
./TestFiles/ft_vector_tests.cpp\
./TestFiles/ft_stack_tests.cpp
STD_SRC = ./TestFiles/main.cpp\
./TestFiles/std_set_tests.cpp\
./TestFiles/std_map_tests.cpp\
./TestFiles/std_vector_tests.cpp\
./TestFiles/std_stack_tests.cpp
LIB = ./containers/vector.hpp\
./containers/vector.ipp\
./containers/stack.hpp\
./containers/stack.ipp\
./containers/map.hpp\
./containers/map.ipp\
./containers/set.hpp\
./containers/set.ipp\
./utils/iterator.hpp\
./utils/random_access_iterator.hpp\
./utils/type_traits.hpp\
./utils/equal.hpp\
./utils/lexicographical_compare.hpp\
./utils/reverse_iterator.hpp\
./utils/rb_tree.hpp\
./utils/rb_node.hpp\
./utils/Bidirectional_Iterator.hpp\
./TestFiles/utils.hpp
all : $(NAME) $(STD_NAME)
$(NAME) : $(OBJ) $(LIB)
$(CC) $(FLAGS) $(OBJ) -o $(NAME)
$(STD_NAME) : $(STD_OBJ) $(LIB)
$(CC) $(FLAGS) $(STD_OBJ) -o $(STD_NAME)
%.o : %.cpp $(LIB)
$(CC) $(FLAGS) -o $@ -c $<
clean :
rm -f $(OBJ) $(STD_OBJ)
fclean : clean
rm -f $(NAME) $(STD_NAME)
re : fclean all