clray

view Makefile @ 47:30bf84881553

added interactive controls for turning shadows/reflections on and off as well as selecting maximum ray tracing iterations
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 31 Aug 2010 01:47:27 +0100
parents 1169f3d04135
children 9c0867942612
line source
1 src = $(wildcard src/*.cc)
2 obj = $(src:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = test
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)