-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
129 lines (96 loc) · 2.41 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
##
## Makefile for 102cipher in /home/raphael.goulmot/rendu/102cipher
##
## Made by Raphaël Goulmot
## Login <raphael.goulmot@epitech.net>
##
## Started on Tue Nov 29 15:57:16 2016 Raphaël Goulmot
## Last update Sun May 7 16:18:26 2017 Raphaël Goulmot
##
CC = gcc
SRC = src/utils/my_putstr_err.c \
src/utils/my_putchar.c \
src/utils/my_putstr.c \
src/utils/my_strlen.c \
src/utils/my_getnbr.c \
src/utils/my_put_nbr.c \
src/utils/my_is.c \
src/utils/my_string.c \
src/utils/split.c \
src/utils/line.c \
src/utils/my_printf.c \
src/utils/my_base.c \
src/utils/my_put_tab.c \
include/line.h \
include/utils.h \
include/gen.h \
include/astar.h
GEN = generator/src/main_gene.c \
generator/src/gen.c \
generator/src/check.c \
generator/src/move.c
GEN_B = generator/bonus/src/main_gene.c \
generator/bonus/src/gen.c \
generator/bonus/src/check.c \
generator/bonus/src/move.c
ASTAR = astar/src/main.c \
astar/src/solve.c \
astar/src/resolve.c
DEPTH = depth/src/main.c \
depth/src/solve.c \
depth/src/resolve.c
BREADTH = breadth/src/main.c \
breadth/src/solve.c \
breadth/src/resolve.c \
breadth/src/get_room.c
TOURNAMENT = tournament/src/main.c \
tournament/src/solve.c \
tournament/src/resolve.c
OBJ_G = $(SRC:.c=.o) \
$(GEN:.c=.o)
OBJ_GB = $(SRC:.c=.o) \
$(GEN_B:.c=.o)
OBJ_A = $(SRC:.c=.o) \
$(ASTAR:.c=.o)
OBJ_D = $(SRC:.c=.o) \
$(DEPTH:.c=.o)
OBJ_B = $(SRC:.c=.o) \
$(BREADTH:.c=.o)
OBJ_T = $(SRC:.c=.o) \
$(TOURNAMENT:.c=.o)
TMP = $(OBJ_G:.h=.h~) \
$(OBJ_A:.h=.h~) \
$(OBJ_D:.h=.h~) \
$(OBJ_B:.h=.h~) \
$(OBJ_T:.h=.h~) \
$(OBJ_GB:.h=.h~)
CFLAGS = -W -Wextra -Werror -Iinclude -g3 -pedantic
NAME_G = generator/generator
NAME_GB = generator/bonus/generator
NAME_A = astar/solver
NAME_D = depth/solver
NAME_B = breadth/solver
NAME_T = tournament/solver
all: $(NAME_G) $(NAME_A) $(NAME_D) $(NAME_B) $(NAME_T) $(NAME_GB)
$(NAME_G): $(OBJ_G)
gcc $(OBJ_G) -o $(NAME_G) $(CFLAGS)
$(NAME_A): $(OBJ_A)
gcc $(OBJ_A) -o $(NAME_A) $(CFLAGS)
$(NAME_D): $(OBJ_D)
gcc $(OBJ_D) -o $(NAME_D) $(CFLAGS)
$(NAME_B): $(OBJ_B)
gcc $(OBJ_B) -o $(NAME_B) $(CFLAGS)
$(NAME_T): $(OBJ_T)
gcc $(OBJ_T) -o $(NAME_T) $(CFLAGS)
$(NAME_GB): $(OBJ_GB)
gcc $(OBJ_GB) -o $(NAME_GB) $(CFLAGS)
clean:
rm -f $(TMP)
fclean: clean
rm -f $(NAME_G)
rm -f $(NAME_A)
rm -f $(NAME_D)
rm -f $(NAME_B)
rm -f $(NAME_T)
rm -f $(NAME_GB)
re: fclean all