dungeon_crawler

annotate prototype/Makefile @ 25:527fede30057

- fixed sphere rendering (PointLight::draw) - added config argument options - fixed macosx compilation
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 25 Aug 2012 02:16:08 +0300
parents e122ba214ee1
children
rev   line source
nuclear@24 1 csrc = $(wildcard src/*.c) $(wildcard vmath/*.c) $(wildcard drawtext/*.c)
nuclear@1 2 ccsrc = $(wildcard src/*.cc) $(wildcard vmath/*.cc)
nuclear@1 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
nuclear@1 4 dep = $(obj:.o=.d)
nuclear@1 5 bin = proto
nuclear@1 6
nuclear@17 7 #opt = -O3
nuclear@17 8 dbg = -g
nuclear@17 9 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts
nuclear@17 10
nuclear@24 11 inc = -Ivmath -Idrawtext `pkg-config --cflags freetype2`
nuclear@24 12
nuclear@24 13 CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(inc)
nuclear@25 14 CXXFLAGS = $(CFLAGS) -std=c++11 $(add_cxxflags)
nuclear@25 15 LDFLAGS = $(add_ldflags) $(libgl) -lm -lassimp -limago `pkg-config --libs freetype2`
nuclear@1 16
nuclear@1 17 ifeq ($(shell uname -s), Darwin)
nuclear@25 18 add_cxxflags = -stdlib=libc++
nuclear@25 19 add_ldflags = -stdlib=libc++
nuclear@1 20 libgl = -framework OpenGL -framework GLUT -lglew
nuclear@1 21 else
nuclear@1 22 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@1 23 endif
nuclear@1 24
nuclear@14 25 $(bin): $(obj) Makefile
nuclear@1 26 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@1 27
nuclear@1 28 -include $(dep)
nuclear@1 29
nuclear@1 30 %.d: %.c
nuclear@1 31 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 32
nuclear@1 33 %.d: %.cc
nuclear@1 34 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 35
nuclear@1 36 .PHONY: clean
nuclear@1 37 clean:
nuclear@1 38 rm -f $(obj) $(bin) $(dep)
nuclear@12 39
nuclear@12 40 include build/macapp.mk