-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (73 loc) · 1.99 KB
/
Makefile
File metadata and controls
87 lines (73 loc) · 1.99 KB
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
CC = gcc -Wall -Wextra -Werror
RM = rm -rf
NAME = miniRT
NORME = norminette
INCS_DIR = ./includes/
MLX_DIR = ./libraries/mlx/
MLX_INC = -I$(MLX_DIR)
MLX_NAME = $(MLX_DIR)libmlx.a
LIB_DIR = ./libraries/libft/
LIB_INC = -I$(LIB_DIR)includes/
LIB_NAME = $(LIB_DIR)libftfull.a
LIBS = -lXext -lX11 -lm
INCS = $(addprefix $(INCS_DIR), minirt.h mlx_code.h)
SRCS = $(addprefix ./sources/, minirt.c \
display/bitmap.c \
display/camera.c \
display/errors.c \
display/events.c \
display/init.c \
display/legend.c \
display/progress.c \
display/rendering.c \
parse/converter.c \
parse/count.c \
parse/global.c \
parse/parse.c \
parse/skip.c \
parse/objs/circle.c \
parse/objs/closed_cylinder.c \
parse/objs/cone.c \
parse/objs/cube.c \
parse/objs/cylinder.c \
parse/objs/plane.c \
parse/objs/pyramide.c \
parse/objs/sphere.c \
parse/objs/square.c \
parse/objs/triangle.c \
parse/options.c \
raytracing/color.c \
raytracing/inter_0sphere.c \
raytracing/inter_1plane.c \
raytracing/inter_2square.c \
raytracing/inter_3cylinder.c \
raytracing/inter_4triangle.c \
raytracing/inter_5cone.c \
raytracing/inter_6circle.c \
raytracing/inter.c \
raytracing/filters.c \
vector/color_operations.c \
vector/ray_operations.c \
vector/vector_geometry.c \
vector/vector_norm.c \
vector/vector_operations.c)
OBJS = $(SRCS:.c=.o)
%.o : %.c
@$(CC) -I$(INCS_DIR) $(LIB_INC) $(MLX_INC) -c $< -o $@
all : $(NAME)
$(NAME) : $(OBJS) $(INCS)
@make --silent -C $(LIB_DIR)
@make --silent -C $(MLX_DIR)
@$(CC) $(OBJS) $(LIB_NAME) $(MLX_NAME) -L$(LIB_DIR) -L$(MLX_DIR) \
$(LIB_INC) $(MLX_INC) -I$(INCS_DIR) $(LIBS) -o $(NAME)
@echo "miniRT compiled"
clean:
@$(MAKE) clean --silent -C ./libraries/libft/
@$(RM) $(OBJS)
fclean : clean
@$(MAKE) fclean --silent -C ./libraries/libft/
@$(RM) $(NAME)
docu :
@$(MAKE) --silent -C ./documentation/
re : fclean all
.PHONY : all clean fclean re docu