vrfileman

annotate Makefile @ 1:9e3d77dad51b

moving on...
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 31 Jan 2015 20:01:35 +0200
parents
children 282da6123fd4
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@0 10 LDFLAGS = $(libgl)
nuclear@0 11
nuclear@0 12
nuclear@0 13 # system-specific stuff
nuclear@0 14 ifeq ($(shell uname -s), Darwin)
nuclear@0 15 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 16 else
nuclear@0 17 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 18 endif
nuclear@0 19
nuclear@0 20
nuclear@0 21 $(bin): $(obj)
nuclear@0 22 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 23
nuclear@0 24 -include $(dep)
nuclear@0 25
nuclear@0 26 %.d: %.cc
nuclear@0 27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@