Makefile.am 14.5 KB
Newer Older
1
###############################################################################
2 3 4
# Automake targets and declarations
###############################################################################

5 6
AUTOMAKE_OPTIONS = subdir-objects

7
NULL =
8
EXTRA_DIST = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
9
	vlc-plugin.pc.in \
10
	libvlccore.sym \
11
	revision.txt
12

13
BUILT_SOURCES = $(nodist_pluginsinclude_HEADERS)
Christophe Mutricy's avatar
Christophe Mutricy committed
14
CLEANFILES = $(BUILT_SOURCES)
15

16
SUFFIXES = .pc.in .pc .rc.in .rc
17

18 19 20 21
###############################################################################
# Headers
###############################################################################

22
pluginsincludedir = $(pkgincludedir)/plugins
23

24
pluginsinclude_HEADERS = \
25
	../include/vlc_access.h \
26
	../include/vlc_actions.h \
Rafaël Carré's avatar
Rafaël Carré committed
27
	../include/vlc_addons.h \
28
	../include/vlc_aout.h \
29
	../include/vlc_aout_volume.h \
30
	../include/vlc_arrays.h \
31
	../include/vlc_atomic.h \
32
	../include/vlc_avcodec.h \
33 34 35
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
36
	../include/vlc_boxes.h \
37 38
	../include/vlc_charset.h \
	../include/vlc_codec.h \
39 40
	../include/vlc_common.h \
	../include/vlc_config.h \
41
	../include/vlc_config_cat.h \
42
	../include/vlc_configuration.h \
43
	../include/vlc_cpu.h \
44
	../include/vlc_dialog.h \
45
	../include/vlc_demux.h \
46
	../include/vlc_epg.h \
47
	../include/vlc_es.h \
48 49
	../include/vlc_es_out.h \
	../include/vlc_events.h \
50
	../include/vlc_filter.h \
51
	../include/vlc_fourcc.h \
52
	../include/vlc_fs.h \
53
	../include/vlc_gcrypt.h \
54
	../include/vlc_opengl.h \
55
	../include/vlc_http.h \
56
	../include/vlc_httpd.h \
57
	../include/vlc_image.h \
58
	../include/vlc_inhibit.h \
59
	../include/vlc_input.h \
60
	../include/vlc_input_item.h \
61
	../include/vlc_interface.h \
Thomas Guillem's avatar
Thomas Guillem committed
62
	../include/vlc_keystore.h \
63
	../include/vlc_md5.h \
64
	../include/vlc_messages.h \
65
	../include/vlc_meta.h \
66
	../include/vlc_meta_fetcher.h \
Srikanth Raju's avatar
Srikanth Raju committed
67
	../include/vlc_media_library.h \
68
	../include/vlc_memstream.h \
69
	../include/vlc_mime.h \
70
	../include/vlc_modules.h \
Pierre Ynard's avatar
Pierre Ynard committed
71
	../include/vlc_mouse.h \
72
	../include/vlc_mtime.h \
73
	../include/vlc_network.h \
74
	../include/vlc_objects.h \
75
	../include/vlc_picture.h \
76 77
	../include/vlc_picture_fifo.h \
	../include/vlc_picture_pool.h \
78
	../include/vlc_playlist.h \
79
	../include/vlc_plugin.h \
80
	../include/vlc_probe.h \
81 82
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
83
	../include/vlc_fingerprinter.h \
84
	../include/vlc_interrupt.h \
85
	../include/vlc_renderer_discovery.h \
86
	../include/vlc_sout.h \
87
	../include/vlc_spu.h \
88
	../include/vlc_stream.h \
89
	../include/vlc_stream_extractor.h \
90
	../include/vlc_strings.h \
91
	../include/vlc_subpicture.h \
92
	../include/vlc_text_style.h \
93
	../include/vlc_threads.h \
94
	../include/vlc_timestamp_helper.h \
95
	../include/vlc_tls.h \
96
	../include/vlc_url.h \
97
	../include/vlc_variables.h \
98
	../include/vlc_viewpoint.h \
99
	../include/vlc_vlm.h \
100
	../include/vlc_video_splitter.h \
101
	../include/vlc_vout.h \
102
	../include/vlc_vout_display.h \
