-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (42 loc) · 896 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
55
56
57
58
##
## EPITECH PROJECT, 2020
## Makefile
## File description:
## Makefile
##
SRC = src/main.c \
src/check_for_end.c \
src/exec_cmd.c \
src/handle_direction.c \
src/handle_speed.c \
src/verif_str.c \
src/my_edited_word_array.c \
CC = gcc
OBJ = $(SRC:.c=.o)
NAME = ai
CFLAGS = -Wall -Werror -Wshadow -Wextra -I include/
LDFLAGS = -L./lib/ -lmy
MAKE = make
ECHO = echo -e
all: $(NAME)
$(NAME): $(OBJ)
$(MAKE) -C lib/my
$(CC) $(OBJ) $(LDFLAGS) -o $(NAME)
clean:
$(RM) $(OBJ)
$(MAKE) clean -C lib/my/
$(RM) src/*.gcno
$(RM) src/*.gcda
fclean: clean
$(RM) $(NAME)
$(MAKE) fclean -C lib/my/
rm -f lib/libmy.a
re: fclean all
tests_run: unit_tests
./tests/unit_tests
gcovr --exclude tests/
gcovr --branches --exclude tests/
unit_tests:
$(MAKE) -C lib/my
$(MAKE) -C tests/
.PHONY: fclean clean re all