-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (43 loc) · 1.65 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: pmiceli <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/11/07 14:44:04 by pmiceli #+# #+# #
# Updated: 2017/11/27 15:07:06 by pmiceli ### ########.fr #
# Updated: 2017/11/27 14:56:06 by pmiceli ### ########.fr #
# #
# **************************************************************************** #
NAME = fillit
SRCS = ft_parse.c\
ft_solver.c\
ft_place.c\
ft_read.c\
ft_map.c\
OBJ = $(SRCS:.c=.o)
SRC_PATH = srcs/
SRC_POS = $(addprefix $(SRC_PATH),$(SRC))
INC = -I includes
LIBFT = libft/libft.a
CC = gcc
FLAGS = -Wall -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJ) $(LIBFT)
$(CC) $(FLAGS) $(OBJ) -o $(NAME) $(LIBFT)
%.o : $(SRC_PATH)/%.c
$(CC) -o $@ -c $< $(FLAGS)
$(LIBFT):
@make -C ./libft/
@echo "\033[32mBuilt librairie.\033[0m"
clean :
@rm -rf $(OBJ)
@make clean -C ./libft/
@echo "\033[36mCleaned up object files.\033[0m"
fclean: clean
@rm -rf $(NAME)
@make fclean -C ./libft/
@echo "\033[34mCleaned up compiled files.\033[0m"
re: fclean all
.PHONY : all re clean fclean