clray
annotate Makefile @ 25:58642a8316b7
continuing with the kdtree
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 14 Aug 2010 07:00:04 +0100 |
parents | 85fd61f374d9 |
children | 1bcbb53b3505 |
rev | line source |
---|---|
nuclear@0 | 1 src = $(wildcard src/*.cc) |
nuclear@0 | 2 obj = $(src:.cc=.o) |
nuclear@12 | 3 dep = $(obj:.o=.d) |
nuclear@0 | 4 bin = test |
nuclear@0 | 5 |
nuclear@0 | 6 CXX = g++ |
nuclear@0 | 7 CXXFLAGS = -pedantic -Wall -g |
nuclear@13 | 8 LDFLAGS = $(libgl) $(libcl) -lpthread |
nuclear@8 | 9 |
nuclear@8 | 10 ifeq ($(shell uname -s), Darwin) |
nuclear@8 | 11 libgl = -framework OpenGL -framework GLUT |
nuclear@8 | 12 libcl = -framework OpenCL |
nuclear@8 | 13 else |
nuclear@8 | 14 libgl = -lGL -lglut |
nuclear@8 | 15 libcl = -lOpenCL |
nuclear@8 | 16 endif |
nuclear@0 | 17 |
nuclear@0 | 18 $(bin): $(obj) |
nuclear@0 | 19 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 20 |
nuclear@12 | 21 -include $(dep) |
nuclear@12 | 22 |
nuclear@12 | 23 %.d: %.cc |
nuclear@12 | 24 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@ |
nuclear@12 | 25 |
nuclear@0 | 26 .PHONY: clean |
nuclear@0 | 27 clean: |
nuclear@12 | 28 rm -f $(obj) $(bin) $(dep) |