-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (78 loc) · 3.08 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: inlim <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/12/19 16:29:11 by haekang #+# #+# #
# Updated: 2024/01/16 13:32:54 by inlim ### ########.fr #
# #
# **************************************************************************** #
CC = cc
CFLAGS = -Wall -Wextra -Werror
MFLAGS=-framework OpenGL -framework Appkit
NAME = miniRT
HEADERS = ./includes
MLX_DIR = ./includes/mlx
SRCS = ./sources/mrt_main/main.c\
./sources/mrt_parse/mrt_parse.c\
./sources/mrt_parse/mrt_parse_init_info.c\
./sources/mrt_parse/mrt_parse_insert_ambient.c\
./sources/mrt_parse/mrt_parse_insert_camera.c\
./sources/mrt_parse/mrt_parse_insert_cylinder.c\
./sources/mrt_parse/mrt_parse_insert_element.c\
./sources/mrt_parse/mrt_parse_insert_light.c\
./sources/mrt_parse/mrt_parse_insert_plane.c\
./sources/mrt_parse/mrt_parse_insert_sphere.c\
./sources/mrt_parse/mrt_parse_insert_util.c\
./sources/mrt_parse/mrt_parse_load_file.c\
./sources/mrt_parse/mrt_parse_return_file_path.c\
./sources/mrt_render/mrt_cylinder_util.c\
./sources/mrt_render/mrt_get_camera_info.c\
./sources/mrt_render/mrt_get_color.c\
./sources/mrt_render/mrt_mlx_loop.c\
./sources/mrt_render/mrt_ray_trace.c\
./sources/mrt_render/mrt_ray_trace_cylinder.c\
./sources/mrt_render/mrt_ray_trace_plane.c\
./sources/mrt_render/mrt_ray_trace_sphere.c\
./sources/mrt_render/mrt_render.c\
./sources/mrt_render/mrt_render_util.c\
./sources/mrt_render/mrt_shadow.c\
./sources/mrt_util/mrt_atod.c\
./sources/mrt_util/mrt_atoi.c\
./sources/mrt_util/mrt_bit_get.c\
./sources/mrt_util/mrt_bit_increase.c\
./sources/mrt_util/mrt_get_next_line.c\
./sources/mrt_util/mrt_lst_add_back.c\
./sources/mrt_util/mrt_lst_new_node.c\
./sources/mrt_util/mrt_print_err.c\
./sources/mrt_util/mrt_split.c\
./sources/mrt_util/mrt_split_size.c\
./sources/mrt_util/mrt_strchr.c\
./sources/mrt_util/mrt_strcmp.c\
./sources/mrt_util/mrt_strdup.c\
./sources/mrt_util/mrt_strjoin.c\
./sources/mrt_util/mrt_strlcpy.c\
./sources/mrt_util/mrt_strlen.c\
./sources/mrt_util/mrt_substr.c\
./sources/mrt_vec_util/mrt_vec_1.c\
./sources/mrt_vec_util/mrt_vec_2.c\
./sources/mrt_vec_util/mrt_vec_3.c\
./sources/mrt_vec_util/mrt_vec_4.c
OBJS = $(SRCS:%.c=%.o)
all: $(NAME)
$(NAME): $(OBJS) $(HEADERS)
make -C $(MLX_DIR)
$(CC) $(MFLAGS) $(OBJS) $(MLX_DIR)/libmlx.a -o $(NAME)
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -Rf $(OBJS)
make -C $(MLX_DIR) clean
fclean: clean
rm -Rf $(NAME)
re:
make fclean
make all
.PHONY: all clean fclean re