-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
100 lines (86 loc) · 2.22 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
##
## EPITECH PROJECT, 2019
## Makefile
## File description:
## make
##
CPPFLAGS= -I include/
CFLAGS = -Wall -Wextra
LDFLAGS = -L lib/my/ -lmy -lncurses
UTFLAGS = -lcriterion --coverage
SRC = src/main.c \
src/my_sokoban.c \
src/coords.c \
src/movement.c \
src/game.c \
src/reset_map.c
OBJ = $(SRC:.c=.o)
NAME = my_sokoban
SRCUT = lib/my/my_compute_power_rec.c \
lib/my/my_compute_square_root.c \
lib/my/my_find_prime_sup.c \
lib/my/my_getnbr.c \
lib/my/my_isneg.c \
lib/my/my_is_prime.c \
lib/my/my_putchar.c \
lib/my/my_put_nbr.c \
lib/my/my_putstr.c \
lib/my/my_revstr.c \
lib/my/my_strcat.c \
lib/my/my_strcmp.c \
lib/my/my_strcpy.c \
lib/my/my_strlen.c \
lib/my/my_strlowcase.c \
lib/my/my_strncat.c \
lib/my/my_strncmp.c \
lib/my/my_strncpy.c \
lib/my/my_strstr.c \
lib/my/my_strupcase.c \
lib/my/my_swap.c \
lib/my/my_strdup.c \
lib/my/my_memset.c \
lib/my/sum_stdarg.c \
lib/my/disp_stdarg.c \
lib/my/my_printf.c \
lib/my/my_put_binary.c \
lib/my/my_put_hexa.c \
lib/my/my_put_long.c \
lib/my/my_put_long_long.c \
lib/my/my_put_octal.c \
lib/my/my_put_unsigned_int.c \
lib/my/my_put_unsigned_long.c \
lib/my/my_put_unprintable.c \
lib/my/my_put_short.c \
lib/my/my_put_unsigned_short.c \
lib/my/count_line_len.c \
lib/my/count_line_nb.c \
lib/my/fill_tab.c \
src/main.c \
src/my_sokoban.c \
src/coords.c \
src/movement.c \
src/game.c \
src/reset_map.c
OBJUT = $(SRCUT:.c=.o)
NAMEUT = unit_tests
all: $(NAME)
$(NAME): $(OBJ)
make -C lib/my/
gcc -o $(NAME) $(OBJ) $(LDFLAGS) $(UTFLAGS)
tests_run: CFLAGS += --coverage
tests_run: $(OBJUT)
gcc -o $(NAMEUT) $(OBJUT) $(UTFLAGS)
./$(NAMEUT)
gcovr --exclude tests/
gcovr --branches --exclude tests/
debug: CFLAGS += -g3
debug: $(OBJ)
make -C lib/my/
gcc -o $(NAME) $(OBJ) $(LDFLAGS)
clean:
rm -f $(OBJ) $(OBJUT) vgcore.* *.gcda *.gcno
make clean -C lib/my/
fclean: clean
rm -f $(NAME) $(NAMEUT)
make fclean -C lib/my/
re: fclean all