dungeon_crawler
view prototype/Makefile.in @ 80:a373b36ffc17
better
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 27 Oct 2012 01:59:39 +0300 |
parents | aa86119e3295 |
children |
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard vmath/*.c) \
3 $(wildcard imago2/*.c) \
4 $(wildcard anim/*.c) \
5 $(wildcard psys/*.c) \
6 $(wildcard drawtext/*.c) \
7 $(wildcard kdtree/*.c)
9 ccsrc = $(wildcard src/*.cc) \
10 $(wildcard src/audio/*.cc) \
11 $(wildcard vmath/*.cc)
13 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
14 dep = $(obj:.o=.d)
15 bin = proto
17 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts
19 inc = -I. -Isrc -Ivmath -Iimago2 -Idrawtext -Ikdtree `pkg-config --cflags freetype2`
21 CFLAGS = -pedantic -fno-strict-aliasing $(warn) $(dbg) $(prof) $(opt) $(inc)
22 CXXFLAGS = $(CFLAGS) $(cxx11_cflags)
23 LDFLAGS = $(cxx11_ldflags) $(prof) $(libgl) $(libal) -lvorbisfile -lm -lassimp \
24 -ljpeg -lpng -lz `pkg-config --libs freetype2`
26 ifeq ($(shell uname -s), Darwin)
27 CC = clang
28 CXX = clang++
29 libgl = -framework OpenGL -framework GLUT -lglew
30 libal = -framework OpenAL
31 else
32 libgl = -lGL -lGLU -lglut -lGLEW
33 libal = -lopenal
34 endif
36 $(bin): $(obj) Makefile
37 $(CXX) -o $@ $(obj) $(LDFLAGS)
39 -include $(dep)
41 %.d: %.c
42 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
44 %.d: %.cc
45 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
47 .PHONY: clean
48 clean:
49 rm -f $(obj) $(bin) $(dep)
51 include build/macapp.mk