-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·86 lines (74 loc) · 1.67 KB
/
Makefile
File metadata and controls
executable file
·86 lines (74 loc) · 1.67 KB
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
##
## EPITECH PROJECT, 2023
## Makefile
## File description:
## SIUUUUUUUUUU look at this Makefile it work.
##
LIB := lib/my_strlen.c \
lib/my_stowa.c \
lib/my_putchar.c \
lib/my_putstr.c \
lib/my_numlen.c \
lib/my_put_nbr.c \
lib/my_strcat.c \
lib/my_strcpy.c \
lib/my_strcmp.c \
lib/my_strdup.c \
lib/my_skipstr.c
SRC := $(LIB) \
include/my_get_env.c \
include/my_strtok_array.c \
include/print_args.c \
include/verif_exit.c \
include/struct.c \
include/my_command.c \
include/unsetenv_setenv.c \
include/play_command.c \
include/my_errno.c \
include/add_pipe.c \
include/my_str_pipe_array.c \
include/echo.c \
include/verif_option.c \
include/my_char_is_alphanum.c \
include/walen.c \
include/wacpy.c \
include/my_strncpy.c \
include/my_strncmp.c \
include/my_strndup.c
FILE_O = *.o
LIBMY_A = libmy.a
NAME = mysh
TLIB = -lcriterion --coverage
TEST = test/unit/*.c
TSRC := $(LIB)
W := -Wall -Wextra -Iinclude
$(NAME):
gcc -c $(SRC) -Iinclude
gcc -g3 -o $(NAME) main.c $(SRC) $(W) -g3
make clean
clean:
find -type f -iname '*.o' -delete
find -type f -iname $(LIBMY_A) -delete
fclean:
make clean
find -type f -iname $(LIBMY_A) -delete
rm -f $(NAME)
re:
make fclean
make
tests_build:
gcc -o unit_tests $(TSRC) $(TEST) $(TLIB)
tests_run: tests_build
find -type f -iname "*.gcno" -delete
find -type f -iname "*.gcda" -delete
find -type f -iname "*.css" -delete
find -type f -iname "*.html" -delete
./unit_tests
tests_clean:
find -type f -iname "*.gcno" -delete
find -type f -iname "*.gcda" -delete
find -type f -iname "*.css" -delete
find -type f -iname "*.html" -delete
tests_fclean: tests_clean
rm -f unit_tests
tests_re: tests_fclean tests_run