103
	../include/vlc_vout_osd.h \
104
	../include/vlc_vout_window.h \
105
	../include/vlc_xml.h \
106
	../include/vlc_xlib.h \
107
	$(NULL)
108
nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
109

110
noinst_HEADERS = \
111
	../include/vlc_codecs.h \
Pierre Ynard's avatar
Pierre Ynard committed
112
	../include/vlc_extensions.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
113
	../include/vlc_fixups.h \
114
	../include/vlc_intf_strings.h \
115
	../include/vlc_iso_lang.h \
Pierre Ynard's avatar
Pierre Ynard committed
116
	../include/vlc_memory.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
117
	../include/vlc_pgpkey.h \
118 119
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
120
	../include/vlc_vout_wrapper.h \
121 122
	$(NULL)

123
../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
124 125 126 127 128 129 130
	$(AM_V_at)rm -f -- "$@.tmp"
	$(AM_V_at)mkdir -p -- ../include
	$(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
	echo "static const char psz_license[] =" && \
	sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
	echo ";" && \
	echo "static const char psz_thanks[] =" && \
JP Dinger's avatar
JP Dinger committed
131
	sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
132 133 134
		"$(top_srcdir)/THANKS" && \
	echo ";" && \
	echo "static const char psz_authors[] =" && \
135
	sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
136 137 138
		"$(top_srcdir)/AUTHORS" && \
	echo ";") >> "$@.tmp"
	$(AM_V_at)mv -f -- "$@.tmp" "$@"
139

140 141 142 143 144
###############################################################################
# pkg-config integration
###############################################################################

pkgconfigdir = $(libdir)/pkgconfig
145
pkgconfig_DATA = vlc-plugin.pc
146 147
CLEANFILES += $(pkgconfig_DATA)

148
.pc.in.pc: $(top_builddir)/config.status
149
	$(AM_V_GEN)cd "$(top_builddir)" && \
150 151
	$(SHELL) ./config.status --file="src/$@"

152 153 154 155 156 157 158 159 160 161 162 163 164
##############################################################################
# Windows resource files
##############################################################################

if HAVE_WIN32
noinst_DATA = libvlc_win32_rc.rc
endif
EXTRA_DIST += libvlc_win32_rc.rc.in

.rc.in.rc: $(top_builddir)/config.status
	cd "$(top_builddir)" && \
	$(SHELL) ./config.status --file="src/$@"

165 166 167 168
###############################################################################
# Building libvlc
###############################################################################

169
lib_LTLIBRARIES = libvlccore.la
170

171
AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
Rafaël Carré's avatar
Rafaël Carré committed
172
	-DMODULE_STRING=\"core\" \
173
	-DLOCALEDIR=\"$(localedir)\" \
174
	-DPKGDATADIR=\"$(vlcdatadir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
175
	-DPKGLIBDIR=\"$(vlclibdir)\"
176
AM_CFLAGS = $(CFLAGS_libvlccore)
177 178 179
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
endif
180 181 182 183
if HAVE_DBUS
AM_CPPFLAGS += -DHAVE_DBUS
AM_CFLAGS += $(DBUS_CFLAGS)
endif
184

185
libvlccore_la_SOURCES = \
186 187
	libvlc.c \
	libvlc.h \
188
	libvlc-module.c \
189
	missing.c \
190
	revision.c \
191
	version.c \
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
	config/configuration.h \
	config/core.c \
	config/chain.c \
	config/file.c \
	config/help.c \
	config/intf.c \
	config/cmdline.c \
	config/getopt.c \
	config/vlc_getopt.h \
	extras/libc.c \
	extras/tdestroy.c \
	modules/modules.h \
	modules/modules.c \
	modules/bank.c \
	modules/cache.c \
	modules/entry.c \
	modules/textdomain.c \
209
	interface/dialog.c \
210
	interface/interface.c \
211
	playlist/playlist_internal.h \
212
	playlist/art.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
213
	playlist/art.h \
214
	playlist/aout.c \
215 216 217
	playlist/thread.c \
	playlist/control.c \
	playlist/engine.c \
218
	playlist/fetcher.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
219
	playlist/fetcher.h \
220 221
	playlist/sort.c \
	playlist/loadsave.c \
