vrmodel

view Makefile @ 1:76e75cbcb758

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