~siretart/vlc/ubuntu

1 by Reinhard Tartler
Import upstream version 0.9.2
1
###############################################################################
2
# Automake targets and declarations
3
###############################################################################
4
5
AUTOMAKE_OPTIONS = subdir-objects
6
SUBDIRS = . test
7
8
NULL =
9
EXTRA_DIST = extras/COPYING modules/builtin.h.in \
10
	misc/beos_specific.cpp \
11
	libvlc.pc.in \
12
	vlc-plugin.pc.in \
13
	libvlc.sym \
14
	libvlccore.sym
15
16
BUILT_SOURCES = modules/builtin.h misc/revision.c ../include/vlc_about.h
17
CLEANFILES = $(BUILT_SOURCES)
18
19
SUFFIXES = .pc.in .pc
20
21
###############################################################################
22
# Headers
23
###############################################################################
24
25
pkgincludedir = $(includedir)/vlc
26
pluginsincludedir = $(pkgincludedir)/plugins
27
28
pkginclude_HEADERS = \
29
	../include/vlc/vlc.h \
30
	../include/vlc/deprecated.h \
31
	../include/vlc/libvlc.h \
32
	../include/vlc/libvlc_structures.h \
33
	../include/vlc/libvlc_media_list.h \
34
	../include/vlc/libvlc_events.h \
35
	../include/vlc/libvlc_vlm.h \
36
	../include/vlc/mediacontrol.h \
37
	../include/vlc/mediacontrol_structures.h \
38
	$(NULL)
39
40
pluginsinclude_HEADERS = \
41
	../include/vlc_access.h \
42
	../include/vlc_acl.h \
43
	../include/vlc_aout.h \
44
	../include/vlc_arrays.h \
45
	../include/vlc_bits.h \
46
	../include/vlc_block.h \
47
	../include/vlc_block_helper.h \
48
	../include/vlc_charset.h \
49
	../include/vlc_codec.h \
50
	../include/vlc_common.h \
51
	../include/vlc_config.h \
52
	../include/vlc_config_cat.h \
53
	../include/vlc_configuration.h \
54
	../include/vlc_demux.h \
55
	../include/vlc_epg.h \
56
	../include/vlc_es.h \
57
	../include/vlc_es_out.h \
58
	../include/vlc_events.h \
59
	../include/vlc_filter.h \
60
	../include/vlc_gcrypt.h \
61
	../include/vlc_httpd.h \
62
	../include/vlc_image.h \
63
	../include/vlc_input.h \
64
	../include/vlc_main.h \
65
	../include/vlc_md5.h \
66
	../include/vlc_messages.h \
67
	../include/vlc_meta.h \
68
	../include/vlc_modules.h \
69
	../include/vlc_mtime.h \
70
	../include/vlc_objects.h \
71
	../include/vlc_playlist.h \
72
	../include/vlc_plugin.h \
73
	../include/vlc_rand.h \
74
	../include/vlc_services_discovery.h \
75
	../include/vlc_sout.h \
76
	../include/vlc_stream.h \
77
	../include/vlc_strings.h \
78
	../include/vlc_threads.h \
79
	../include/vlc_url.h \
80
	../include/vlc_variables.h \
81
	../include/vlc_vlm.h \
82
	../include/vlc_vout.h \
83
	../include/vlc_window.h \
84
	../include/vlc_xml.h \
85
	$(NULL)
86
87
noinst_HEADERS = \
88
	../include/mmx.h \
89
	../include/vlc_codec_synchro.h \
90
	../include/vlc_codecs.h \
91
	../include/vlc_devices.h \
92
	../include/vlc_fixups.h \
93
	../include/vlc_interface.h \
94
	../include/vlc_intf_strings.h \
95
	../include/vlc_iso_lang.h \
96
	../include/vlc_keys.h \
97
	../include/vlc_network.h \
98
	../include/vlc_osd.h \
99
	../include/vlc_pgpkey.h \
100
	../include/vlc_tls.h \
101
	../include/vlc_update.h \
