-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 818 Bytes
/
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
##
## EPITECH PROJECT, 2020
## Makefile
## File description:
## Makefile
##
SRC = sources/my_print.c \
sources/my_functions.c \
sources/my_convert.c \
NAME = libmy.a
OBJ = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OBJ)
ar rc $(NAME) $(OBJ)
clean:
rm -f $(OBJ)
fclean: clean
rm -f $(NAME)
rm -f *.gcda
rm -f *.gcno
rm -f unit_tests*
re: fclean all
unit_tests: re
gcc -o unit_tests_my_convert sources/my_convert.c sources/my_functions.c tests/test_convert.c --coverage -lcriterion -I./includes/
gcc -o unit_tests_my_functions sources/my_convert.c sources/my_functions.c tests/test_my_functions.c --coverage -lcriterion -I./includes/
run_tests: unit_tests
./unit_tests_my_convert
./unit_tests_my_functions
.PHONY: all clean fclean re unit_tests run_tests