-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (43 loc) · 1.06 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
NAME=ft_containers
CC=c++
CFLAGS = -Wall -Werror -Wextra -std=c++98 -fsanitize=address -g -D FT
HEADERS = utils/equal.hpp\
utils/iterator_traits.hpp\
utils/iterator.hpp\
utils/lexicographical_compare.hpp\
utils/pair.hpp\
utils/reverse_iterator.hpp\
utils/type_traits.hpp\
utils/vector_iterator.hpp\
vector/vector.hpp\
stack/stack.hpp\
tests/tests.hpp\
red_black_tree/red_black_tree.hpp\
red_black_tree/rbt_iterator.hpp\
map/map.hpp\
set/set.hpp\
tests/tests.hpp
TEST_FILES = tests/tests.cpp\
stack/stack_tests.cpp\
vector/vector_tests.cpp\
map/map_tests.cpp\
set/set_tests.cpp
TEST_OBJS = $(TEST_FILES:%.cpp=%.o)
INCLUDES = -I utils -I vector -I stack -I tests -I red_black_tree -I map -I set
SRC_FILES = ft_container.cpp
OBJ_FILES = $(SRC_FILES:%.cpp=%.o)
all: $(NAME)
$(NAME): $(OBJ_FILES)
$(CC) $(CFLAGS) $< -o $@
test: $(TEST_OBJS)
$(CC) $(CFLAGS) $(TEST_OBJS) -o $@
run:
./$(NAME)
%.o: %.cpp $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@ $(INCLUDES)
clean:
rm -rf $(OBJ_FILES) $(TEST_OBJS)
fclean: clean
rm -rf $(NAME)
rm -rf test
re: fclean all