clray

view Makefile @ 21:bd6c2b25f6e7

fixed, now we need to start with optimizations
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 10 Aug 2010 07:24:18 +0100
parents 85fd61f374d9
children 1bcbb53b3505
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) -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 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)