-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
77 lines (59 loc) · 1.54 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
NAME = cub3D
B_NAME = cub3D_bonus
CC = gcc
CFLAG = -g3 -fsanitize=address
INCLUDES = ./mandatory/cub3d.h
B_INCLUDES = ./bonus/cub3d_bonus.h
OPTION = -L ./mlxopengl -lmlx -framework OpenGL -framework AppKit -lm -L ./gnl -lftgnl -I $(INCLUDES)
B_OPTION = -L ./mlxopengl -lmlx -framework OpenGL -framework AppKit -lm -L ./gnl -lftgnl -I $(B_INCLUDES)
SRCS = ./mandatory/main.c\
./mandatory/keys.c\
./mandatory/check.c\
./mandatory/mapcheck.c\
./mandatory/map.c\
./mandatory/error.c\
./mandatory/utils.c\
./mandatory/mapgrid.c\
./mandatory/unit_and_sprite.c\
./mandatory/draw.c\
./mandatory/cub3d.c\
./mandatory/ray.c\
./mandatory/ray2.c\
./mandatory/move.c\
./mandatory/bitmap.c\
./mandatory/sprite.c
B_SRCS = ./bonus/main_bonus.c\
./bonus/keys_bonus.c\
./bonus/check_bonus.c\
./bonus/mapcheck_bonus.c\
./bonus/map_bonus.c\
./bonus/error_bonus.c\
./bonus/utils_bonus.c\
./bonus/mapgrid_bonus.c\
./bonus/unit_and_sprite_bonus.c\
./bonus/draw_bonus.c\
./bonus/cub3d_bonus.c\
./bonus/ray_bonus.c\
./bonus/ray2_bonus.c\
./bonus/move_bonus.c\
./bonus/bitmap_bonus.c\
./bonus/sprite_bonus.c\
./bonus/sky_bonus.c
OBJS = $(SRCS:%.c=%.o)
B_OBJS = $(B_SRCS:%.c=%.o)
all: $(NAME)
$(NAME) : $(OBJS)
make -C ./gnl
$(CC) $(CFLAG) -o ${NAME} $(OBJS) $(OPTION)
bonus : $(B_NAME)
$(B_NAME): $(B_OBJS)
make -C ./gnl
$(CC) $(CFLAG) -o $(B_NAME) $(B_OBJS) $(B_OPTION)
clean:
make clean -C ./gnl
rm -f $(OBJS)
rm -f ${B_OBJS}
fclean: clean
make fclean -C ./gnl
rm -f $(NAME) $(B_NAME)
re: fclean all