102
	../include/vlc_vod.h \
103
	$(NULL)
104
105
modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
106
	rm -f -- "$@.tmp"
107
	cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
108
if !HAVE_PLUGINS
109
	plugins="$$($(VLC_CONFIG) --list plugin)" ; \
110
	test -n "$${plugins}" && \
111
	for p in $${plugins}; do \
112
		echo "int vlc_entry__$$p (module_t *);" ; \
113
	done >> "$@.tmp"
114
endif
115
	echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
116
	echo "    do \\" >> "$@.tmp"
117
	echo "    { \\" >> "$@.tmp"
118
if !HAVE_PLUGINS
119
	plugins="$$($(VLC_CONFIG) --list plugin)" ; \
120
	test -n "$${plugins}" && \
121
	for p in $${plugins}; do \
122
		echo "        ALLOCATE_BUILTIN($$p); \\" ; \
123
	done >> "$@.tmp"
124
endif
125
	echo '    } while( 0 );' >> "$@.tmp"
126
	mv -f -- "$@.tmp" "$@"
127
128
modules/modules.c: modules/builtin.h
129
130
../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
131
	rm -f -- "$@.tmp"
132
	mkdir -p -- ../include
133
	echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
134
	echo "static const char psz_license[] =" >> "$@.tmp"
135
	cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
136
	echo ";" >> "$@.tmp"
137
	echo "static const char psz_thanks[] =" >> "$@.tmp"
138
	grep -v '$$Id:'  $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
139
	echo ";" >> "$@.tmp"
140
	echo "static const char psz_authors[] =" >> "$@.tmp"
141
	grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
142
	echo ";" >> "$@.tmp"
143
	mv -f -- "$@.tmp" "$@"
144
145
###############################################################################
146
# pkg-config integration
147
###############################################################################
148
149
pkgconfigdir = $(libdir)/pkgconfig
150
pkgconfig_DATA = libvlc.pc vlc-plugin.pc
151
CLEANFILES += $(pkgconfig_DATA)
152
153
.pc.in.pc: $(top_builddir)/config.status
154
	cd "$(top_builddir)" && \
155
	$(SHELL) ./config.status --file="src/$@"
156
157
###############################################################################
158
# Building libvlc
159
###############################################################################
160
161
nice:
162
	$(top_builddir)/compile
163
164
lib_LTLIBRARIES = libvlccore.la libvlc.la
165
166
AM_LDFLAGS = -no-undefined
167
if HAVE_WIN32
168
AM_LDFLAGS += -avoid-version
169
endif
170
171
libvlccore_la_SOURCES = $(SOURCES_libvlc)
172
nodist_libvlccore_la_SOURCES = misc/revision.c
173
libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
174
	-DMODULE_STRING=\"main\" \
175
	-DLOCALEDIR=\"$(localedir)\" \
176
	-DSYSCONFDIR=\"$(sysconfdir)\" \
177
	-DDATA_PATH=\"$(pkgdatadir)\" \
178
	-DLIBDIR=\"$(libdir)\" \
179
	-DPLUGIN_PATH=\"$(pkglibdir)\"
180
libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
181
	-export-symbols $(srcdir)/libvlccore.sym \
182
	-version-info 0:2:0
183
libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
184
libvlccore_la_DEPENDENCIES = libvlccore.sym
185
if HAVE_WIN32
186
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
187
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
188
endif
189
190
libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
191
	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
192
193
libvlc_la_SOURCES = $(SOURCES_libvlc_control)
194
libvlc_la_LIBADD = libvlccore.la
195
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
196
	-DMODULE_STRING=\"control\"
197
libvlc_la_LDFLAGS = $(AM_LDFLAGS) \
198
	-version-info 2:2:0 \
199
	-export-symbols $(srcdir)/libvlc.sym
200
libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
201
if HAVE_WIN32
202
libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
203
libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
204
endif
205
206
207
EXTRA_libvlccore_la_SOURCES = \
208
	$(SOURCES_libvlc_beos) \
