coeng

view Makefile @ 6:2f872a179914

first component test: - prs, xform, physics components with dependencies - topological sort of components to update them in the correct order - debug visualization component todo: remove draw() from components, doesn't make sense
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Feb 2015 07:27:12 +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)