vrmodel

annotate 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
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@2 6 inc = -Iinclude
nuclear@2 7
nuclear@2 8 CFLAGS = -pedantic -Wall -g $(inc) `pkg-config --cflags sdl2`
nuclear@4 9 CXXFLAGS = -std=c++11 $(CFLAGS)
nuclear@1 10 LDFLAGS = $(libgl) `pkg-config --libs sdl2`
nuclear@1 11
nuclear@1 12 ifeq ($(shell uname -s), Darwin)
nuclear@1 13 libgl = -framework OpenGL -lGLEW
nuclear@1 14 else
nuclear@1 15 libgl = -lGL -lGLU -lGLEW
nuclear@1 16 endif
nuclear@1 17
nuclear@1 18 $(bin): $(obj)
nuclear@2 19 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@1 20
nuclear@1 21 -include $(dep)
nuclear@1 22
nuclear@2 23 %.d: %.c
nuclear@2 24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@2 25
nuclear@1 26 %.d: %.cc
nuclear@2 27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 28
nuclear@1 29 .PHONY: clean
nuclear@1 30 clean:
nuclear@1 31 rm -f $(obj) $(bin)