-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
52 lines (42 loc) · 1.48 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
# **************************************************************************** #
# #
# ::: :::::::: #
# makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kmira <kmira@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/05/06 16:16:18 by kmira #+# #+# #
# Updated: 2019/05/16 12:51:57 by kmira ### ########.fr #
# #
# **************************************************************************** #
FLAGS = -Wall -Wextra -Werror
NAME = fillit
LIBRARY = libft/libft.a
FILES = \
encoding \
input \
main \
output \
piece_sanitization \
solver \
solving_utils
SRCS = $(addsuffix .c, $(FILES))
OBJS = $(addsuffix .o, $(FILES))
all: $(NAME)
$(NAME): $(LIBRARY) $(OBJS)
@echo "\033[32m""Making your fillit executable"
@gcc -o fillit $(OBJS) $(LIBRARY)
@echo "\033[32m""Done!"
$(LIBRARY):
make -C libft/
make clean -C libft/
$(OBJS):
gcc $(FLAGS) -c $(SRCS)
clean:
@echo "Cleaning your .o files"
@rm -f libft.a
@rm -f $(OBJS)
fclean: clean
make -C libft/ fclean
rm -f $(NAME)
re: fclean all