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

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

122
../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
123 124 125 126 127 128 129
	$(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
130
	sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
131 132 133
		"$(top_srcdir)/THANKS" && \
	echo ";" && \
	echo "static const char psz_authors[] =" && \
134
	sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
135 136 137
		"$(top_srcdir)/AUTHORS" && \
	echo ";") >> "$@.tmp"
	$(AM_V_at)mv -f -- "$@.tmp" "$@"
138

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

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

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

151 152 153 154 155 156 157 158 159 160 161 162 163
##############################################################################
# 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/$@"

164 165 166 167
###############################################################################
# Building libvlc
###############################################################################

168
lib_LTLIBRARIES = libvlccore.la
169

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

184
libvlccore_la_SOURCES = \
185 186
	libvlc.c \
	libvlc.h \
187
	libvlc-module.c \
188
	missing.c \
189
	revision.c \
190
	version.c \
191 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/keys.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
	input/item.c \
229 230 231 232
	input/access.c \
	input/clock.c \
	input/control.c \
	input/decoder.c \
233
	input/decoder_synchro.c \
234
	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/stream.h \
250
	input/input_internal.h \
251
	input/input_interface.h \
252
	input/vlm_internal.h \
Laurent Aimar's avatar
Laurent Aimar committed
253
	input/vlm_event.h \
254 255
	input/resource.h \
	input/resource.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
256
	input/stats.c \
257
	input/stream.c \
258
	input/stream_fifo.c \
259
	input/stream_filter.c \
260
	input/stream_memory.c \
261 262
	input/subtitles.c \
	input/var.c \
263 264 265 266 267 268
	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 \
ivoire's avatar
ivoire committed
269
	video_output/chrono.h \
270 271
	video_output/control.c \
	video_output/control.h \
272 273
	video_output/display.c \
	video_output/display.h \
Pierre Ynard's avatar
Pierre Ynard committed
274
	video_output/event.h \
275 276
	video_output/inhibit.c \
	video_output/inhibit.h \
277 278
	video_output/interlacing.c \
	video_output/interlacing.h \
279 280
	video_output/snapshot.c \
	video_output/snapshot.h \
281
	video_output/statistic.h \
282 283
	video_output/video_output.c \
	video_output/video_text.c \
284
	video_output/video_epg.c \
285 286
	video_output/video_widgets.c \
	video_output/vout_subpictures.c \
287
	video_output/window.c \
288
	video_output/window.h \
289
	video_output/opengl.c \
290
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
291
	video_output/vout_internal.h \
292
	video_output/vout_control.h \
293
	video_output/vout_wrapper.c \
294
	network/getaddrinfo.c \
295
	network/http_auth.c \
296 297 298
	network/io.c \
	network/tcp.c \
	network/udp.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
299
	network/rootbind.c \
300
	network/tls.c \
301
	text/charset.c \
302
	text/memstream.c \
303 304
	text/strings.c \
	text/unicode.c \
305
	text/url.c \
306
	text/filesystem.c \
307 308
	text/iso_lang.c \
	text/iso-639_def.h \
309
	misc/md5.c \
310
	misc/probe.c \
311
	misc/rand.c \
312 313
	misc/mtime.c \
	misc/block.c \
314
	misc/fifo.c \
315
	misc/fourcc.c \
316
	misc/fourcc_list.h \
317
	misc/es_format.c \
318
	misc/picture.c \
319
	misc/picture.h \
320 321
	misc/picture_fifo.c \
	misc/picture_pool.c \
322 323
	misc/interrupt.h \
	misc/interrupt.c \
Thomas Guillem's avatar
Thomas Guillem committed
324
	misc/keystore.c \
325
	misc/renderer_discovery.c \
326 327
	misc/threads.c \
	misc/cpu.c \
328
	misc/epg.c \
329
	misc/exit.c \
330
	misc/events.c \
331 332
	misc/image.c \
	misc/messages.c \
333
	misc/mime.c \
334
	misc/objects.c \
zorglub's avatar
zorglub committed
335
	misc/variables.h \
336 337
	misc/variables.c \
	misc/error.c \
Rafaël Carré's avatar
Typo  
Rafaël Carré committed
338
	misc/update.h \
339
	misc/update.c \
340
	misc/update_crypto.c \
341
	misc/xml.c \
342
	misc/addons.c \
Laurent Aimar's avatar
Laurent Aimar committed
343
	misc/filter.c \
344
	misc/filter_chain.c \
aajanki's avatar
aajanki committed
345
	misc/httpcookies.c \
346
	misc/fingerprinter.c \
347
	misc/text_style.c \
348
	misc/subpicture.c \
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428
	misc/subpicture.h
