gpuray_glsl

view Makefile @ 0:f234630e38ff

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 09 Nov 2014 13:03:36 +0200
parents
children
line source
1 src = $(wildcard src/*.cc) $(wildcard vmath/*.cc)
2 csrc = $(wildcard src/*.c) $(wildcard vmath/*.c) $(wildcard anim/*.c)
3 obj = $(src:.cc=.o) $(csrc:.c=.o)
4 dep = $(obj:.o=.d)
5 bin = ray1
7 opt = -O3 -march=native
8 dbg = -g
9 #prof = -pg
10 CFLAGS = -pedantic -Wall $(dbg) $(opt) $(prof) -I.
11 CXXFLAGS = -std=c++11 $(CFLAGS)
12 LDFLAGS = $(prof) $(libgl) -limago
14 ifeq ($(shell uname -s), Darwin)
15 # the gcc shipping with Darwin is ancient and doesn't support C++11
16 # use clang instead.
17 CXX = clang++
18 CPP = clang -E
19 CXXFLAGS += -stdlib=libc++
20 LDFLAGS += -stdlib=libc++
22 libgl = -framework OpenGL -framework GLUT -lGLEW
23 else
24 libgl = -lGL -lGLU -lglut -lGLEW
25 endif
27 ifeq ($(CC), icc)
28 libomp = -liomp5
29 else
30 libomp = -lgomp
31 endif
33 $(bin): $(obj)
34 $(CXX) -o $@ $(obj) $(LDFLAGS)
36 -include $(dep)
38 %.d: %.c
39 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
41 %.d: %.cc
42 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
44 .PHONY: clean
45 clean:
46 rm -f $(obj) $(bin)
48 .PHONY: cleandep
49 cleandep: clean
50 rm -f $(dep)