~ubuntu-branches/ubuntu/trusty/liquidsoap/trusty

« back to all changes in this revision

Viewing changes to .pc/fdkaad-dynlink.patch/src/Makefile

  • Committer: Package Import Robot
  • Author(s): Romain Beauxis
  • Date: 2013-05-14 17:19:49 UTC
  • Revision ID: package-import@ubuntu.com-20130514171949-qd2gejpfgjgrpobv
Tags: 1.1.1-4
* Added patch to enable dynamically loaded
  fdkaac encoder.
* Dropped liquidsoap-plugin-fdkaac. 
Closes: #708602

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SUBDIRS=tools decoder playlists encoder protocols plugins stream lang \
 
2
        ogg_formats converters operators sources conversions outputs io \
 
3
        visualization analyze synth
 
4
 
 
5
DISTFILES = $(wildcard *.mli) Makefile $(wildcard *.ml) META.in
 
6
 
 
7
ocaml_progs= liquidsoap
 
8
 
 
9
top_srcdir=..
 
10
include $(top_srcdir)/Makefile.defs
 
11
 
 
12
# Liquidsoap source files work as follows.
 
13
# Each file has to be either added to liquidsoap's files if compiled builtin
 
14
# or to the corresponding plugin if built as a plugin.
 
15
# For this purpose, we define the make function
 
16
# conditional_compilation, which redirects each of those files to
 
17
# the correct make variable. Its parameters are:
 
18
# $1: name of the make variable where the file should go if compiled builtin.
 
19
# $2: the $W_FOO variable
 
20
# $3: path to the file
 
21
# $4: type of source: empty for .ml sources,
 
22
#                     c_ for c sources and camlp4_ for camlp4 sources.
 
23
#                     (Camlp4 sources are not supported yet..)
 
24
#
 
25
# For now, the old style Makefile has been converted to
 
26
# this new style by replacing $(if $(W_FOO),..) by
 
27
# $(call conditional_compilation,..). However, this may
 
28
# cause some trouble as the order of declaration is important
 
29
# both for the builtin case and plugin case.. See for instance
 
30
# SDL files, whose declaration have been moved at the end.
 
31
conditional_compilation = \
 
32
  $(if $(2),\
 
33
    $(if $(2:yes=),\
 
34
      $(eval $(2)_$(4)sources += $(3)),\
 
35
      $(eval $(1) += $(3))))
 
36
 
 
37
liquidsoap_c_files = tools/locale_c.c
 
38
 
 
39
# Add conditional files..
 
40
$(call conditional_compilation,liquidsoap_c_files,$(W_OSS),io/oss_io_c.c,c_)
 
41
 
 
42
# Camlp4 compilation works as follow:
 
43
# both .camlp4 and .ml files are present in the
 
44
# source tree.
 
45
# If camlp4o is detected, then a .camlp4.ml target
 
46
# is executed for each .camlp4. This target creates a .camlp4.ml
 
47
# file that is not used and regenerate the .ml files used for compilation.
 
48
liquidsoap_camlp4_files = \
 
49
        $(if $(W_DUPPY_SYNTAX),outputs/harbor_output.camlp4) \
 
50
        $(if $(W_DUPPY_SYNTAX),tools/server.camlp4) \
 
51
        $(if $(W_DUPPY_SYNTAX),tools/harbor.camlp4)
 
52
 
 
53
# This variable contains only conditional files..
 
54
ogg_demuxer =
 
55
 
 
56
$(call conditional_compilation,ogg_demuxer,$(W_SPEEX),ogg_formats/speex_decoder.ml)
 
57
$(call conditional_compilation,ogg_demuxer,$(W_VORBIS),ogg_formats/vorbis_decoder.ml)
 
58
$(call conditional_compilation,ogg_demuxer,$(W_OPUS),ogg_formats/opus_decoder.ml)
 
59
$(call conditional_compilation,ogg_demuxer,$(W_THEORA),ogg_formats/theora_decoder.ml)
 
