bloboland

annotate Makefile @ 1:cfe68befb7cc

some progress
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 15 Dec 2012 23:43:03 +0200
parents e4818a3300b9
children 1757973feaed
rev   line source
nuclear@0 1 src = $(wildcard src/*.cc)
nuclear@0 2 obj = $(src:.cc=.o)
nuclear@0 3 dep = $(obj:.o=.d)
nuclear@0 4 bin = blobo
nuclear@0 5
nuclear@0 6 CXXFLAGS = -ansi -pedantic -Wall -g
nuclear@1 7 LDFLAGS = $(libgl) -lvmath -limago
nuclear@0 8
nuclear@0 9 ifeq ($(shell uname -s), Darwin)
nuclear@0 10 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 11 else
nuclear@0 12 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 13 endif
nuclear@0 14
nuclear@0 15 $(bin): $(obj)
nuclear@0 16 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 17
nuclear@0 18 -include $(dep)
nuclear@0 19
nuclear@0 20 %.d: %.cc
nuclear@0 21 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 22
nuclear@0 23 .PHONY: clean
nuclear@0 24 clean:
nuclear@0 25 rm -f $(obj) $(bin)
nuclear@0 26
nuclear@0 27 .PHONY: cleandep
nuclear@0 28 cleandep:
nuclear@0 29 rm -f $(dep)