vrmodel

annotate Makefile @ 1:76e75cbcb758

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 29 Aug 2014 23:07:59 +0300
parents
children be91b72ce3f9
rev   line source
nuclear@1 1 src = $(wildcard src/*.cc)
nuclear@1 2 obj = $(src:.cc=.o)
nuclear@1 3 dep = $(obj:.o=.d)
nuclear@1 4 bin = vrmodel
nuclear@1 5
nuclear@1 6 CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl2`
nuclear@1 7 LDFLAGS = $(libgl) `pkg-config --libs sdl2`
nuclear@1 8
nuclear@1 9 ifeq ($(shell uname -s), Darwin)
nuclear@1 10 libgl = -framework OpenGL -lGLEW
nuclear@1 11 else
nuclear@1 12 libgl = -lGL -lGLU -lGLEW
nuclear@1 13 endif
nuclear@1 14
nuclear@1 15 $(bin): $(obj)
nuclear@1 16 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@1 17
nuclear@1 18 -include $(dep)
nuclear@1 19
nuclear@1 20 %.d: %.cc
nuclear@1 21 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 22
nuclear@1 23 .PHONY: clean
nuclear@1 24 clean:
nuclear@1 25 rm -f $(obj) $(bin)