-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 1.19 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
CXX = g++
CFLAGS = -Wall -g
ifeq ($(shell uname), Darwin)
LIBS = -framework GLUT -framework OpenGL -framework Cocoa
else
LIBS = -lglut -lGL -lGLU -lGLEW
endif
FREEGLUT = /afs/nd.edu/user37/ccl/software/external/freeglut
ifneq "$(wildcard $(FREEGLUT))" ""
INCPATH += -I$(FREEGLUT)/include
LIBPATH += -L$(FREEGLUT)/lib -Wl,--rpath -Wl,$(FREEGLUT)/lib
endif
GLEW = /afs/nd.edu/user37/ccl/software/external/glew
ifneq "$(wildcard $(GLEW))" ""
INCPATH += -I$(GLEW)/include
LIBPATH += -L$(GLEW)/lib -Wl,--rpath -Wl,$(GLEW)/lib
endif
all: hw6
clean:
rm -f *.o hw6
depend:
rm -f Makefile.bak
mv Makefile Makefile.bak
sed '/^# DEPENDENCIES/,$$d' Makefile.bak > Makefile
echo '# DEPENDENCIES' >> Makefile
$(CXX) -MM *.cpp >> Makefile
.c.o:
$(CXX) $(CFLAGS) $(INCPATH) -c -o $@ $<
.cc.o:
$(CXX) $(CFLAGS) $(INCPATH) -c -o $@ $<
.cpp.o:
$(CXX) $(CFLAGS) $(INCPATH) -c -o $@ $<
hw6: main.o car.o porsche944.o police.o skybox.o camera.o moneyCrate.o
$(CXX) $(CFLAGS) $(INCPATH) -o $@ $^ $(LIBPATH) $(LIBS)
# DEPENDENCIES
main.o: main.cpp
car.o: car.cpp
porsche944.o: porsche944.cpp
police.o: police.cpp
skybox.o: skybox.cpp
camera.o: camera.cpp
moneyCrate.o: moneyCrate.cpp