clray

annotate Makefile @ 41:057b8575a1c1

- changed the membuffer into an imagebuffer for the non-GL/CL-interop case - fixed the segfault
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Aug 2010 20:39:55 +0100
parents 407935b73af3
children 1169f3d04135
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
nuclear@40 17 def = -DCLGL_INTEROP
nuclear@8 18 endif
nuclear@0 19
nuclear@0 20 $(bin): $(obj)
nuclear@0 21 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 22
nuclear@12 23 -include $(dep)
nuclear@12 24
nuclear@12 25 %.d: %.cc
nuclear@12 26 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
nuclear@12 27
nuclear@0 28 .PHONY: clean
nuclear@0 29 clean:
nuclear@12 30 rm -f $(obj) $(bin) $(dep)