60
$(call conditional_compilation,ogg_demuxer,$(W_FLAC_OGG),ogg_formats/ogg_flac_decoder.ml)
 
61
$(call conditional_compilation,ogg_demuxer,$(W_SCHROEDINGER),ogg_formats/dirac_decoder.ml)
 
62
 
 
63
# This variable contains only conditional files..
 
64
ogg_muxer =
 
65
 
 
66
$(call conditional_compilation,ogg_muxer,$(W_OGG),ogg_formats/ogg_muxer.ml)
 
67
$(call conditional_compilation,ogg_muxer,$(W_OGG), encoder/ogg_encoder.ml)
 
68
$(call conditional_compilation,ogg_muxer,$(W_SPEEX),ogg_formats/speex_encoder.ml)
 
69
$(call conditional_compilation,ogg_muxer,$(W_VORBIS),ogg_formats/vorbis_encoder.ml)
 
70
$(call conditional_compilation,ogg_muxer,$(W_OPUS),ogg_formats/opus_encoder.ml)
 
71
$(call conditional_compilation,ogg_muxer,$(W_THEORA),ogg_formats/theora_encoder.ml)
 
72
$(call conditional_compilation,ogg_muxer,$(W_FLAC_OGG),ogg_formats/ogg_flac_encoder.ml)
 
73
$(call conditional_compilation,ogg_muxer,$(W_SCHROEDINGER),ogg_formats/dirac_encoder.ml)
 
74
 
 
75
audio_converters = \
 
76
        converters/audio/native_audio_converter.ml
 
77
 
 
78
$(call conditional_compilation,audio_converters,$(W_SAMPLERATE),converters/audio/libsamplerate_converter.ml)
 
79
 
 
80
video_converters = \
 
81
        converters/video_converter.ml \
 
82
        converters/video/native_video_converter.ml
 
83
 
 
84
$(call conditional_compilation,video_converters,$(W_GAVL),converters/video/gavl_converter.ml)
 
85
$(call conditional_compilation,video_converters,$(W_FFMPEG),converters/video/ffmpeg_video_converter.ml)
 
86
 
 
87
decoders = \
 
88
        decoder/metadata_decoder.ml \
 
89
        decoder/wav_decoder.ml decoder/midi_decoder.ml \
 
90
        decoder/image_decoder.ml decoder/image/ppm_decoder.ml \
 
91
        $(if ($(OS_TYPE):Win32=),decoder/external_decoder.ml)
 
92
 
 
93
$(call conditional_compilation,decoders,$(W_FLAC),decoder/flac_decoder.ml)
 
94
$(call conditional_compilation,decoders,$(W_FAAD),decoder/aac_decoder.ml)
 
95
$(call conditional_compilation,decoders,$(W_OGG),decoder/ogg_decoder.ml)
 
96
$(call conditional_compilation,decoders,$(W_MAD),decoder/mad_decoder.ml)
 
97
$(call conditional_compilation,decoders,$(W_VORBIS),decoder/vorbisduration.ml)
 
98
$(call conditional_compilation,decoders,$(W_FLAC),decoder/flacduration.ml)
 
99
$(call conditional_compilation,decoders,$(W_FLAC_OGG),decoder/ogg_flac_duration.ml)
 
100
$(call conditional_compilation,decoders,$(W_TAGLIB),decoder/taglib_plug.ml)
 
101
 
 
102
playlists = \
 
103
        playlists/playlist_basic.ml
 
104
 
 
105
$(call conditional_compilation,playlists,$(W_XMLPLAYLIST),playlists/playlist_xml.ml)
 
106
 
 
107
protocols = \
 
108
        $(if ($(OS_TYPE):Win32=),protocols/say.ml) \
 
109
        protocols/annotate.ml \
 
110
        protocols/mpd.ml \
 
111
        $(if ($(OS_TYPE):Win32=),protocols/extproto.ml)
 
112
 
 
113
sources = \
 
