-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·130 lines (112 loc) · 3.95 KB
/
Makefile
File metadata and controls
executable file
·130 lines (112 loc) · 3.95 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jwolf <jwolf@42.FR> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/06/06 14:47:39 by ibotha #+# #+# #
# Updated: 2018/09/03 15:05:14 by jwolf ### ########.fr #
# #
# **************************************************************************** #
NAME = RT
OBJ = src/main.o src/properties.o src/raytracer.o src/loading.o src/blocks.o \
src/scene/scene.o src/scene/handler.o src/scene/scenehandle.o \
src/intersections/intersections.o src/intersections/sphere.o \
src/intersections/light.o src/intersections/cone.o \
src/scene/save.o src/intersections/polygon.o src/intersections/polygon2.o \
src/intersections/planes.o src/intersections/cylinder.o \
src/scene/misc.o src/scene/name_handler.o src/scene/search.o \
src/scene/calc.o src/scene/typehandler.o src/scene/handler2.o \
src/scene/descene.o src/scene/descene2.o src/scene/handler3.o\
src/scene/objects.o src/intersections/shadow.o \
src/obj_parser/obj_reader.o src/obj_parser/parse_obj.o \
src/obj_parser/parse_obj_two.o src/obj_parser/parse_obj_three.o \
src/post_proc/stereo.o src/post_proc/aa.o src/post_proc/oldschool.o \
src/scene/png.o src/intersections/trace.o src/vectorprint.o \
src/scene/get_prop_name.o \
FLAGS = -Wall -Werror -Wextra -I inc -I libft -Ofast -I Renderer -I Vectorlib \
-I src/scene -I src/intersections -I bmplib/inc/ -I src/obj_parser/ \
-I upng
LIBS = libft/libft.a Vectorlib/vectorlib.a bmplib/libbmp.a Renderer/renderer.a \
upng/libpng.a
DEP = inc/rt.h
all:
make lib
make $(NAME)
$(NAME): $(LIBS) $(OBJ)
@echo "[ \x1b[32mLinking $@ \x1b[0m]"
@gcc $(OBJ) $(FLAGS) $(LIBS) -o $(NAME) -lmlx -framework OpenGL -framework AppKit && echo "\x1b[35m***$(NAME) Ready***\x1b[0m"
$(OBJ): %.o: %.c $(DEP)
@echo "[ \x1b[36m \x1b[32mAdding \x1b[33m$@ \x1b[0m]"
@gcc -c $*.c $(FLAGS) -o $@
lib:
@make -C libft
@make -C Vectorlib
@make -C Renderer
@make -C bmplib
@make -C upng
patience:
@clear
@echo "\x1b[35mWasting Time: \x1b[32m[# ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[## ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[#### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[##### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[###### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[####### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[######## ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[######### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[########## ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[########### ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[############ ]"
@sleep 1
@clear;
@echo "\x1b[35mWasting Time: \x1b[32m[#############]"
@sleep 1
@clear;
@curl parrot.live
clean:
@echo "[ \x1b[32mCleaning... \x1b[0m]"
@make clean -C libft
@make clean -C Renderer
@make clean -C Vectorlib
@make clean -C bmplib
@make clean -C upng
@rm -f $(OBJ)
fclean: clean
@echo "[ \x1b[32mFull \x1b[0m]"
@make -C bmplib fclean
@make -C Renderer fclean
@make -C Vectorlib fclean
@make -C libft fclean
@make -C upng fclean
@rm -f $(NAME)
re: fclean all
run: all
./$(NAME) g
wolf: all
./$(NAME) scenes/cylinder.xml
.PHONY: all clean fclean re patience libft run