vrfileman

diff Makefile @ 0:dca518e371cf

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Jan 2015 12:25:16 +0200
parents
children 282da6123fd4
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Fri Jan 30 12:25:16 2015 +0200
     1.3 @@ -0,0 +1,27 @@
     1.4 +src = $(wildcard src/*.cc)
     1.5 +obj = $(src:.cc=.o)
     1.6 +dep = $(obj:.o=.d)
     1.7 +bin = vrfileman
     1.8 +
     1.9 +warn = -pedantic -Wall
    1.10 +dbg = -g
    1.11 +
    1.12 +CXXFLAGS = $(warn) $(opt) $(dbg) $(inc)
    1.13 +LDFLAGS = $(libgl)
    1.14 +
    1.15 +
    1.16 +# system-specific stuff
    1.17 +ifeq ($(shell uname -s), Darwin)
    1.18 +	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.19 +else
    1.20 +	libgl = -lGL -lGLU -lglut -lGLEW
    1.21 +endif
    1.22 +
    1.23 +
    1.24 +$(bin): $(obj)
    1.25 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.26 +
    1.27 +-include $(dep)
    1.28 +
    1.29 +%.d: %.cc
    1.30 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@