annotate Makefile @ 13:c859c22c1af5

Remove audio support from liboggplayer
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 05 Aug 2013 16:47:07 +0300
parents 2184f64b5b33
children a354578a41c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
1 CXX=g++
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
2 CFLAGS = -g -O3 -W -Wall
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
3 LDFLAGS = -s
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
4 AR=ar
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
5 RANLIB=ranlib
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
6
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
7 DEMO_CFLAGS = -fpermissive
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
8
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
9 OBJPATH=obj/
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
10
11
470774c3b381 Make a target for collecting the necessary libraries under lib/
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
11
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
12 ###
11
470774c3b381 Make a target for collecting the necessary libraries under lib/
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
13 ### Depency library definitions
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
14 ###
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
15 BOOST_CFLAGS=-I/usr/include/
12
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
16 BOOST_LDFLAGS=-lboost_thread -lboost_system
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
17 #/usr/lib/libboost_thread.a /usr/lib/libboost_system.a
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 FREETYPE_CFLAGS=`pkg-config freetype2 --cflags`
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 FREETYPE_LDFLAGS=`pkg-config freetype2 --libs`
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 GLEW_CFLAGS=`pkg-config glew --cflags`
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 GLEW_LDFLAGS=`pkg-config glew --libs`
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 GLUT_CFLAGS=-I/usr/include/GL/
12
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
26 GLUT_LDFLAGS=-lglut
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
27 #/usr/lib/i386-linux-gnu/libglut.a
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
28
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
29
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
30 ###
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
31 ### Included in source tree
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
32 ###
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
33 BASS_CFLAGS=-Ilibbass/
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
34 BASS_LDFLAGS=-L./lib/ -lbass
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
35
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
36 ASSIMP=assimp--3.0.1270-source-only/
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
37 ASSIMP_CFLAGS=-I$(ASSIMP)include/
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
38 ASSIMP_LDFLAGS=-L./lib/ -lassimp
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
39
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
40
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
41 LIBOGGPLAYER=liboggplayer-src/
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
42 LIBOGGPLAYER_CFLAGS=-I$(LIBOGGPLAYER)include/
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
43 #LIBOGGPLAYER_LDFLAGS=`pkg-config --libs ogg vorbis theoradec`
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
44 LIBOGGPLAYER_LDFLAGS=`pkg-config --libs ogg theoradec`
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
45 LIBOGGPLAYER_A=$(LIBOGGPLAYER)lib/liboggplayer.a
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
47
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
48 DEMO_CFLAGS += $(BASS_CFLAGS) $(ASSIMP_CFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
49 $(LIBOGGPLAYER_CFLAGS) $(FREETYPE_CFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
50 $(GLEW_CFLAGS) $(GLUT_CFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
51 $(FREETYPE_CFLAGS)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
52
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
53 DEMO_LDFLAGS = $(BASS_LDFLAGS) $(ASSIMP_LDFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
54 $(LIBOGGPLAYER_A) $(FREETYPE_LDFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
55 $(GLEW_LDFLAGS) $(GLUT_LDFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
56 $(FREETYPE_LDFLAGS) $(BOOST_LDFLAGS) \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
57 $(LIBOGGPLAYER_LDFLAGS)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
58
12
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
59 ADD_LIBS=\
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
60 $(ASSIMP)lib/libassimp.so \
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
61 libbass/libbass.so
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
62
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
63
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
64 ###
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
65 ### Source files etc
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
66 ###
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 TARGETS=demo.bin
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
70 DEMO_OBJS=vertex-attribute.o vertex-buffer.o \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
71 texture-atlas.o texture-font.o mat4.o \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
72 shader.o vector.o midifile.o \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
73 midiutil.o main.o
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
74
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
75 LIBOGGPLAYER_OBJS= \
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
76 oggplayer.o open_close.o play.o \
13
c859c22c1af5 Remove audio support from liboggplayer
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
77 util.o
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
78
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 ###
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 ### Main targets
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 ###
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83 all: $(TARGETS)
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
85 $(OBJPATH)%.o: $(LIBOGGPLAYER)src/%.cpp $(LIBOGGPLAYER)src/%.hpp
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
86 @echo " CXX $+"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
87 $(CXX) $(CFLAGS) -c -o $@ $< $(LIBOGGPLAYER_CFLAGS) $(BOOST_CFLAGS)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
88
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
89 $(OBJPATH)%.o: $(LIBOGGPLAYER)src/%.cpp
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
90 @echo " CXX $+"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
91 $(CXX) $(CFLAGS) -c -o $@ $< $(LIBOGGPLAYER_CFLAGS) $(BOOST_CFLAGS)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
92
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
93
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
94 $(OBJPATH)%.o: src/%.c src/%.h
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
95 @echo " CXX $+"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
96 $(CXX) $(CFLAGS) -c -o $@ $< $(DEMO_CFLAGS)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
97
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
98 $(OBJPATH)%.o: src/%.c
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
99 @echo " CXX $+"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
100 $(CXX) $(CFLAGS) -c -o $@ $< $(DEMO_CFLAGS)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
101
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
102
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
103 $(LIBOGGPLAYER_A): $(addprefix $(OBJPATH),$(LIBOGGPLAYER_OBJS))
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
104 @echo " AR $@ $+"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
105 @$(AR) cru $@ $+
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
106 @echo " RANLIB $@"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
107 @$(RANLIB) $@
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
108
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
109
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
110 demo.bin: $(addprefix $(OBJPATH),$(DEMO_OBJS)) $(LIBOGGPLAYER_A)
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
111 @echo " LINK $@ $+"
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
112 @$(CXX) $(CFLAGS) $(DEMO_CFLAGS) -o $@ $+ $(DEMO_LDFLAGS)
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 ###
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 ### Special targets
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 ###
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 clean:
5
08e2ed7d5879 Improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
119 $(RM) $(TARGETS) $(OBJPATH)*.o
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120
12
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
121 assimp:
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
122 cd $(ASSIMP) && cmake . -DENABLE_BOOST_WORKAROUND=ON && make
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
123
2184f64b5b33 More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 11
diff changeset
124 build: assimp demo.bin $(ADD_LIBS)
11
470774c3b381 Make a target for collecting the necessary libraries under lib/
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
125 cp -d -p $(addsuffix *,$(ADD_LIBS)) lib/