dungeon_crawler

view prototype/Makefile @ 24:e122ba214ee1

implementing the command console
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 23 Aug 2012 18:03:11 +0300
parents fa8f89d06f6f
children 527fede30057
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
15 LDFLAGS = $(libgl) -lm -lassimp -limago `pkg-config --libs freetype2`
17 ifeq ($(shell uname -s), Darwin)
18 libgl = -framework OpenGL -framework GLUT -lglew
19 else
20 libgl = -lGL -lGLU -lglut -lGLEW
21 endif
23 $(bin): $(obj) Makefile
24 $(CXX) -o $@ $(obj) $(LDFLAGS)
26 -include $(dep)
28 %.d: %.c
29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
31 %.d: %.cc
32 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
34 .PHONY: clean
35 clean:
36 rm -f $(obj) $(bin) $(dep)
38 include build/macapp.mk