dungeon_crawler

view prototype/Makefile.in @ 47:d52711f2b9a1

started writting audio code
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 16 Sep 2012 08:16:50 +0300
parents 862461b686f4
children aa9e28670ae2
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard vmath/*.c) \
3 $(wildcard drawtext/*.c)
5 ccsrc = $(wildcard src/*.cc) \
6 $(wildcard src/audio/*.cc) \
7 $(wildcard vmath/*.cc)
9 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
10 dep = $(obj:.o=.d)
11 bin = proto
13 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts
15 inc = -I. -Isrc/audio -Ivmath -Idrawtext `pkg-config --cflags freetype2`
17 CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(inc)
18 CXXFLAGS = $(CFLAGS) $(cxx11_cflags)
19 LDFLAGS = $(cxx11_ldflags) $(libgl) $(libal) -lvorbisfile -lm -lassimp -limago -lpsys `pkg-config --libs freetype2`
21 ifeq ($(shell uname -s), Darwin)
22 libgl = -framework OpenGL -framework GLUT -lglew
23 libal = -framework OpenAL
24 else
25 libgl = -lGL -lGLU -lglut -lGLEW
26 libal = -lopenal
27 endif
29 $(bin): $(obj) Makefile
30 $(CXX) -o $@ $(obj) $(LDFLAGS)
32 -include $(dep)
34 %.d: %.c
35 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
37 %.d: %.cc
38 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
40 .PHONY: clean
41 clean:
42 rm -f $(obj) $(bin) $(dep)
44 include build/macapp.mk