-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (52 loc) · 2.34 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
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: abobas <[email protected]> +#+ #
# +#+ #
# Created: 2020/07/13 17:19:37 by abobas #+# #+# #
# Updated: 2020/08/24 18:48:56 by abobas ######## odam.nl #
# #
# **************************************************************************** #
FLAGS = -Wall -Werror -Wextra -std=c++98 -pedantic
STD = -D MODE=std
FT = -D MODE=ft
CC = clang++
vector: clean
$(CC) $(FLAGS) $(FT) src/tests/vector_test.cpp -o vector_test
./vector_test > result_ft
rm -rf vector_test
$(CC) $(FLAGS) $(STD) src/tests/vector_test.cpp -o vector_test
./vector_test > result_std
diff -s result_ft result_std > result_diff
list: clean
$(CC) $(FLAGS) $(FT) src/tests/list_test.cpp -o list_test
./list_test > result_ft
rm -rf list_test
$(CC) $(FLAGS) $(STD) src/tests/list_test.cpp -o list_test
./list_test > result_std
diff -s result_ft result_std > result_diff
map: clean
$(CC) $(FLAGS) $(FT) src/tests/map_test.cpp -o map_test
./map_test > result_ft
rm -rf map_test
$(CC) $(FLAGS) $(STD) src/tests/map_test.cpp -o map_test
./map_test > result_std
diff -s result_ft result_std > result_diff
stack: clean
$(CC) $(FLAGS) $(FT) src/tests/stack_test.cpp -o stack_test
./stack_test > result_ft
rm -rf stack_test
$(CC) $(FLAGS) $(STD) src/tests/stack_test.cpp -o stack_test
./stack_test > result_std
diff -s result_ft result_std > result_diff
queue: clean
$(CC) $(FLAGS) $(FT) src/tests/queue_test.cpp -o queue_test
./queue_test > result_ft
rm -rf queue_test
$(CC) $(FLAGS) $(STD) src/tests/queue_test.cpp -o queue_test
./queue_test > result_std
diff -s result_ft result_std > result_diff
clean:
rm -rf *test result*