volmetrics

view Makefile @ 35:df4a277adb82

port to macosx
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 06 Feb 2015 21:15:23 +0200
parents 40febfed6cff
children
line source
1 src = $(wildcard src/*.cc src/math/*.cc src/shaders/*.cc)
2 obj = $(src:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = test1
6 warn = -pedantic -Wall
7 dbg = -g
8 opt = -O0
9 inc = -Isrc -I/usr/local/include -I/usr/local/lib
11 CXX = g++
12 CXXFLAGS = -std=c++11 $(warn) $(dbg) $(opt) $(inc)
13 LDFLAGS = $(libgl) -limago -lm
15 ifeq ($(shell uname -s), Darwin)
16 libgl = -framework OpenGL -framework GLUT -lGLEW -lglui
17 warn += -Wno-deprecated-declarations
18 else
19 libgl = -lGL -lGLU -lglut -lGLEW -lglui
20 endif
22 $(bin): $(obj)
23 $(CXX) -o $@ $(obj) $(LDFLAGS)
25 -include $(dep)
27 %.d: %.cc
28 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(bin) $(dep)