clray

annotate Makefile @ 43:f9eec11e5acc

shoehorned the kdtree into an opnecl image and improved performance slightly
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Aug 2010 09:38:49 +0100
parents 1bcbb53b3505
children 8047637961a2
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@40 7 CXXFLAGS = -pedantic -Wall -g $(def)
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@40 16 def = -DCLGL_INTEROP
nuclear@8 17 endif
nuclear@0 18
nuclear@0 19 $(bin): $(obj)
nuclear@0 20 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 21
nuclear@12 22 -include $(dep)
nuclear@12 23
nuclear@12 24 %.d: %.cc
nuclear@12 25 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
nuclear@12 26
nuclear@0 27 .PHONY: clean
nuclear@0 28 clean:
nuclear@12 29 rm -f $(obj) $(bin) $(dep)