-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (37 loc) · 1.46 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
CXX=g++
CXXFLAGS= -std=c++11 -g
OUTFILE=raytracer1d
.DEFAULT_GOAL := all
all: $(OUTFILE)
$(OUTFILE): main.o Input.o Output.o RayCast.o Ray.o Sphere.o LightSource.o Face.o Material.o Intersection.o Texture.o
make deletePrevious
$(CXX) $(CXXFLAGS) main.o Input.o Output.o RayCast.o Ray.o Sphere.o LightSource.o Face.o Material.o Intersection.o Texture.o -o $(OUTFILE)
main.o: src/main.cpp
$(CXX) $(CXXFLAGS) -c src/main.cpp -o main.o
Ray.o: src/Ray.cpp src/Ray.h
$(CXX) $(CXXFLAGS) -c src/Ray.cpp -o Ray.o
Output.o: src/Output.cpp src/Output.h
$(CXX) $(CXXFLAGS) -c src/Output.cpp -o Output.o
Input.o: src/Input.cpp src/Input.h
$(CXX) $(CXXFLAGS) -c src/Input.cpp -o Input.o
RayCast.o: src/RayCast.cpp src/RayCast.h
$(CXX) $(CXXFLAGS) -c src/RayCast.cpp -o RayCast.o
Sphere.o: src/Sphere.h src/Sphere.cpp
$(CXX) $(CXXFLAGS) -c src/Sphere.cpp -o Sphere.o
LightSource.o: src/LightSource.h src/LightSource.cpp
$(CXX) $(CXXFLAGS) -c src/LightSource.cpp -o LightSource.o
Face.o: src/Face.h src/Face.cpp
$(CXX) $(CXXFLAGS) -c src/Face.cpp -o Face.o
Material.o: src/Material.h src/Material.cpp
$(CXX) $(CXXFLAGS) -c src/Material.cpp -o Material.o
Intersection.o: src/Intersection.h src/Intersection.cpp
$(CXX) $(CXXFLAGS) -c src/Intersection.cpp -o Intersection.o
Texture.o: src/Texture.h src/Texture.cpp
$(CXX) $(CXXFLAGS) -c src/Texture.cpp -o Texture.o
.PHONY: all clean
deletePrevious:
rm -f raytracer1*
postClean:
rm -f *.o
clean:
rm -f *.o raytracer1* *.ppm