222
	playlist/preparser.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
223
	playlist/preparser.h \
224
	playlist/tree.c \
225
	playlist/item.c \
226
	playlist/search.c \
227
	playlist/services_discovery.c \
228
	playlist/renderer.c \
229
	input/item.c \
230 231 232 233 234
	input/access.c \
	input/clock.c \
	input/control.c \
	input/decoder.c \
	input/demux.c \
235
	input/demux_chained.c \
236
	input/es_out.c \
237
	input/es_out_timeshift.c \
238
	input/event.c \
239
	input/input.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
240
	input/info.h \
241
	input/meta.c \
242 243
	input/clock.h \
	input/decoder.h \
244
	input/demux.h \
245
	input/es_out.h \
246
	input/es_out_timeshift.h \
247
	input/event.h \
248
	input/item.h \
249
	input/mrl_helpers.h \
250
	input/stream.h \
251
	input/input_internal.h \
252
	input/input_interface.h \
253
	input/vlm_internal.h \
Laurent Aimar's avatar
Laurent Aimar committed
254
	input/vlm_event.h \
255 256
	input/resource.h \
	input/resource.c \
257
	input/services_discovery.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
258
	input/stats.c \
259
	input/stream.c \
260
	input/stream_fifo.c \
261
	input/stream_extractor.c \
262
	input/stream_filter.c \
263
	input/stream_memory.c \
264 265
	input/subtitles.c \
	input/var.c \
266 267 268 269 270 271
	audio_output/aout_internal.h \
	audio_output/common.c \
	audio_output/dec.c \
	audio_output/filters.c \
	audio_output/output.c \
	audio_output/volume.c \
Rémi Duraffort's avatar
Rémi Duraffort committed
272
	video_output/chrono.h \
273 274
	video_output/control.c \
	video_output/control.h \
275 276
	video_output/display.c \
	video_output/display.h \
Pierre Ynard's avatar
Pierre Ynard committed
277
	video_output/event.h \
278 279
	video_output/inhibit.c \
	video_output/inhibit.h \
280 281
	video_output/interlacing.c \
	video_output/interlacing.h \
282 283
	video_output/snapshot.c \
	video_output/snapshot.h \
284
	video_output/statistic.h \
285 286
	video_output/video_output.c \
	video_output/video_text.c \
287
	video_output/video_epg.c \
288 289
	video_output/video_widgets.c \
	video_output/vout_subpictures.c \
François Cartegnie's avatar
François Cartegnie committed
290
	video_output/vout_spuregion_helper.h \
291
	video_output/window.c \
292
	video_output/window.h \
293
	video_output/opengl.c \
294
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
295
	video_output/vout_internal.h \
296
	video_output/vout_control.h \
297
	video_output/vout_wrapper.c \
298
	network/getaddrinfo.c \
299
	network/http_auth.c \
300
	network/httpd.c \
301 302 303
	network/io.c \
	network/tcp.c \
	network/udp.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
304
	network/rootbind.c \
305
	network/tls.c \
306
	text/charset.c \
307
	text/memstream.c \
308 309
	text/strings.c \
	text/unicode.c \
310
	text/url.c \
311
	text/filesystem.c \
312 313
	text/iso_lang.c \
	text/iso-639_def.h \
314
	misc/actions.c \
315 316
	misc/background_worker.c \
	misc/background_worker.h \
317
	misc/md5.c \
318
	misc/probe.c \
319
	misc/rand.c \
320 321
	misc/mtime.c \
	misc/block.c \
322
	misc/fifo.c \
323
	misc/fourcc.c \
324
	misc/fourcc_list.h \
325
	misc/es_format.c \
326
	misc/picture.c \
327
	misc/picture.h \
328 329
	misc/picture_fifo.c \
	misc/picture_pool.c \
330 331
	misc/interrupt.h \
	misc/interrupt.c \
Thomas Guillem's avatar
Thomas Guillem committed
332
	misc/keystore.c \
333
	misc/renderer_discovery.c \
334 335
	misc/threads.c \
	misc/cpu.c \
336
	misc/epg.c \
337
	misc/exit.c \
338
	misc/events.c \
339 340
	misc/image.c \
	misc/messages.c \
