-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
108 lines (94 loc) · 3.03 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rmakinen <rmakinen@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/04/05 13:30:50 by rmakinen #+# #+# #
# Updated: 2023/10/23 08:23:55 by rmakinen ### ########.fr #
# #
# **************************************************************************** #
NAME = miniRT
SRC = main.c \
handle_window.c \
scene.c \
vectors/vector_math.c \
vectors/vector_math2.c \
shader/normals.c \
shader/light.c \
shader/shadows.c \
parser/ft_atox.c \
parser/ft_print_error.c \
parser/get_ambient_light.c \
parser/get_new_object.c \
parser/get_camera.c \
parser/get_light_source.c \
parser/get_object_identifier.c \
parser/parser_utils.c \
parser/parser_utils2.c \
parser/parser.c \
shader/colors.c \
shader/color_math.c \
shader/color_math2.c \
shader/object_colors.c \
ray_functions/ray_hit.c \
ray_functions/object_intersection.c \
ray_functions/cylinder_utils1.c \
ray_functions/cylinder_utils2.c \
ray_functions/cylinder_utils3.c \
check_camera_pos.c \
OBJ = main.o \
handle_window.o \
scene.o \
vector_math.o \
vector_math2.o \
normals.o \
light.o \
shadows.o \
ft_atox.o \
ft_print_error.o \
get_camera.o \
get_light_source.o \
get_ambient_light.o \
get_new_object.o \
get_object_identifier.o \
parser_utils.o \
parser_utils2.o \
parser.o \
ray_hit.o \
colors.o \
color_math.o \
color_math2.o \
object_colors.o \
object_intersection.o \
cylinder_utils1.o \
cylinder_utils2.o \
cylinder_utils3.o \
check_camera_pos.o \
INCL = includes/minirt.h \
includes/parser.h \
includes/vectors.h \
LIB_DIR = includes
#DEBUG = -g -fsanitize=address,undefined
FLAGS = -Wall -Wextra -Werror -O2
SPECULAR = -D SPECULAR=1
all: $(NAME)
$(NAME): $(SRC) $(INCL)
@cd libft && $(MAKE)
@cc $(FLAGS) -c $(SRC)
#@cc $(FLAGS) $(OBJ) -I$(LIB_DIR) libft/libft.a -L /usr/local/include -lmlx -framework OpenGL -framework AppKit -o $(NAME)
@cc $(FLAGS) $(OBJ) libft/libft.a mlx/libmlx.a -framework OpenGL -framework AppKit -o $(NAME)
specular: $(SRC) $(INCL)
@cd libft && $(MAKE)
@cc $(FLAGS) $(SPECULAR) -c $(SRC)
#@cc $(FLAGS) $(OBJ) -I$(LIB_DIR) libft/libft.a -L /usr/local/include -lmlx -framework OpenGL -framework AppKit -o $(NAME)
@cc $(FLAGS) $(OBJ) libft/libft.a mlx/libmlx.a -framework OpenGL -framework AppKit -o $(NAME)
clean:
@cd libft && make clean
@rm -f $(OBJ)
fclean: clean
@cd libft && make fclean
@rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re