dungeon_crawler
view prototype/Makefile.in @ 64:0b130c6e534d
whatever
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 02 Oct 2012 05:03:26 +0300 |
parents | 508540dae114 |
children | 2560a7ab0243 |
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 -fno-strict-aliasing $(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