-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (50 loc) · 1.75 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: byoung-w <byoung-w@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2014/09/09 10:19:19 by byoung-w #+# #+# #
# Updated: 2015/04/29 20:13:26 by byoung-w ### ########.fr #
# #
# **************************************************************************** #
NAME = puissance4
CC = gcc -Wall -Werror -Wdeprecated-declarations -Wextra
CCO = gcc -o
LIB = -L ft_printf/ -lftprintf -L libft/ -lft -lncurses
FLAGS = -Wall -Werror -Wextra
INC = -I libft/ -I ft_printf/
SRC = main.c \
connect_four.c \
input.c \
render.c \
computer.c \
check.c \
easy.c \
easy_util.c \
easy_verif.c \
medium.c \
medium_verif.c \
medium_util.c \
vector.c \
vector_mem.c \
render_ncurses.c \
OBJ = $(SRC:.c=.o) #interesting compilation method
all : $(NAME)
$(NAME) : $(OBJ)
@make -C libft/
@make -C ft_printf/
@$(CC) $(FLAGS) $(INC) $(OBJ) -o $(NAME) $(LIB)
%.o: %.c
@$(CC) -o $@ -c $< $(FLAGS)
clean :
@make -C libft/ clean
@make -C ft_printf/ clean
@$(RM) $(OBJ)
fclean : clean
@make -C libft/ fclean
@make -C ft_printf/ fclean
@$(RM) $(NAME)
re : fclean all
.PHONY : re fclean clean all