coeng

annotate 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
rev   line source
nuclear@2 1 ccsrc = $(wildcard src/*.cc)
nuclear@2 2 obj = $(ccsrc:.cc=.o)
nuclear@6 3 dep = $(obj:.o=.d)
nuclear@2 4 bin = test
nuclear@2 5
nuclear@3 6 warn = -pedantic -Wall
nuclear@3 7 dbg = -g
nuclear@3 8
nuclear@4 9 CXXFLAGS = -std=c++11 $(warn) $(dbg)
nuclear@4 10 LDFLAGS = $(libgl) -lm -lvmath -lpthread
nuclear@2 11
nuclear@2 12 ifeq ($(shell uname -s), Darwin)
nuclear@2 13 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@3 14 warn += -Wno-deprecated-declarations
nuclear@2 15 else
nuclear@2 16 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@2 17 endif
nuclear@2 18
nuclear@2 19 $(bin): $(obj)
nuclear@2 20 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@2 21
nuclear@6 22 -include $(dep)
nuclear@6 23
nuclear@6 24 %.d: %.cc
nuclear@6 25 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@6 26
nuclear@2 27 .PHONY: clean
nuclear@2 28 clean:
nuclear@2 29 rm -f $(obj) $(bin)
nuclear@6 30
nuclear@6 31 .PHONY: cleandep
nuclear@6 32 cleandep:
nuclear@6 33 rm -f $(dep)