341
	misc/mime.c \
342
	misc/objects.c \
343
	misc/objres.c \
Clément Stenac's avatar
Clément Stenac committed
344
	misc/variables.h \
345 346 347
	misc/variables.c \
	misc/error.c \
	misc/xml.c \
348
	misc/addons.c \
Laurent Aimar's avatar
Laurent Aimar committed
349
	misc/filter.c \
350
	misc/filter_chain.c \
351
	misc/httpcookies.c \
352
	misc/fingerprinter.c \
353
	misc/text_style.c \
354
	misc/subpicture.c \
355
	misc/subpicture.h
356 357 358 359
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
	../compat/libcompat.la \
	$(LTLIBINTL) $(LTLIBICONV) \
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
360

361 362 363 364 365 366 367
if HAVE_WIN32
libvlccore_la_SOURCES += \
	win32/dirs.c \
	win32/error.c \
	win32/filesystem.c \
	win32/netconf.c \
	win32/plugin.c \
368
	win32/rand.c \
369
	win32/specific.c \
370 371
	win32/thread.c \
	win32/winsock.c
372 373 374 375 376
if HAVE_WINSTORE
libvlccore_la_SOURCES += posix/timer.c
else
libvlccore_la_SOURCES += win32/timer.c
endif
377 378 379 380 381 382
else
if HAVE_OS2
libvlccore_la_SOURCES += \
	os2/dirs.c \
	darwin/error.c \
	os2/filesystem.c \
383
	os2/getaddrinfo.c \
384 385 386
	os2/netconf.c \
	os2/plugin.c \
	os2/specific.c \
387 388 389
	os2/rand.c \
	os2/thread.c
else
Julian Scheel's avatar
Julian Scheel committed
390 391 392 393 394 395 396 397 398 399
if HAVE_NACL
libvlccore_la_SOURCES += \
	android/error.c \
	posix/dirs.c \
	posix/filesystem.c \
	posix/netconf.c \
	posix/rand.c \
	posix/specific.c \
	posix/timer.c
else
400 401 402 403 404 405 406 407 408
libvlccore_la_SOURCES += \
	posix/filesystem.c \
	posix/plugin.c \
	posix/rand.c \
	posix/timer.c
if HAVE_ANDROID
libvlccore_la_SOURCES += \
	android/error.c \
	android/specific.c \
Thomas Guillem's avatar
Thomas Guillem committed
409 410 411
	android/thread.c \
	linux/cpu.c \
	linux/dirs.c \
412
	linux/thread.c
413 414 415 416 417 418 419 420
else
if HAVE_DARWIN
libvlccore_la_SOURCES += \
	darwin/dirs.c \
	darwin/error.c \
	darwin/netconf.c \
	darwin/specific.c \
	darwin/thread.c
421 422 423 424 425 426
else
libvlccore_la_SOURCES += \
	posix/dirs.c \
	posix/error.c \
	posix/netconf.c \
	posix/specific.c \
427 428 429 430 431
	posix/thread.c
if HAVE_LINUX
libvlccore_la_SOURCES += \
	linux/cpu.c \
	linux/dirs.c \
432
	linux/getaddrinfo.c \
433
	linux/thread.c
434 435 436 437 438 439 440 441
libvlccore_la_LIBADD += -lanl
else
libvlccore_la_SOURCES += \
	posix/getaddrinfo.c
endif
endif
endif
endif
442
endif
Julian Scheel's avatar
Julian Scheel committed
443
endif
444

445 446 447 448 449 450 451 452
if ENABLE_SOUT
libvlccore_la_SOURCES += \
	stream_output/sap.c stream_output/sdp.c \
	stream_output/stream_output.c stream_output/stream_output.h
if ENABLE_VLM
libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
endif
endif
453

454 455 456 457 458 459 460 461 462
if UPDATE_CHECK
libvlccore_la_SOURCES += \
	misc/update.h misc/update.c \
	misc/update_crypto.c
AM_CPPFLAGS += -DUPDATE_CHECK
AM_CFLAGS += $(GCRYPT_CFLAGS)
libvlccore_la_LIBADD += $(GCRYPT_LIBS)
endif

463 464
libvlccore_la_LDFLAGS = \
	$(LDFLAGS_libvlccore) \
