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 \
256
	input/services_discovery.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
257
	input/stats.c \
258
	input/stream.c \
259
	input/stream_fifo.c \
260
	input/stream_filter.c \
261
	input/stream_memory.c \
262 263
	input/subtitles.c \
	input/var.c \
264 265 266 267 268 269
	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
270
	video_output/chrono.h \
271 272
	video_output/control.c \
	video_output/control.h \
273 274
	video_output/display.c \
	video_output/display.h \
Pierre Ynard's avatar
Pierre Ynard committed
275
	video_output/event.h \
276 277
	video_output/inhibit.c \
	video_output/inhibit.h \
278 279
	video_output/interlacing.c \
	video_output/interlacing.h \
280 281
	video_output/snapshot.c \
	video_output/snapshot.h \
282
	video_output/statistic.h \
283 284
	video_output/video_output.c \
	video_output/video_text.c \
285
	video_output/video_epg.c \
286 287
	video_output/video_widgets.c \
	video_output/vout_subpictures.c \
288
	video_output/window.c \
289
	video_output/window.h \
290
	video_output/opengl.c \
291
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
292
	video_output/vout_internal.h \
293
	video_output/vout_control.h \
294
	video_output/vout_wrapper.c \
295
	network/getaddrinfo.c \
296
	network/http_auth.c \
297 298 299
	network/io.c \
	network/tcp.c \
	network/udp.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
300
	network/rootbind.c \
301
	network/tls.c \
302
	text/charset.c \
303
	text/memstream.c \
304 305
	text/strings.c \
	text/unicode.c \
306
	text/url.c \
307
	text/filesystem.c \
308 309
	text/iso_lang.c \
	text/iso-639_def.h \
310
	misc/md5.c \
311
	misc/probe.c \
312
	misc/rand.c \
313 314
	misc/mtime.c \
	misc/block.c \
315
	misc/fifo.c \
316
	misc/fourcc.c \
317
	misc/fourcc_list.h \
318
	misc/es_format.c \
319
	misc/picture.c \
320
	misc/picture.h \
321 322
	misc/picture_fifo.c \
	misc/picture_pool.c \
323 324
	misc/interrupt.h \
	misc/interrupt.c \
Thomas Guillem's avatar
Thomas Guillem committed
325
	misc/keystore.c \
326
	misc/renderer_discovery.c \
327 328
	misc/threads.c \
	misc/cpu.c \
329
	misc/epg.c \
330
	misc/exit.c \
331
	misc/events.c \
332 333
	misc/image.c \
	misc/messages.c \
334
	misc/mime.c \
335
	misc/objects.c \
zorglub's avatar
zorglub committed
336
	misc/variables.h \
337 338
	misc/variables.c \
	misc/error.c \
Rafaël Carré's avatar
Typo  
Rafaël Carré committed
339
	misc/update.h \
340
	misc/update.c \
341
	misc/update_crypto.c \
342
	misc/xml.c \
343
	misc/addons.c \
Laurent Aimar's avatar
Laurent Aimar committed
344
	misc/filter.c \
345
	misc/filter_chain.c \
aajanki's avatar
aajanki committed
346
	misc/httpcookies.c \
347
	misc/fingerprinter.c \
348
	misc/text_style.c \
349
	misc/subpicture.c \
350
	misc/subpicture.h
351 352 353 354
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
	../compat/libcompat.la \
	$(LTLIBINTL) $(LTLIBICONV) \
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
355

356 357 358 359 360 361 362
if HAVE_WIN32
libvlccore_la_SOURCES += \
	win32/dirs.c \
	win32/error.c \
	win32/filesystem.c \
	win32/netconf.c \
	win32/plugin.c \
363
	win32/rand.c \
364
	win32/specific.c \
365 366
	win32/thread.c \
	win32/winsock.c
367 368 369 370 371
if HAVE_WINSTORE
libvlccore_la_SOURCES += posix/timer.c
else
libvlccore_la_SOURCES += win32/timer.c
endif
372 373 374 375 376 377
else
if HAVE_OS2
libvlccore_la_SOURCES += \
	os2/dirs.c \
	darwin/error.c \
	os2/filesystem.c \
378
	os2/getaddrinfo.c \
379 380 381
	os2/netconf.c \
	os2/plugin.c \
	os2/specific.c \
382 383 384 385 386 387 388 389 390 391 392 393
	os2/rand.c \
	os2/thread.c
else
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
394 395 396
	android/thread.c \
	linux/cpu.c \
	linux/dirs.c \
397
	linux/thread.c
398 399 400 401 402 403 404 405
else
if HAVE_DARWIN
libvlccore_la_SOURCES += \
	darwin/dirs.c \
	darwin/error.c \
	darwin/netconf.c \
	darwin/specific.c \
	darwin/thread.c
406 407 408 409 410 411
else
libvlccore_la_SOURCES += \
	posix/dirs.c \
	posix/error.c \
	posix/netconf.c \
	posix/specific.c \
412 413 414 415 416
	posix/thread.c
if HAVE_LINUX
libvlccore_la_SOURCES += \
	linux/cpu.c \
	linux/dirs.c \
417
	linux/getaddrinfo.c \
418
	linux/thread.c
419 420 421 422 423 424 425 426
libvlccore_la_LIBADD += -lanl
else
libvlccore_la_SOURCES += \
	posix/getaddrinfo.c
endif
endif
endif
endif
427
endif
428

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

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

442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
libvlccore_la_LDFLAGS = \
	$(LDFLAGS_libvlccore) \
	-no-undefined \
	-export-symbols $(srcdir)/libvlccore.sym \
	-version-info 8:0:0
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
458

459 460
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
461

462 463 464
# FourCC tables
BUILT_SOURCES += fourcc_tables.h
EXTRA_DIST += misc/fourcc_gen.c
komh's avatar
komh committed
465
MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
466

komh's avatar
komh committed
467
fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
468 469 470
	$(AM_V_at)rm -f -- $@
	$(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<

komh's avatar
komh committed
471
fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
472 473 474 475
	$(AM_V_at)rm -f -- $@.tmp
	$(AM_V_GEN)$(builddir)/fourcc_gen > $@.tmp
	$(AM_V_at)mv -f -- $@.tmp $@

476 477 478 479 480 481
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
482
	test_interrupt \
483
	test_md5 \
484
	test_picture_pool \
485 486 487 488 489 490
	test_timer \
	test_url \
	test_utf8 \
	test_xmlent \
	test_headers

491
TESTS = $(check_PROGRAMS) check_symbols
492 493 494 495 496 497 498

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

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

520 521 522 523
$(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
524

525
$(srcdir)/revision.txt:
526
	$(AM_V_at)$(MAKE) stamp-revision
527
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
528 529

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

543 544 545
###############################################################################
# Unit/regression test
###############################################################################
546

547
dist_check_SCRIPTS = check_headers check_symbols
548

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

561
FORCE:
562 563 564 565
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE