clray

view Makefile @ 56:e3b4457dc4d2

added glFinish after swap-buffers to make the program absolutely correct in regards to mediating usage of the shared GL/CL texture image
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 06 Sep 2010 05:40:47 +0100
parents 8047637961a2
children
line source
1 src = $(wildcard src/*.cc)
2 obj = $(src:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = clray
6 opt = -O3 -ffast-math
7 dbg = -g
9 CXX = g++
10 CXXFLAGS = -pedantic -Wall $(dbg) $(opt) $(def)
11 LDFLAGS = $(libgl) $(libcl) -lpthread
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -framework GLUT
15 libcl = -framework OpenCL
16 else
17 libgl = -lGL -lGLU -lglut
18 libcl = -lOpenCL
19 def = -DCLGL_INTEROP
20 endif
22 $(bin): $(obj)
23 $(CXX) -o $@ $(obj) $(LDFLAGS)
25 -include $(dep)
27 %.d: %.cc
28 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(bin) $(dep)