gpuray_glsl

annotate Makefile @ 5:000017955721

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