vrmodel

view Makefile @ 4:a32b151fb3c6

moving along slowly
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 11 Sep 2014 00:08:23 +0300
parents be91b72ce3f9
children
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 = -std=c++11 $(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)