vrmodel
view Makefile @ 2:be91b72ce3f9
foobar
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 30 Aug 2014 21:46:37 +0300 |
parents | 76e75cbcb758 |
children | a32b151fb3c6 |
line source
1 src = $(wildcard src/*.cc)
2 obj = $(src:.cc=.o)
3 dep = $(obj:.o=.d)
4 bin = vrmodel
6 inc = -Iinclude
8 CFLAGS = -pedantic -Wall -g $(inc) `pkg-config --cflags sdl2`
9 CXXFLAGS = $(CFLAGS)
10 LDFLAGS = $(libgl) `pkg-config --libs sdl2`
12 ifeq ($(shell uname -s), Darwin)
13 libgl = -framework OpenGL -lGLEW
14 else
15 libgl = -lGL -lGLU -lGLEW
16 endif
18 $(bin): $(obj)
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.c
24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 %.d: %.cc
27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 .PHONY: clean
30 clean:
31 rm -f $(obj) $(bin)