-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·73 lines (55 loc) · 1.21 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
##
## EPITECH PROJECT, 2021
## BSQ
## File description:
## Main kakefile
##
NO_CRITERION = src/main.c
SRC = src/detect_square.c \
src/error_handle.c \
src/free_zone.c \
src/get_file.c \
src/get_map.c \
src/map_create.c \
src/map_gestion.c
SRC_C = tests/tests_open_file.c
OBJ = $(SRC:.c=.o) $(NO_CRITERION:.c=.o)
NAME = bsq
##CFLAGS - CPPFLAGS - LDFLAGS
CFLAGS = -Wall -Wextra -Werror -Wshadow -Wimplicit -pedantic
CPPFLAGS += -I./include/
CPPFLAGS += -L./lib -lmy
CPPFLAGS += -O2
all: $(NAME)
lib:
make -s -C ./lib/my
$(NAME): lib $(OBJ)
gcc $(OBJ) -o $(NAME) -ggdb3 $(CPPFLAGS)
rm -f $(OBJ)
tests_run: lib
gcc -o uni_t $(SRC) tests/*.c $(CPPFLAGS) --coverage -lcriterion
-./uni_t
rm uni_t
cover:
mkdir -p criterions_r
gcovr --exclude tests/ --html --html-details -o criterions_r/cover.html
gcovr --branches --exclude tests/
make -C ./ clean
clean:
make -s -C ./lib/my clean
rm -f $(OBJ)
rm -f *.o
rm -f *~
rm -f vgcore*
rm -f #*
rm -f *.gcda
rm -f *.gcno
fclean: clean
rm -f $(NAME)
rm -f criterions_r/*.html
rm -f criterions_r/*.css
rm -rf criterions_r/
make -s -C ./lib/my fclean
re: fclean all
my_tests: re tests_run cover
.PHONY: all clean fclean re tests_run cover my_tests lib