-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (16 loc) · 679 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (16 loc) · 679 Bytes
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
C_FLAGS=-Wno-deprecated-declarations
$(shell mkdir -p bin/ obj/ png/ >/dev/null)
.PHONY: all clean test
all: bin/cube bin/test
clean:
rm -rf bin/ obj/ png/
test: bin/test
bin/test
-include obj/*.d
obj/%.o: %.cpp
g++ -c ${C_FLAGS} -O2 -std=c++11 -o $@ $<
g++ -MM ${C_FLAGS} $< | sed "s|^|obj/|" > $(@:.o=.d)
bin/cube: obj/cube.o obj/geom.o obj/glut_wrap.o obj/geom.o obj/transfers.o obj/weighting.o obj/rendering.o
g++ -l png -framework GLUT -framework OpenGL $^ -o $@
bin/test: obj/weighting.o obj/weighting_test.o obj/geom.o obj/geom_test.o obj/test.o obj/transfers.o obj/transfers_test.o obj/glut_wrap.o
g++ -l cppunit -framework GLUT -framework OpenGL $^ -o $@