114
        sources/synthesized.ml sources/noise.ml sources/blank.ml \
 
115
        sources/audio_gen.ml sources/request_source.ml \
 
116
        sources/req_simple.ml sources/playlist.ml \
 
117
        sources/req_queue.ml sources/req_equeue.ml \
 
118
        sources/generated.ml sources/http_source.ml \
 
119
        tools/harbor.ml sources/harbor_input.ml \
 
120
        $(if ($(OS_TYPE):Win32=),sources/external_input.ml) \
 
121
        tools/liqMM.ml
 
122
 
 
123
$(call conditional_compilation,sources,$(W_BJACK),sources/bjack_in.ml)
 
124
 
 
125
operators = \
 
126
        operators/insert_metadata.ml operators/map_metadata.ml \
 
127
        operators/on_metadata.ml operators/store_metadata.ml \
 
128
        operators/on_track.ml operators/on_end.ml operators/delay.ml \
 
129
        operators/switch.ml operators/fade.ml operators/add.ml \
 
130
        operators/sequence.ml operators/cross.ml operators/smartcross.ml \
 
131
        operators/compress_exp.ml operators/pitch.ml \
 
132
        operators/fir_filter.ml operators/iir_filter.ml \
 
133
        operators/biquad_filter.ml operators/cuepoint.ml \
 
134
        operators/map_op.ml operators/flanger.ml operators/comb.ml \
 
135
        operators/compress.ml operators/clip.ml operators/filter.ml \
 
136
        operators/setvol.ml operators/normalize.ml operators/echo.ml \
 
137
        operators/append.ml operators/pan.ml operators/ms_stereo.ml \
 
138
        operators/dyn_op.ml operators/video_effects.ml operators/video_fade.ml \
 
139
        operators/noblank.ml operators/compand.ml \
 
140
        operators/mixing_table.ml operators/prepend.ml \
 
141
        operators/midi_routing.ml \
 
142
        operators/time_warp.ml operators/resample.ml \
 
143
        operators/chord.ml operators/video_text.ml
 
144
 
 
145
$(call conditional_compilation,operators,$(W_SOUNDTOUCH),operators/soundtouch_op.ml)
 
146
$(call conditional_compilation,operators,$(W_SOUNDTOUCH),operators/st_bpm.ml)
 
147
$(call conditional_compilation,operators,$(W_LADSPA),operators/ladspa_op.ml)
 
148
$(call conditional_compilation,operators,$(W_FREI0R),operators/frei0r_op.ml)
 
149
 
 
150
conversions = \
 
151
        conversions/audio_to_stereo.ml conversions/drop.ml conversions/id.ml \
 
152
        conversions/swap.ml conversions/mean.ml conversions/mux.ml
 
153
 
 
154
analyze = analyze/analyze_rms.ml
 
155
 
 
156
encoders = \
 
157
        encoder/wav_encoder.ml \
 
158
        encoder/lame_encoder.ml \
 
159
        encoder/aacplus_encoder.ml \
 
160
        $(if ($(OS_TYPE):Win32=),encoder/external_encoder.ml) \
 
161
        $(if $(W_LAME_DYN),encoder/lame_encoder_dynlink.ml) \
 
162
        $(if $(W_AACPLUS_DYN),encoder/aacplus_encoder_dynlink.ml)
 
163
 
 
164
$(call conditional_compilation,encoders,$(W_SHINE),encoder/shine_encoder.ml)
 
165
$(call conditional_compilation,encoders,$(W_LAME),encoder/lame_encoder_builtin.ml)
 
166
$(call conditional_compilation,encoders,$(W_FLAC),encoder/flac_encoder.ml)
 
167
$(call conditional_compilation,encoders,$(W_AACPLUS),encoder/aacplus_encoder_builtin.ml)
 
168
$(call conditional_compilation,encoders,$(W_VOAACENC),encoder/voaacenc_encoder.ml)
 
169
$(call conditional_compilation,encoders,$(W_FDKAAC),encoder/fdkaac_encoder.ml)
 
