coeng

view Makefile @ 7:af24cfbdf9b6

adding collision detection
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Feb 2015 10:08:00 +0200
parents 49a2e70ac455
children 8cce82794f90
line source
1 ccsrc = $(wildcard src/*.cc)
2 obj = $(ccsrc:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = test
6 warn = -pedantic -Wall
7 dbg = -g
9 CXXFLAGS = -std=c++11 $(warn) $(dbg)
10 LDFLAGS = $(libgl) -lm -lvmath -lpthread
12 ifeq ($(shell uname -s), Darwin)
13 libgl = -framework OpenGL -framework GLUT -lGLEW
14 warn += -Wno-deprecated-declarations
15 else
16 libgl = -lGL -lGLU -lglut -lGLEW
17 endif
19 $(bin): $(obj)
20 $(CXX) -o $@ $(obj) $(LDFLAGS)
22 -include $(dep)
24 %.d: %.cc
25 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
27 .PHONY: clean
28 clean:
29 rm -f $(obj) $(bin)
31 .PHONY: cleandep
32 cleandep:
33 rm -f $(dep)