clray

annotate Makefile @ 55:df239a52a091

extensive render stats for the CPU raytracer
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 11 Sep 2010 03:00:21 +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)