dungeon_crawler

view 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
line source
1 csrc = $(wildcard src/*.c) $(wildcard vmath/*.c) $(wildcard drawtext/*.c)
2 ccsrc = $(wildcard src/*.cc) $(wildcard vmath/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
5 bin = proto
7 #opt = -O3
8 dbg = -g
9 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts
11 inc = -Ivmath -Idrawtext `pkg-config --cflags freetype2`
13 CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(inc)
14 CXXFLAGS = $(CFLAGS) -std=c++11 $(add_cxxflags)
15 LDFLAGS = $(add_ldflags) $(libgl) -lm -lassimp -limago `pkg-config --libs freetype2`
17 ifeq ($(shell uname -s), Darwin)
18 add_cxxflags = -stdlib=libc++
19 add_ldflags = -stdlib=libc++
20 libgl = -framework OpenGL -framework GLUT -lglew
21 else
22 libgl = -lGL -lGLU -lglut -lGLEW
23 endif
25 $(bin): $(obj) Makefile
26 $(CXX) -o $@ $(obj) $(LDFLAGS)
28 -include $(dep)
30 %.d: %.c
31 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
33 %.d: %.cc
34 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
36 .PHONY: clean
37 clean:
38 rm -f $(obj) $(bin) $(dep)
40 include build/macapp.mk