clray

view Makefile @ 42:1169f3d04135

added CL/GL interop support for macosx (compiles) and windows (untested)
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Aug 2010 02:01:16 +0100
parents 1bcbb53b3505
children 8047637961a2
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
16 def = -DCLGL_INTEROP
17 endif
19 $(bin): $(obj)
20 $(CXX) -o $@ $(obj) $(LDFLAGS)
22 -include $(dep)
24 %.d: %.cc
25 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
27 .PHONY: clean
28 clean:
29 rm -f $(obj) $(bin) $(dep)