dungeon_crawler
annotate 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 |
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@5 | 14 CXXFLAGS = $(CFLAGS) -std=c++11 |
nuclear@24 | 15 LDFLAGS = $(libgl) -lm -lassimp -limago `pkg-config --libs freetype2` |
nuclear@1 | 16 |
nuclear@1 | 17 ifeq ($(shell uname -s), Darwin) |
nuclear@1 | 18 libgl = -framework OpenGL -framework GLUT -lglew |
nuclear@1 | 19 else |
nuclear@1 | 20 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@1 | 21 endif |
nuclear@1 | 22 |
nuclear@14 | 23 $(bin): $(obj) Makefile |
nuclear@1 | 24 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@1 | 25 |
nuclear@1 | 26 -include $(dep) |
nuclear@1 | 27 |
nuclear@1 | 28 %.d: %.c |
nuclear@1 | 29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@1 | 30 |
nuclear@1 | 31 %.d: %.cc |
nuclear@1 | 32 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@1 | 33 |
nuclear@1 | 34 .PHONY: clean |
nuclear@1 | 35 clean: |
nuclear@1 | 36 rm -f $(obj) $(bin) $(dep) |
nuclear@12 | 37 |
nuclear@12 | 38 include build/macapp.mk |