clray

annotate 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
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@51 4 bin = clray
nuclear@0 5
nuclear@45 6 opt = -O3 -ffast-math
nuclear@45 7 dbg = -g
nuclear@45 8
nuclear@0 9 CXX = g++
nuclear@45 10 CXXFLAGS = -pedantic -Wall $(dbg) $(opt) $(def)
nuclear@13 11 LDFLAGS = $(libgl) $(libcl) -lpthread
nuclear@8 12
nuclear@8 13 ifeq ($(shell uname -s), Darwin)
nuclear@8 14 libgl = -framework OpenGL -framework GLUT
nuclear@8 15 libcl = -framework OpenCL
nuclear@8 16 else
nuclear@45 17 libgl = -lGL -lGLU -lglut
nuclear@8 18 libcl = -lOpenCL
nuclear@40 19 def = -DCLGL_INTEROP
nuclear@8 20 endif
nuclear@0 21
nuclear@0 22 $(bin): $(obj)
nuclear@0 23 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 24
nuclear@12 25 -include $(dep)
nuclear@12 26
nuclear@12 27 %.d: %.cc
nuclear@12 28 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
nuclear@12 29
nuclear@0 30 .PHONY: clean
nuclear@0 31 clean:
nuclear@12 32 rm -f $(obj) $(bin) $(dep)