-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (47 loc) · 1.83 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
CXXFLAGS = -Wall -I.
FLAGS = -lpthread -lX11
all: raytracer exec clean
test: test.o point3D.o
g++ -o test test.o point3D.o $(FLAGS)
test.o: Main/test.cpp
g++ -c $(CXXFLAGS) Main/test.cpp $(FLAGS)
execTest: test
./test
raytracer: raytracer4.o sphere.o plane.o triangle.o rect.o BB.o grid.o ray.o directional_l.o point_l.o area_l.o func.o point3D.o
g++ -o raytracer raytracer4.o sphere.o plane.o triangle.o rect.o BB.o grid.o ray.o directional_l.o point_l.o area_l.o func.o point3D.o $(FLAGS)
raytracer.o: Main/raytracer.cpp
g++ -c $(CXXFLAGS) Main/raytracer.cpp $(FLAGS)
raytracer2.o: Main/raytracer2.cpp
g++ -c $(CXXFLAGS) Main/raytracer2.cpp $(FLAGS)
raytracer3.o: Main/raytracer3.cpp
g++ -c $(CXXFLAGS) Main/raytracer3.cpp $(FLAGS)
raytracer4.o: Main/raytracer4.cpp
g++ -c $(CXXFLAGS) Main/raytracer4.cpp $(FLAGS)
point3D.o: Util/point3D.cpp Util/point3D.h
g++ -c $(CXXFLAGS) Util/point3D.cpp
sphere.o: Shapes/sphere.cpp Shapes/sphere.h
g++ -c $(CXXFLAGS) Shapes/sphere.cpp
plane.o: Shapes/plane.cpp Shapes/plane.h
g++ -c $(CXXFLAGS) Shapes/plane.cpp
triangle.o: Shapes/triangle.cpp Shapes/triangle.h
g++ -c $(CXXFLAGS) Shapes/triangle.cpp
rect.o: Shapes/rect.cpp Shapes/rect.h
g++ -c $(CXXFLAGS) Shapes/rect.cpp
BB.o: Shapes/BB.cpp Shapes/BB.h
g++ -c $(CXXFLAGS) Shapes/BB.cpp
grid.o: Shapes/grid.cpp Shapes/grid.h
g++ -c $(CXXFLAGS) Shapes/grid.cpp
ray.o: Util/ray.cpp Util/ray.h
g++ -c $(CXXFLAGS) Util/ray.cpp
directional_l.o: Lights/directional_l.cpp Lights/directional_l.h
g++ -c $(CXXFLAGS) Lights/directional_l.cpp
point_l.o: Lights/point_l.cpp Lights/point_l.h
g++ -c $(CXXFLAGS) Lights/point_l.cpp
area_l.o: Lights/area_l.cpp Lights/area_l.h
g++ -c $(CXXFLAGS) Lights/area_l.cpp
func.o: Util/func.cpp Util/func.h
g++ -c $(CXXFLAGS) Util/func.cpp
exec: raytracer
./raytracer
clean:
rm -f raytracer test **/*.o *.o