-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathMakefile
54 lines (37 loc) · 910 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
##
## EPITECH PROJECT, 2023
## stumpers
## File description:
## Makefile
##
SRC = src/main.c \
src/utils.c \
src/swapupcase.c
TESTS_SRC = src/utils.c \
src/swapupcase.c
OBJ = $(SRC:.c=.o)
NAME = swapupcase
CPPFLAGS = -I./include
all: $(NAME)
$(NAME): $(OBJ)
gcc -o $(NAME) $(OBJ)
debug:
gcc -o $(NAME) $(SRC) $(CPPFLAGS) -ggdb3
compile_tests:
gcc -o unit_testing $(TESTS_SRC) tests/unit_tests.c \
$(CPPFLAGS) --coverage -lcriterion
gcc -o integration_testing $(TESTS_SRC) tests/integration_tests.c \
$(CPPFLAGS) --coverage -lcriterion
tests_run: compile_tests
./unit_testing
./integration_testing
tests: tests_run
gcovr --exclude tests/
gcovr --exclude tests/ --branches
clean:
find -name "*.o" -delete
find -name "*.gc*" -delete
fclean: clean
rm -f $(NAME) unit_testing integration_testing
re: fclean all
.PHONY: all clean fclean re tests tests_run debug