209
	$(SOURCES_libvlc_darwin) \
210
	$(SOURCES_libvlc_linux) \
211
	$(SOURCES_libvlc_win32) \
212
	$(SOURCES_libvlc_other) \
213
	$(SOURCES_libvlc_dirent) \
214
	$(SOURCES_libvlc_getopt) \
215
	$(SOURCES_libvlc_sout) \
216
	$(SOURCES_libvlc_vlm) \
217
	$(NULL)
218
if HAVE_BEOS
219
libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
220
else
221
if HAVE_DARWIN
222
libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
223
else
224
if HAVE_LINUX
225
libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
226
else
227
if HAVE_WIN32
228
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
229
else
230
if HAVE_WINCE
231
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
232
else
233
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
234
endif
235
endif
236
endif
237
endif
238
endif
239
if BUILD_DIRENT
240
libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
241
endif
242
if BUILD_GETOPT
243
libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
244
endif
245
if ENABLE_SOUT
246
libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
247
if ENABLE_VLM
248
libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
249
endif
250
endif
251
252
SOURCES_libvlc_beos = \
253
	$(NULL)
254
255
SOURCES_libvlc_darwin = \
256
	misc/darwin_specific.c \
257
	$(NULL)
258
259
SOURCES_libvlc_linux = \
260
	misc/linux_specific.c \
261
	$(NULL)
262
263
SOURCES_libvlc_win32 = \
264
	misc/win32_specific.c \
265
	network/winsock.c \
266
	$(NULL)
267
268
SOURCES_libvlc_other = misc/not_specific.c
269
270
SOURCES_libvlc_dirent = \
271
	extras/dirent.c \
272
	$(NULL)
273
274
SOURCES_libvlc_getopt = \
275
	extras/getopt.c \
276
	extras/getopt.h \
277
	extras/getopt1.c \
278
	$(NULL)
279
280
SOURCES_libvlc_common = \
281
	libvlc.c \
282
	libvlc.h \
283
	libvlc-module.c \
284
	version.c \
285
	interface/interface.h \
286
	interface/interface.c \
287
	interface/intf_eject.c \
288
	interface/interaction.c \
289
	playlist/playlist_internal.h \
290
	playlist/thread.c \
291
	playlist/control.c \
292
	playlist/engine.c \
293
	playlist/sort.c \
294
	playlist/loadsave.c \
295
	playlist/tree.c \
296
	playlist/item.c \
297
	playlist/search.c \
298
	playlist/services_discovery.c \
299
	input/item.c \
300
	input/access.c \
301
	input/clock.c \
302
	input/control.c \
303
	input/decoder.c \
304
	input/decoder_synchro.c \
305
	input/demux.c \
306
	input/es_out.c \
307
	input/input.c \
308
	input/meta.c \
309
	input/input_internal.h \
310
	input/vlm_internal.h \
311
	input/stream.c \
312
	input/mem_stream.c \
313
	input/subtitles.c \
314
	input/var.c \
315
	video_output/video_output.c \
316
	video_output/vout_pictures.c \
317
	video_output/vout_pictures.h \
318
	video_output/video_text.c \
319
	video_output/video_widgets.c \
320
	video_output/vout_subpictures.c \
321
	video_output/vout_intf.c \
322
	audio_output/aout_internal.h \
323
	audio_output/common.c \
324
	audio_output/dec.c \
325
	audio_output/filters.c \
326
	audio_output/input.c \
327
	audio_output/mixer.c \
328
	audio_output/output.c \
329
	audio_output/intf.c \
330
	osd/osd.c \
331
	osd/osd_text.c \
332
	osd/osd_widgets.c \
333
	network/acl.c \
334
	network/getaddrinfo.c \
335
	network/io.c \
336
	network/tcp.c \
337
	network/udp.c \
338
	network/httpd.c \
339
	network/rootbind.c \
340
	network/tls.c \
341
	network/poll.c \
342
	text/charset.c \
343
	text/strings.c \
344
	text/unicode.c \
345
	text/wincp.c \
