clray

view Makefile @ 16:9e4a28063394

cl compiler segfaults...
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 09 Aug 2010 04:18:21 +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)