-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
123 lines (99 loc) · 3.74 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ysoroko <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/01/21 15:58:16 by ysoroko #+# #+# #
# Updated: 2021/03/01 11:45:24 by ysoroko ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
CFLAGS = -Wall -Wextra -Werror
INCLUDE = -I include
BONUS = -D BONUS=1
SAVE = --save
FRAMEWORKS = -lmlx -framework OpenGL -framework AppKit
LIBFT = @ cd libft && make ;
BONUS_MAP = "maps/ultimate_bonus_map.cub"
STANDARD_MAP = "maps/map9.cub"
SRC = get_next_line/get_next_line_utils.c \
get_next_line/get_next_line.c \
\
libft/libft.a \
\
extract_t_map/ft_errors_utils.c \
extract_t_map/ft_extract_t_map.c \
extract_t_map/ft_map_errors_utils.c \
extract_t_map/ft_map_to_list.c \
extract_t_map/ft_parameters_errors.c \
extract_t_map/ft_parameters_utils.c \
extract_t_map/ft_free_and_new_functions.c \
extract_t_map/ft_check_str_tab_errors.c \
\
graphic_functions/draw_functions/ft_draw_filled_in_forms.c \
\
graphic_functions/new_free_error_functions/ft_error_utils.c \
graphic_functions/new_free_error_functions/ft_new_geometry_forms.c \
graphic_functions/new_free_error_functions/ft_new_structures.c \
\
graphic_functions/utils/ft_distance_utils.c \
graphic_functions/utils/ft_image_functions.c \
graphic_functions/utils/ft_rgb_to_trgb.c \
\
graphic_functions/raycaster/ft_raycaster.c \
graphic_functions/raycaster/ft_new_raycaster.c \
graphic_functions/raycaster/ft_ray_textures.c \
graphic_functions/raycaster/ft_sprites.c \
graphic_functions/raycaster/ft_new_sprite_ray.c \
\
graphic_functions/move_functions/ft_move_in_map.c \
graphic_functions/move_functions/ft_turn_in_map.c \
\
graphic_functions/ft_window_start.c \
graphic_functions/ft_hooks_functions.c \
\
save/ft_extract_rgb.c \
save/ft_save_to_bmp.c \
\
libmlx.a \
\
main.c
BONUS_SRC = bonus/ft_music_bonus.c \
bonus/ft_shadows_bonus.c \
bonus/ft_hud_bonus.c \
bonus/ft_damage_bonus.c \
bonus/ft_knife_bonus.c \
bonus/ft_floor_and_ceiling_bonus.c \
bonus/ft_draw_minimap_bonus.c \
bonus/ft_move_bonus.c \
bonus/ft_new_raycaster_bonus.c \
bonus/ft_draw_line_bonus.c \
bonus/ft_free_sprite_ray_bonus.c
OBJS = $(SRC:.c=.o)
NAME = cub3D
all: $(NAME)
$(NAME):
@$(LIBFT)
@$(CC) $(FRAMEWORKS) $(CFLAGS) $(SRC) $(INCLUDE) -o $(NAME)
bonus:
@$(LIBFT)
@$(CC) $(FRAMEWORKS) $(CFLAGS) $(BONUS) $(SRC) $(BONUS_SRC) $(INCLUDE) -o $(NAME)
clean:
@cd libft && make clean
fclean: clean
@rm -rf cub3D
@rm -rf save.bmp
@cd libft && make fclean
re: fclean all
run:
@$(LIBFT)
@$(CC) $(FRAMEWORKS) $(SRC) $(INCLUDE) -o $(NAME) && ./$(NAME) $(STANDARD_MAP)
brun:
@$(LIBFT)
@$(CC) $(FRAMEWORKS) $(CFLAGS) $(BONUS) $(SRC) $(BONUS_SRC) $(INCLUDE) -o $(NAME) && ./$(NAME) $(BONUS_MAP)
save:
@$(LIBFT)
@$(CC) $(FRAMEWORKS) $(SRC) $(INCLUDE) -o $(NAME) && ./$(NAME) $(STANDARD_MAP) $(SAVE)
.PHONY: all bonus clean fclean re run brun save