This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (67 loc) · 1.82 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
##
## EPITECH PROJECT, 2021
## Makefile
## File description:
## MyProject Makefile
##
#=======================
# * ... Paths, filenames
#=======================
NAME = palindrome
LIB = libmy.a
#=======================
# * ... Flags
#=======================
MAKEFLAGS = --silent
LDFLAGS = -L./mylib/ -lmy
CFLAGS = -Wall -Wextra -Ofast
# * ... Project headers
CPPFLAGS = -I./project/headers
# * ... Lib Headers
CPPFLAGS += -I./mylib/headers/ \
-I./mylib/headers/ascii/ \
-I./mylib/headers/maths/ \
-I./mylib/headers/optflags/ \
-I./mylib/headers/ptr/ \
-I./mylib/headers/two_dims_arrays/
# * ... Lib modules
CPPFLAGS += -I./mylib/headers/ascii/modules/ \
-I./mylib/headers/maths/modules/ \
-I./mylib/headers/ptr/modules/ \
-I./mylib/headers/two_dims_arrays/modules/
# * ... Project entry point
SRC = project/edge_case_error_handling.c \
project/inject_values_internals.c \
project/inject_values.c \
project/main.c \
project/entry_point.c \
project/msg.c \
project/run.c \
project/terminate.c
# * ... Project algorithm and internals
SRC += project/algo/compute_palindrome.c \
project/algo/is_palindrome.c \
project/algo/n_procedure.c \
project/algo/p_baseten_opti.c \
project/algo/p_procedure.c
OBJ = $(SRC:.c=.o)
RM_OBJ = @rm -f $(OBJ)
CC = gcc
#=======================
# * ... Recipes
#=======================
.PHONY: all clean fclean re tests_run $(LIB)
$(NAME): $(OBJ) $(LIB)
$(CC) -o $(NAME) $(OBJ) $(LDFLAGS)
$(LIB):
make -C mylib/
tests_run:
make -C tests/ tests_run
all: $(NAME)
clean:
$(RM_OBJ)
make -C mylib/ fclean
make -C tests/ fclean
fclean: clean
@rm -f $(NAME)
re: fclean all