vrshoot
view Makefile @ 2:334d17aed7de
visual studio project files
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 02 Feb 2014 18:36:38 +0200 |
parents | |
children | c179c72369be |
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard libs/vmath/*.c) \
3 $(wildcard libs/anim/*.c) \
4 $(wildcard libs/imago/*.c) \
5 $(wildcard libs/drawtext/*.c) \
6 $(wildcard libs/ogg/*.c) \
7 $(wildcard libs/vorbis/*.c) \
8 $(wildcard libs/psys/*.c) \
9 $(wildcard libs/kissfft/*.c)
11 ccsrc = $(wildcard src/*.cc) \
12 $(wildcard src/audio/*.cc) \
13 $(wildcard libs/vmath/*.cc)
15 obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
16 dep = $(obj:.o=.d)
17 bin = candyshoot
19 USE_ASSIMP = true
21 ifeq ($(USE_ASSIMP), true)
22 libs_cflags_ai = `pkg-config --cflags assimp` -DUSE_ASSIMP
23 libs_ldflags_ai = `pkg-config --libs assimp`
24 endif
26 libs_cflags = -Isrc -Ilibs -Ilibs/imago -Ilibs/drawtext -Ilibs/vorbis -Ilibs/kissfft \
27 `pkg-config --cflags freetype2` $(libs_cflags_ai)
28 libs_ldflags = -lz -lpng -ljpeg `pkg-config --libs freetype2` \
29 $(libs_ldflags_ai)
32 CC = clang
33 CXX = clang++
34 CFLAGS = -pedantic -Wall -g $(libs_cflags)
35 CXXFLAGS = $(CFLAGS)
36 LDFLAGS = $(libgl) $(libal) -lpthread -lm -ldl $(libs_ldflags)
38 ifeq ($(shell uname -s), Darwin)
39 libgl = -framework OpenGL -framework GLUT -lGLEW
40 libal = -framework OpenAL
41 else
42 libgl = -lGL -lGLU -lglut -lGLEW
43 libal = -lopenal
44 endif
47 $(bin): $(obj)
48 $(CXX) -o $@ $(obj) $(LDFLAGS)
50 -include $(dep)
52 %.d: %.c
53 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
55 %.d: %.cc
56 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
58 .PHONY: clean
59 clean:
60 rm -f $(obj) $(bin)