vrfileman

annotate Makefile @ 6:b041bc1c38ad

layout
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 03 Feb 2015 15:42:03 +0200
parents dca518e371cf
children
rev   line source
nuclear@0 1 src = $(wildcard src/*.cc)
nuclear@0 2 obj = $(src:.cc=.o)
nuclear@0 3 dep = $(obj:.o=.d)
nuclear@0 4 bin = vrfileman
nuclear@0 5
nuclear@0 6 warn = -pedantic -Wall
nuclear@0 7 dbg = -g
nuclear@0 8
nuclear@0 9 CXXFLAGS = $(warn) $(opt) $(dbg) $(inc)
nuclear@2 10 LDFLAGS = $(libgl) -lvmath
nuclear@0 11
nuclear@0 12
nuclear@0 13 ifeq ($(shell uname -s), Darwin)
nuclear@0 14 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 15 else
nuclear@0 16 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 17 endif
nuclear@0 18
nuclear@0 19
nuclear@0 20 $(bin): $(obj)
nuclear@0 21 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 22
nuclear@0 23 -include $(dep)
nuclear@0 24
nuclear@0 25 %.d: %.cc
nuclear@0 26 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@