clray

view Makefile @ 12:85fd61f374d9

fixed the bloody intersection bug
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 03 Aug 2010 13:06:59 +0100
parents deaf85acf6af
children 407935b73af3
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
8 LDFLAGS = $(libgl) $(libcl)
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 endif
18 $(bin): $(obj)
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.cc
24 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
26 .PHONY: clean
27 clean:
28 rm -f $(obj) $(bin) $(dep)