-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (77 loc) · 1.49 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
NAME = cub3D
SRCS = src/main.c \
src/init.c \
src/parsing/check_info.c \
src/parsing/check_map.c \
src/parsing/parse.c \
src/raycasting/move.c \
src/raycasting/raycast.c \
src/raycasting/render.c \
src/utils/color.c \
src/utils/errors.c \
src/utils/hooks.c \
src/utils/utils_mlx.c \
src/utils/utils.c
HEADER = cub.h
OBJS = $(SRCS:.c=.o)
LIBFT = libft.a
LIBFTDIR = ./libft/
MLX = libmlx.a
MLXDIR = ./mlx/
CC = gcc
CFLAGS = -Wall -Wextra -Werror -I .
MLXFLAGS = -Llibft -Lmlx -lmlx -lz -framework OpenGL -framework Appkit
all: $(NAME)
$(NAME): $(OBJS) $(HEADER)
make -C ./libft/
make -C $(MLXDIR)
$(CC) $(CFLAGS) $(LIBFTDIR)$(LIBFT) $(OBJS) $(MLXFLAGS) -o $(NAME)
%.o: %.c
$(CC) -c $(CFLAGS) -Imlx -c $< -o $@
clean:
rm -f $(OBJS)
make clean -C $(MLXDIR)
fclean: clean
rm -f $(NAME)
rm -f $(MLX)
re: fclean all
map:
make
./cub3D maps/map.cub
residential:
make
./cub3D maps/residential.cub
huisjes:
make
./cub3D maps/huisjes.cub
jungle:
make
./cub3D maps/jungle.cub
nontex:
make
./cub3D maps/nontex.cub
jungle2:
make
./cub3D maps/jungle2.cub
trip:
make
./cub3D maps/trip.cub
map2:
make
./cub3D maps/map2.cub
non:
make
./cub3D maps/mapss.cub
wrongarg:
make
./cub3D maps/mapss.cub hallo
debug:
make
./cub3D maps/valid_maps/valid_map_area_008.cub
invalid:
make
./cub3D maps/invalid_maps/invalid_map_area_014.cub
invalid_res:
make
./cub3D maps/invalid_maps/invalid_res_000.cub
.PHONY: all clean fclean re debug