-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
67 lines (52 loc) · 1.24 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
NAME = cub3D
SRC = cub3dmain.c \
mlx_func.c \
raycast_func_1.c \
raycast_func_2.c \
keyboard.c \
keyboard_2.c \
sprite.c \
sprite_func_1.c \
sprite_func_2.c \
ceiling_floor.c \
screenshot_bmp.c \
texture_wall.c \
texture_init.c \
parse_cub.c \
parse_cub_2.c \
parse_cub_3.c \
parse_cub_4.c \
parse_cub_5.c \
parse_cub_6.c \
pm_resolution.c \
pm_rgb_color.c \
pm_texture.c
SRCS = $(addprefix srcs/, $(SRC))
OBJS = $(SRCS:.c=.o)
CC = gcc
INC = -I ./ -I ./libft
FLAGS = -Wall -Wextra -Werror -g
LIBFT = -L libft -lft
MLX = -I minilibx -L minilibx-linux -lmlx
SYS = -lXext -lX11 -lbsd -lm
all:$(NAME)
$(NAME):
@make -C ./libft
@make -C ./minilibx-linux
@$(CC) ${FLAGS} ${SRCS} ${LIBFT} ${MLX} ${SYS} -o ${NAME}
@echo "\n\033[0;33mCompile cub3D done!"
clean:
@/bin/rm -f $(OBJ)
@make clean -C ./libft
@echo "\n\033[0;33mClean .o files done!"
fclean: clean
@/bin/rm -f $(NAME)
@/bin/rm -f cub3D.bmp
@make fclean -C ./libft
@make clean -C ./minilibx-linux
@echo "\n\033[0;33mScreenshot clean done!"
@echo "\033[0;33mClean all files done!"
re: fclean all
norm :
norminette *.h ./libft/*.c ./libft/*.h ./srcs/*.c
.PHONY: all clean fclean re norm