-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·64 lines (48 loc) · 1.08 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
##
## EPITECH PROJECT, 2021
## printf
## File description:
## Main kakefile
##
NO_CRITERION = sources/main.c
SRC = sources/convert.c \
sources/print_base.c \
sources/print_standard.c \
sources/utils.c \
sources/unsigned_o_u.c \
sources/print_pointeur.c \
sources/my_printf.c
OBJ = $(SRC:.c=.o) $(NO_CRITERION:.c=.o)
NAME = libmy.a
CFLAGS = -Wall -Wextra -Werror -Wshadow -Wimplicit -pedantic
CPPFLAGS += -I./include/
all: $(NAME)
$(NAME): $(OBJ)
ar rc $(NAME) $(OBJ)
tests_file: $(OBJ)
gcc $(OBJ) -o printf_binary_test -ggdb3
tests_run:
gcc -o uni_t $(SRC) tests/*.c $(CFLAGS) $(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:
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/
my_tests: re tests_run cover
re: fclean all
.PHONY: all clean fclean re tests_run cover