170
$(call conditional_compilation,encoders,$(W_TAGLIB),encoder/taglib_id3v2.ml)
 
171
 
 
172
outputs = outputs/output.ml \
 
173
        outputs/pipe_output.ml \
 
174
        outputs/harbor_output.ml
 
175
 
 
176
$(call conditional_compilation,outputs,$(W_AO),outputs/ao_out.ml)
 
177
$(call conditional_compilation,outputs,$(W_CRY),outputs/icecast2.ml)
 
178
$(call conditional_compilation,outputs,$(W_GRAPHICS),outputs/graphics_out.ml)
 
179
$(call conditional_compilation,outputs,$(W_BJACK),outputs/bjack_out.ml)
 
180
 
 
181
io = io/udp_io.ml
 
182
 
 
183
$(call conditional_compilation,io,$(W_OSS),io/oss_io.ml)
 
184
$(call conditional_compilation,io,$(W_PULSEAUDIO),io/pulseaudio_io.ml)
 
185
$(call conditional_compilation,io,$(W_PORTAUDIO),io/portaudio_io.ml)
 
186
 
 
187
tools = tools/stdlib.ml tools/doc.ml tools/plug.ml tools/utils.ml \
 
188
        $(if $(W_DYNLINK),tools/dyntools.ml) \
 
189
        tools/rqueue.ml \
 
190
        $(if $(W_LAME_DYN),tools/lame_dynlink.ml) \
 
191
        $(if $(W_AACPLUS_DYN),tools/aacplus_dynlink.ml) \
 
192
        tools/wav.ml tools/tutils.ml \
 
193
        tools/file_watcher.ml tools/file_watcher_mtime.ml \
 
194
        configure.ml \
 
195
        tools/http.ml tools/pool.ml
 
196
 
 
197
$(call conditional_compilation,tools,$(W_INOTIFY),tools/file_watcher_inotify.ml)
 
198
 
 
199
stream =stream/frame.ml stream/generator.ml \
 
200
        stream/aFrame.ml stream/vFrame.ml stream/mFrame.ml
 
201
 
 
202
visualization = visualization/vumeter.ml \
 
203
        visualization/midimeter.ml \
 
204
        visualization/video_volume.ml
 
205
 
 
206
$(call conditional_compilation,visualization,$(W_GRAPHICS),visualization/vis_volume.ml)
 
207
 
 
208
synth = synth/keyboard.ml synth/synth_op.ml
 
209
 
 
210
$(call conditional_compilation,synth,$(W_DSSI),synth/dssi_op.ml)
 
211
 
 
212
builtins = lang/lang_builtins.ml \
 
213
        $(if $(W_YOJSON),lang/builtins_json.ml)
 
214
 
 
215
$(call conditional_compilation,builtins,$(W_LO),lang/builtins_lo.ml)
 
216
$(call conditional_compilation,builtins,$(W_MAGIC),lang/builtins_magic.ml)
 
217
$(call conditional_compilation,builtins,$(W_CRY),lang/builtins_cry.ml)
 
218
 
 
219
liquidsoap_sources= $(tools) SVN.ml converters/audio_converter.ml $(stream) \
 
220
        decoder/decoder.ml request.ml tools/server.ml \
 
221
        source.ml clock.ml tools/rutils.ml \
 
222
        playlist_parser.ml encoder/encoder.ml \
 
223
        tools/server_builtins.ml
 
224
 
 
225
# Some for camlimages
 
226
$(call conditional_compilation,decoders,$(W_CAMLIMAGES),decoder/image/camlimages_decoder.ml)
 
227
 
 
228
# Include SDL now. Order matters so we group them all here..
 
229
$(call conditional_compilation,liquidsoap_sources,$(W_SDL),tools/sdl_utils.ml)
 
230
$(call conditional_compilation,synth,$(W_SDL),synth/keyboard_sdl.ml)
 
