dungeon_crawler

view prototype/Makefile.in @ 31:ddb68dc4ba07

OBJ hack
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 27 Aug 2012 04:14:04 +0300
parents 527fede30057
children 862461b686f4
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 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts
9 inc = -I. -Ivmath -Idrawtext `pkg-config --cflags freetype2`
11 CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(inc)
12 CXXFLAGS = $(CFLAGS) $(cxx11_cflags)
13 LDFLAGS = $(cxx11_ldflags) $(libgl) -lm -lassimp -limago `pkg-config --libs freetype2`
15 ifeq ($(shell uname -s), Darwin)
16 libgl = -framework OpenGL -framework GLUT -lglew
17 else
18 libgl = -lGL -lGLU -lglut -lGLEW
19 endif
21 $(bin): $(obj) Makefile
22 $(CXX) -o $@ $(obj) $(LDFLAGS)
24 -include $(dep)
26 %.d: %.c
27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 %.d: %.cc
30 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
32 .PHONY: clean
33 clean:
34 rm -f $(obj) $(bin) $(dep)
36 include build/macapp.mk