-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (44 loc) · 1.63 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mipham <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/11/28 17:42:17 by mipham #+# #+# #
# Updated: 2017/12/01 13:55:25 by mipham ### ########.fr #
# #
# **************************************************************************** #
NAME = fillit
_GREEN = $'\x1b[32m
_CYAN = $'\x1b[36m
_RED = $'\x1b[31m
_YELLOW = $'\x1b[33m
_PURPLE = $'\x1b[35m
_BLUE = $'\x1b[34m
LIB = src/libft
SRC = src/main.c\
src/grid.c\
src/check.c\
src/read.c\
src/solve.c\
INC = -I includes
OBJ = $(SRC:.c=.o)
CC = gcc
LIBPATH = src/libft/libft.a
CFLAGS = -Wall -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJ)
make -C $(LIB)
$(CC) -o $(NAME) $(OBJ) $(LIBPATH)
@echo "${_YELLOW}Fillit generate${_END} ${_BLUE}[!${_END}]"
clean:
rm -f $(OBJ)
make clean -C ./src/libft/
@echo "${_CYAN}cleaning objects files${_END} ${_PURPLE}[!${_END}]"
fclean: clean
rm -f $(NAME)
make fclean -C ./src/libft/
@echo "${_RED}delete $(NAME) ${_END}${_GREEN}[!${_END}]"
re: fclean all
.PHONY : all, re, clean, fclean