if HAVE_DARWIN
libvlccore_la_SOURCES += \
	darwin/dirs.c \
	posix/filesystem.c \
	posix/plugin.c \
	darwin/thread.c \
	posix/timer.c \
	darwin/specific.c \
	posix/rand.c \
	darwin/error.c \
	darwin/netconf.c
else
if HAVE_ANDROID
libvlccore_la_SOURCES += \
	linux/cpu.c \
	linux/dirs.c \
	linux/thread.c \
	android/thread.c \
	android/error.c \
	posix/filesystem.c \
	posix/plugin.c \
	posix/timer.c \
	android/specific.c  \
	posix/rand.c
else
if HAVE_LINUX
libvlccore_la_SOURCES += \
	linux/cpu.c \
	linux/dirs.c \
	posix/dirs.c \
	posix/error.c \
	posix/filesystem.c \
	posix/netconf.c \
	posix/plugin.c \
	linux/thread.c \
	posix/thread.c \
	posix/timer.c \
	posix/specific.c \
	posix/rand.c
else
if HAVE_WIN32
libvlccore_la_SOURCES += \
	win32/dirs.c \
	win32/error.c \
	win32/filesystem.c \
	win32/netconf.c \
	win32/plugin.c \
	win32/thread.c \
	win32/specific.c \
	win32/winsock.c \
	win32/rand.c
else
if HAVE_OS2
libvlccore_la_SOURCES += \
	os2/getaddrinfo.c \
	os2/dirs.c \
	darwin/error.c \
	os2/filesystem.c \
	os2/netconf.c \
	os2/plugin.c \
	os2/thread.c \
	os2/specific.c \
	os2/rand.c
else
libvlccore_la_SOURCES += \
	posix/dirs.c \
	posix/error.c \
	posix/filesystem.c \
	posix/netconf.c \
	posix/thread.c \
	posix/timer.c \
	posix/plugin.c \
	posix/specific.c \
	posix/rand.c
endif
endif
endif
endif
endif
429

430 431 432
if BUILD_HTTPD
libvlccore_la_SOURCES += network/httpd.c
endif
433

434 435 436 437 438 439 440 441
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
442

443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
libvlccore_la_LDFLAGS = \
	$(LDFLAGS_libvlccore) \
	-no-undefined \
	-export-symbols $(srcdir)/libvlccore.sym \
	-version-info 8:0:0
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
	../compat/libcompat.la \
	$(LTLIBINTL) $(LTLIBICONV) \
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
libvlccore_la_DEPENDENCIES = libvlccore.sym
if HAVE_WIN32
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static
endif
if HAVE_OS2
libvlccore_la_LDFLAGS += -avoid-version
endif
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
463

464 465
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
466

467 468 469
# FourCC tables
BUILT_SOURCES += fourcc_tables.h
EXTRA_DIST += misc/fourcc_gen.c
komh's avatar
komh committed
470
MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
471

komh's avatar
komh committed
472
fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
473 474 475
	$(AM_V_at)rm -f -- $@
	$(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<

komh's avatar
komh committed
476
fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
477 478 479 480
	$(AM_V_at)rm -f -- $@.tmp
	$(AM_V_GEN)$(builddir)/fourcc_gen > $@.tmp
	$(AM_V_at)mv -f -- $@.tmp $@

481 482 483 484 485 486
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
487
	test_interrupt \
488
	test_md5 \
489
	test_picture_pool \
490 491 492 493 494 495
	test_timer \
	test_url \
	test_utf8 \
	test_xmlent \
	test_headers

496
TESTS = $(check_PROGRAMS) check_symbols
497 498 499 500 501 502 503

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
504 505
test_interrupt_SOURCES = test/interrupt.c
test_interrupt_LDADD = $(LDADD) $(LIBS_libvlccore) $(LIBPTHREAD)
506
test_md5_SOURCES = test/md5.c
507
test_picture_pool_SOURCES = test/picture_pool.c
508 509 510 511 512 513 514 515 516 517
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

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

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
518 519 520 521 522
###############################################################################
# GIT revision
###############################################################################

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

525 526 527 528
$(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
529

530
$(srcdir)/revision.txt:
531
	$(AM_V_at)$(MAKE) stamp-revision
532
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
533 534

stamp-revision:
535
	$(AM_V_at)rm -f -- revision.tmp
536 537 538 539 540 541
	$(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 \
542 543
		rm -f -- revision.tmp; \
	else \
544 545 546
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
547

548 549 550
###############################################################################
# Unit/regression test
###############################################################################
551

552
dist_check_SCRIPTS = check_headers check_symbols
553

554
check-local:
555
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
556 557 558 559 560 561 562 563
	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
564
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
565

566
FORCE:
567 568 569 570
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE