-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (59 loc) · 1.91 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mlaize <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2014/01/24 10:19:42 by mlaize #+# #+# #
# Updated: 2014/03/09 22:25:59 by mlaize ### ########.fr #
# #
# **************************************************************************** #
NAME = puissance4
SRC = main.c \
estimate_map.c \
free_map.c \
ft_exit.c \
ft_get_random.c \
is_end_game.c \
is_full.c \
is_possible.c \
map_calcul.c \
parse_arg.c \
play_move.c \
print_clear_map.c \
read_ia.c \
read_player.c
SRCDIR = src/
OBJDIR = obj/
HEADDIR = includes/
LIBDIR = libft/
SRC := $(addprefix $(SRCDIR), $(SRC))
OBJ = $(SRC:$(SRCDIR)%.c=$(OBJDIR)%.o)
CC = clang
FLAGS = -Wextra -Wall -Werror
$(NAME): all
all: $(OBJ)
@make -C $(LIBDIR) all
@echo "finalisation de $(NAME)..."
@$(CC) $(FLAGS) $(OBJ) $(LIBDIR)libft.a -I$(HEADDIR) -o $(NAME)
$(OBJDIR)%.o: $(SRCDIR)%.c
@echo "compilation de $^..."
@$(CC) $(FLAGS) -I$(LIBDIR)includes -I$(HEADDIR) -c -o $@ $^
clean:
@echo "suppression des objets..."
@-rm $(OBJ)
fclean: clean
@-rm $(NAME)
ffclean: fclean
make -C $(LIBDIR) fclean
re:
@echo "recompilation : Full"
@make -C $(LIBDIR) re
@make fclean
@make all
relite:
@echo "recompilation : Lite"
@make fclean
@make all
.PHONY: all clean fclean ffclean re relite