231
$(call conditional_compilation,decoders,$(W_SDL),decoder/image/sdlimage_decoder.ml)
 
232
$(call conditional_compilation,operators,$(W_SDL),operators/video_text_sdl.ml)
 
233
$(call conditional_compilation,outputs,$(W_SDL),outputs/sdl_out.ml)
 
234
 
 
235
# Same for lastfm..
 
236
$(call conditional_compilation,liquidsoap_sources,$(W_LASTFM),tools/liqfm.ml)
 
237
$(call conditional_compilation,protocols,$(W_LASTFM),protocols/lastfm_req.ml)
 
238
$(call conditional_compilation,sources,$(W_LASTFM),sources/lastfm_input.ml)
 
239
$(call conditional_compilation,builtins,$(W_LASTFM),lang/builtins_lastfm.ml)
 
240
 
 
241
# Same for alsa..
 
242
$(call conditional_compilation,liquidsoap_sources,$(W_ALSA), alsa_settings.ml)
 
243
$(call conditional_compilation,sources,$(W_ALSA),sources/alsa_in.ml)
 
244
$(call conditional_compilation,outputs,$(W_ALSA),outputs/alsa_out.ml)
 
245
$(call conditional_compilation,io,$(W_ALSA),io/alsa_io.ml)
 
246
 
 
247
# Same for GD..
 
248
$(call conditional_compilation,operators,$(W_GD),operators/video_text_gd.ml)
 
249
 
 
250
# GStreamer
 
251
$(call conditional_compilation,stream,$(W_GSTREAMER),tools/gstreamer_utils.ml)
 
252
$(call conditional_compilation,decoders,$(W_GSTREAMER),decoder/gstreamer_decoder.ml)
 
253
$(call conditional_compilation,encoders,$(W_GSTREAMER),encoder/gstreamer_encoder.ml)
 
254
$(call conditional_compilation,operators,$(W_GSTREAMER),operators/video_text_gstreamer.ml)
 
255
$(call conditional_compilation,io,$(W_GSTREAMER),io/gstreamer_io.ml)
 
256
 
 
257
liquidsoap_sources += \
 
258
        lang/lang_types.ml lang/lang_values.ml \
 
259
        lang/lang_encoders.ml lang/lang_parser.ml lang/lang_lexer.ml \
 
260
        lang/lang_pp.ml lang/lang.ml tools/start_stop.ml tools/ioRing.ml \
 
261
        tools/icecast_utils.ml \
 
262
        $(video_converters) $(audio_converters) $(ogg_demuxer) $(protocols) \
 
263
        $(sources) $(conversions) $(outputs) $(operators) \
 
264
        $(encoders) $(ogg_muxer) $(io) \
 
265
        $(analyze) $(playlists) $(visualization) $(synth) $(decoders) \
 
266
        shebang.ml $(builtins) main.ml \
 
267
        $(if $(W_WINSVC),runner_service.ml,runner.ml)
 
268
 
 
269
include $(top_srcdir)/Makefile.rules
 
270
 
 
271
configure.ml:
 
272
        @echo
 
273
        @echo " ERROR Missing src/configure.ml, Please run ./configure first!"
 
274
        @if [ -f ../configure-with-options ] ; then \
 
275
          echo "       Note that you can source configure-with-options" ; \
 
276
          echo "       for running configure with the same options as last time." \
 
277
        ; fi
 
278
        @echo
 
279
        @exit 1
 
280
 
 
281
OCAML_CFLAGS= -thread $(patsubst %,-I %,$(SUBDIRS))
 
282
DEP_OPTS= $(patsubst %,-I %,$(SUBDIRS))
 
283
 
 
284
liquidsoap_doc_sources= \
 
285
        source.ml clock.ml encoder/encoder.ml \
 
286
        tools/plug.ml tools/http.ml \
 
287
        decoder/decoder.ml request.ml outputs/output.ml \
 
288
        lang/lang.ml lang/lang_types.ml lang/lang_values.ml \
 