465
	-no-undefined \
466
	-export-symbols $(srcdir)/libvlccore.sym \
467
	-version-info 9:0:0
468 469 470
libvlccore_la_DEPENDENCIES = libvlccore.sym
if HAVE_WIN32
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
471
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static $(LIBCOM)
472 473 474 475 476 477 478
endif
if HAVE_OS2
libvlccore_la_LDFLAGS += -avoid-version
endif
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
479 480 481
if HAVE_DARWIN
libvlccore_la_LDFLAGS += -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib
endif
482

483
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc $(top_srcdir)/extras/package/win32/libvlc.dll.manifest
484
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
485

486 487 488
# FourCC tables
BUILT_SOURCES += fourcc_tables.h
EXTRA_DIST += misc/fourcc_gen.c
489
MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
490

491
fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
492 493 494
	$(AM_V_at)rm -f -- $@
	$(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<

495
fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
496
	$(AM_V_at)rm -f -- $@.tmp
497
	$(AM_V_GEN)$(builddir)/fourcc_gen$(BUILDEXEEXT) > $@.tmp
498 499
	$(AM_V_at)mv -f -- $@.tmp $@

500 501 502 503 504 505
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
506
	test_interrupt \
507
	test_md5 \
508
	test_picture_pool \
509
	test_sort \
510 511 512 513
	test_timer \
	test_url \
	test_utf8 \
	test_xmlent \
Thomas Guillem's avatar
Thomas Guillem committed
514 515
	test_headers \
	test_mrl_helpers
516

517
TESTS = $(check_PROGRAMS) check_symbols
518 519 520 521 522 523 524

test_block_SOURCES = test/block_test.c
test_block_LDADD = $(LDADD) $(LIBS_libvlccore)
test_block_DEPENDENCIES =

test_dictionary_SOURCES = test/dictionary.c
test_i18n_atof_SOURCES = test/i18n_atof.c
525 526
test_interrupt_SOURCES = test/interrupt.c
test_interrupt_LDADD = $(LDADD) $(LIBS_libvlccore) $(LIBPTHREAD)
527
test_md5_SOURCES = test/md5.c
528
test_picture_pool_SOURCES = test/picture_pool.c
529
test_sort_SOURCES = test/sort.c
530 531 532 533 534
test_timer_SOURCES = test/timer.c
test_url_SOURCES = test/url.c
test_utf8_SOURCES = test/utf8.c
test_xmlent_SOURCES = test/xmlent.c
test_headers_SOURCES = test/headers.c
Thomas Guillem's avatar
Thomas Guillem committed
535
test_mrl_helpers_SOURCES = test/mrl_helpers.c
536 537 538 539 540

AM_LDFLAGS = -no-install
LDADD = libvlccore.la \
	../compat/libcompat.la

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
541 542 543 544 545
###############################################################################
# GIT revision
###############################################################################

BUILT_SOURCES += stamp-revision
546
MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
547

548 549 550 551
$(srcdir)/revision.c: $(srcdir)/revision.txt
	$(AM_V_at)rm -f -- $@
	$(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
		> $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
552

553
$(srcdir)/revision.txt:
554
	$(AM_V_at)$(MAKE) stamp-revision
555
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
556 557

stamp-revision:
558
	$(AM_V_at)rm -f -- revision.tmp
559 560 561 562 563 564
	$(AM_V_GEN)if ! git \
			--git-dir="$(top_srcdir)/.git/" describe \
			--tags --long --match '?.*.*' --always; then \
		cat $(srcdir)/revision.txt ; \
	fi > revision.tmp
	$(AM_V_at)if diff revision.tmp $(srcdir)/revision.txt >/dev/null 2>&1; then \
565 566
		rm -f -- revision.tmp; \
	else \
567 568 569
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
570

571 572 573
###############################################################################
# Unit/regression test
###############################################################################
574

575
dist_check_SCRIPTS = check_headers check_symbols
576

577
check-local:
578
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
579 580 581 582 583 584 585 586
	do \
		echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
		if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
		then \
			echo "Header $$h not included in test/headers.c!"; \
			exit 1; \
		fi ; \
	done
587
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
588

589
FORCE:
590 591 592 593
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE