dungeon_crawler

view prototype/Makefile.in @ 57:508540dae114

build crap
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 21 Sep 2012 01:05:35 +0300
parents aa9e28670ae2
children aa86119e3295
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard vmath/*.c) \
3 $(wildcard drawtext/*.c) \
4 $(wildcard kdtree/*.c)
6 ccsrc = $(wildcard src/*.cc) \
7 $(wildcard src/audio/*.cc) \
8 $(wildcard vmath/*.cc)
10 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
11 dep = $(obj:.o=.d)
12 bin = proto
14 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts
16 inc = -I. -Isrc -Ivmath -Idrawtext -Ikdtree `pkg-config --cflags freetype2`
18 CFLAGS = -pedantic $(warn) $(dbg) $(prof) $(opt) $(inc)
19 CXXFLAGS = $(CFLAGS) $(cxx11_cflags)
20 LDFLAGS = $(cxx11_ldflags) $(prof) $(libgl) $(libal) -lvorbisfile -lm -lassimp -limago -lpsys `pkg-config --libs freetype2`
22 ifeq ($(shell uname -s), Darwin)
23 libgl = -framework OpenGL -framework GLUT -lglew
24 libal = -framework OpenAL
25 else
26 libgl = -lGL -lGLU -lglut -lGLEW
27 libal = -lopenal
28 endif
30 $(bin): $(obj) Makefile
31 $(CXX) -o $@ $(obj) $(LDFLAGS)
33 -include $(dep)
35 %.d: %.c
36 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
38 %.d: %.cc
39 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
41 .PHONY: clean
42 clean:
43 rm -f $(obj) $(bin) $(dep)
45 include build/macapp.mk