289
        tools/server.ml tools/tutils.ml playlist_parser.ml \
 
290
        tools/doc.ml tools/wav.ml tools/ioRing.ml \
 
291
        tools/dyntools.ml \
 
292
        converters/audio_converter.ml converters/video_converter.ml \
 
293
        ogg_formats/ogg_muxer.ml \
 
294
        sources/generated.ml sources/request_source.ml sources/synthesized.ml \
 
295
        operators/switch.ml \
 
296
        configure.ml \
 
297
        stream/frame.ml stream/aFrame.ml \
 
298
        stream/vFrame.ml stream/mFrame.ml stream/generator.ml
 
299
 
 
300
# Compute something like " (trunk/liquidsoap@rev1234)" when .svn is present,
 
301
SVN.ml: Makefile $(liquidsoap_sources:SVN.ml=)
 
302
        if test -e ../.git && which git > /dev/null ; then \
 
303
          url=`git remote -v | grep fetch | sed 's/origin[ \t]*//' | sed 's/[ \t]*(.*)//'` ; \
 
304
          head=`git rev-parse HEAD` ; \
 
305
          date=`date +%Y%m%d:%H%M%S`; \
 
306
          echo "let rev = \" ($$url@$$head:$$date)\"" > SVN.ml ; \
 
307
        elif test -d .svn && which svn > /dev/null ; then \
 
308
          url=`LC_ALL=C svn info | grep URL | \
 
309
               sed -e 's:.*svnroot/savonet/\(.*\)/src:\1:'`; \
 
310
          revision=`LC_ALL=C svn info | grep Revision | \
 
311
                    sed -e 's/Revision: \(.*\)/\1/'`  ; \
 
312
          echo "let rev = \" ($$url@rev$$revision)\"" > SVN.ml ; \
 
313
        elif test -d ../../.hg && which hg > /dev/null ; then \
 
314
          branch=`hg branch`; \
 
315
          revision=`LC_ALL=C hg parents | grep changeset: | \
 
316
               sed -e 's/changeset: *['0'-'9']*:\([^ ]*\).*/\1/'`; \
 
317
          date=`date +%Y%m%d:%H%M%S`; \
 
318
          echo "let rev = \" ($$branch@$$revision:$$date)\"" > SVN.ml ; \
 
319
        else \
 
320
          echo "let rev = \"\"" > SVN.ml ; \
 
321
        fi
 
322
 
 
323
clean-local:
 
324
        rm -f SVN.ml
 
325
 
 
326
install-plugin-%:
 
327
        $(INSTALL_DATA) plugins/$*.$(s) $(libdir)/liquidsoap/$(libs_dir_version)/plugins
 
328
 
 
329
install_plugins=\
 
330
$(eval INSTALL_PLUGINS+=install-plugin-$(1))
 
331
$(foreach plugin,$(liquidsoap_PLUGINS),$(call install_plugins,$(plugin)))
 
332
 
 
333
install-plugin-dir:
 
334
        $(INSTALL_DIRECTORY) $(libdir)/liquidsoap/$(libs_dir_version)/plugins
 
335
 
 
336
install-local: all-auto install-plugin-dir $(INSTALL_PLUGINS)
 
337
        $(INSTALL) -d $(bindir)
 
338
        $(INSTALL_PROGRAM) liquidsoap $(bindir)
 
339
ifneq ($(BYTE),)
 
340
  ifneq ($(NO_CUSTOM),)
 
341
        $(OCAMLFIND) install liquidsoap META dllliquidsoap.so $(wildcard plugins/dll*.so)
 
342
  else
 
343
        $(OCAMLFIND) install liquidsoap META $(wildcard plugins/dll*.so)
 
344
  endif
 
345
endif
 
346
 
 
347
# Dirty hack since ocamlcp does not play nicely with include
 
348
profile:
 
349
        -$(MAKE)
 
350
        cd lang; ocamlc -c -I .. -I ../tools lang_values.ml
 
351
        $(MAKE)