clray

view 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
line source
1 src = $(wildcard src/*.cc)
2 obj = $(src:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = test
6 CXX = g++
7 CXXFLAGS = -pedantic -Wall -g $(def)
8 LDFLAGS = $(libgl) $(libcl) -lpthread
10 ifeq ($(shell uname -s), Darwin)
11 libgl = -framework OpenGL -framework GLUT
12 libcl = -framework OpenCL
13 else
14 libgl = -lGL -lglut
15 libcl = -lOpenCL
17 def = -DCLGL_INTEROP
18 endif
20 $(bin): $(obj)
21 $(CXX) -o $@ $(obj) $(LDFLAGS)
23 -include $(dep)
25 %.d: %.cc
26 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin) $(dep)