346
	text/iso_lang.c \
347
	text/iso-639_def.h \
348
	misc/md5.c \
349
	misc/rand.c \
350
	misc/mtime.c \
351
	misc/block.c \
352
	misc/es_format.c \
353
	modules/modules.h \
354
	modules/modules.c \
355
	modules/cache.c \
356
	modules/entry.c \
357
	modules/os.c \
358
	misc/threads.c \
359
	misc/stats.c \
360
	misc/cpu.c \
361
	misc/action.c \
362
	config/configuration.h \
363
	config/core.c \
364
	config/dirs.c \
365
	config/chain.c \
366
	config/file.c \
367
	config/intf.c \
368
	config/cmdline.c \
369
	misc/events.c \
370
	misc/image.c \
371
	misc/messages.c \
372
	misc/objects.c \
373
	misc/variables.h \
374
	misc/variables.c \
375
	misc/error.c \
376
	misc/update.h \
377
	misc/update.c \
378
	misc/xml.c \
379
	misc/devices.c \
380
	extras/libc.c \
381
	misc/filter_chain.c \
382
	$(NULL)
383
384
SOURCES_libvlc_sout = \
385
	stream_output/stream_output.c \
386
	stream_output/stream_output.h \
387
	stream_output/announce.c \
388
	stream_output/sap.c \
389
	stream_output/sdp.c \
390
	$(NULL)
391
392
SOURCES_libvlc_vlm = \
393
	input/vlm.c \
394
	input/vlmshell.c \
395
	$(NULL)
396
397
SOURCES_libvlc = \
398
	$(SOURCES_libvlc_common) \
399
	$(OPT_SOURCES_libvlc_beos) \
400
	$(OPT_SOURCES_libvlc_darwin) \
401
	$(OPT_SOURCES_libvlc_win32) \
402
	$(OPT_SOURCES_libvlc_dirent) \
403
	$(OPT_SOURCES_libvlc_getopt) \
404
	$(NULL)
405
406
SOURCES_libvlc_control = \
407
	control/libvlc_internal.h \
408
	control/core.c \
409
	control/log.c \
410
	control/playlist.c \
411
	control/vlm.c \
412
	control/video.c \
413
	control/audio.c \
414
	control/event.c \
415
	control/flat_media_list_view.c \
416
	control/hierarchical_media_list_view.c \
417
	control/hierarchical_node_media_list_view.c \
418
	control/media.c \
419
	control/media_player.c \
420
	control/media_list.c \
421
	control/media_list_path.h \
422
	control/media_list_player.c \
423
	control/media_list_view.c \
424
	control/media_library.c \
425
	control/mediacontrol_internal.h \
426
	control/mediacontrol_core.c \
427
	control/mediacontrol_util.c \
428
	control/mediacontrol_audio_video.c \
429
	control/media_discoverer.c
430
431
###############################################################################
432
# Stamp rules
433
###############################################################################
434
435
misc/revision.c:
436
	rm -f $@ $@.tmp
437
	echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
438
	REVISION="$$(LANG=C git --git-dir=$(top_srcdir)/.git show-ref --head -s HEAD 2>/dev/null || echo exported)"; \
439
	REVISION="$$(echo $$REVISION|cut -b -10)"; \
440
	echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
441
	mv -f $@.tmp $@
442
443
444
###############################################################################
445
# Unit/regression test
446
###############################################################################
447
448
dist_check_SCRIPTS = check_symbols check_headers
449
TESTS = check_symbols
450
451
check-local:
452
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
453
	do \
454
		echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
455
		if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
456
		then \
457
			echo "Header $$h not included in test/headers.c!"; \
458
			exit 1; \
459
		fi ; \
460
	done
461
	$(srcdir)/check_headers $(pkginclude_HEADERS)
462
	$(srcdir)/check_headers $(pluginsinclude_HEADERS)
463
464
FORCE:
465
	@echo "Generated source cannot be phony. Go away." >&2
466
	@exit 1
467
468
.PHONY: FORCE