-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (25 loc) · 1.22 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
BREWPATH = $(shell brew --prefix)
CC = g++
CFLAGS = -g -std=c++11 -Wno-deprecated-register -Wno-deprecated-declarations -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
INCFLAGS = -I./include -I$(BREWPATH)/include
LDFLAGS = -framework GLUT -framework OpenGL -L$(BREWPATH)/lib -lfreeimage
RM = /bin/rm -f
all: SceneViewer
SceneViewer: main.o Shader.o Camera.o Obj.o Scene.o RTObj.o RTScene.o shaders/lighting.frag shaders/projective.vert
$(CC) -o SceneViewer main.o Shader.o Camera.o Obj.o Scene.o RTObj.o RTScene.o $(LDFLAGS)
main.o: main.cpp include/hw3AutoScreenshots.h
$(CC) $(CFLAGS) $(INCFLAGS) -c main.cpp
Shader.o: src/Shader.cpp
$(CC) $(CFLAGS) $(INCFLAGS) -c src/Shader.cpp
Camera.o: src/Camera.cpp include/Camera.h
$(CC) $(CFLAGS) $(INCFLAGS) -c src/Camera.cpp
Obj.o: src/Obj.cpp include/Obj.h
$(CC) $(CFLAGS) $(INCFLAGS) -c src/Obj.cpp
Scene.o: src/Scene.cpp src/Scene.inl include/Scene.h
$(CC) $(CFLAGS) $(INCFLAGS) -c src/Scene.cpp
RTObj.o: src/RTVersion/RTObj.cpp include/RTVersion/RTObj.h
$(CC) $(CFLAGS) $(INCFLAGS) -c src/RTVersion/RTObj.cpp
RTScene.o: src/RTVersion/RTScene.cpp src/RTVersion/RTScene.inl include/RTVersion/RTScene.h
$(CC) $(CFLAGS) $(INCFLAGS) -c src/RTVersion/RTScene.cpp
clean:
$(RM) *.o SceneViewer