-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 2.18 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aymaatou <aymaatou@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/11/09 18:00:47 by aymaatou #+# #+# #
# Updated: 2020/12/07 20:35:57 by aymaatou ### ########.fr #
# #
# **************************************************************************** #
NAME = cub3D
LIB = Lib/{ft_atoi,ft_bzero,ft_calloc,ft_isalnum,ft_isalpha,ft_isdigit,ft_memcmp,ft_putstr,ft_split,ft_strdub_strjoin,ft_strlen,ft_strtrim}.c
SRC = srcs/{cub3d_raycasting,cub3d_tools,cub3d_tools_2,ft_draw,ft_file_handling,ft_file_handling_2,ft_filecheck,ft_filecheck_2,ft_game,ft_intersections,ft_mlx_loops,ft_screenshot,get_next_line}.c
CC = gcc -I /usr/local/include -L /usr/local/lib/ -lmlx -framework OpenGL -framework AppKit -Wall -Wextra -Werror libmlx.dylib -fsanitize=address -g
REG = srcs/{cub3d_sprite,ft_3drendring}.c
BONUS = bonus/{cub3d_sprite_bonus,ft_3drendring_bonus}.c
MAP = maps/map3.cub
all : $(NAME)
$(NAME):
@echo "\nCompilation of MLX lib: [\033[1;32mDONE\033[m]"
@$(CC) cub3d.c $(LIB) $(SRC) $(REG) -o cub3D
@echo "Compilation of $(NAME): [\033[1;32mDONE\033[m]"
clean :
@rm -rf $(NAME) cub3D.dSYM *.
@echo "Deleting Files: [\033[1;31mDONE\033[m]"
fclean : clean
@rm -rf $(NAME) cub3D.dSYM first_rendered_image.bmp
re : fclean all
run :
@./$(NAME) $(MAP)
save :
@./$(NAME) $(MAP) --save
@echo "Rendring image $(NAME): [\033[1;32mDONE\033[m]"
bonus : fclean
@echo "\nCompilation of MLX lib: [\033[1;32mDONE\033[m]"
@$(CC) cub3d.c $(LIB) $(SRC) $(BONUS) -o cub3D
@echo "Compilation of $(NAME): [\033[1;32mDONE\033[m][\033[1;36mBONUS\033[m]"
.PHONY : all clean fclean re $(NAME)