clray
view Makefile @ 54:6a30f27fa1e6
separated the OpenGL visualization and added a CPU raytracing mode
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 10 Sep 2010 16:47:00 +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)