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

101
noinst_HEADERS = \
102
	../include/vlc_codec_synchro.h \
103
	../include/vlc_codecs.h \
Pierre Ynard's avatar
Pierre Ynard committed
104
	../include/vlc_extensions.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
105
	../include/vlc_fixups.h \
106
	../include/vlc_interface.h \
107
	../include/vlc_intf_strings.h \
108
	../include/vlc_iso_lang.h \
Pierre Ynard's avatar
Pierre Ynard committed
109
	../include/vlc_memory.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
110
	../include/vlc_pgpkey.h \
111 112
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
113
	../include/vlc_vout_wrapper.h \
Pierre Ynard's avatar
Pierre Ynard committed
114
	../include/vlc_windows_interfaces.h \
115 116
	$(NULL)

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

134 135 136 137 138
###############################################################################
# pkg-config integration
###############################################################################

pkgconfigdir = $(libdir)/pkgconfig
139
pkgconfig_DATA = vlc-plugin.pc
140 141
CLEANFILES += $(pkgconfig_DATA)

142
.pc.in.pc: $(top_builddir)/config.status
143
	$(AM_V_GEN)cd "$(top_builddir)" && \
144 145
	$(SHELL) ./config.status --file="src/$@"

146 147 148 149 150 151 152 153 154 155 156 157 158
##############################################################################
# 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/$@"

159 160 161 162
###############################################################################
# Building libvlc
###############################################################################

163
lib_LTLIBRARIES = libvlccore.la
164

165
AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
166
	-DMODULE_STRING=\"main\" \
167
	-DLOCALEDIR=\"$(localedir)\" \
168
	-DPKGDATADIR=\"$(vlcdatadir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
169
	-DPKGLIBDIR=\"$(vlclibdir)\"
170
AM_CFLAGS = $(CFLAGS_libvlccore)
171 172 173
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
endif
174 175 176 177
if HAVE_DBUS
AM_CPPFLAGS += -DHAVE_DBUS
AM_CFLAGS += $(DBUS_CFLAGS)
endif
178 179 180 181

libvlccore_la_SOURCES = $(SOURCES_libvlc)
libvlccore_la_LDFLAGS = \
	$(LDFLAGS_libvlccore) \
182
	-no-undefined \
183
	-export-symbols $(srcdir)/libvlccore.sym \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
184
	-version-info 5:0:0
185
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
186
	../compat/libcompat.la \
187
	$(LTLIBINTL) $(LTLIBICONV) \
188
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
189
libvlccore_la_DEPENDENCIES = libvlccore.sym
190
if HAVE_WIN32
191
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
192
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version
193
endif
194 195 196
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
197

198
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
199
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
200

201
EXTRA_libvlccore_la_SOURCES = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
202
	$(SOURCES_libvlc_darwin) \
203
	$(SOURCES_libvlc_android) \
204
	$(SOURCES_libvlc_linux) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
205
	$(SOURCES_libvlc_win32) \
komh's avatar
komh committed
206
	$(SOURCES_libvlc_os2) \
207
	$(SOURCES_libvlc_other) \
208
	$(SOURCES_libvlc_httpd) \
209
	$(SOURCES_libvlc_sout) \
210
	$(SOURCES_libvlc_vlm) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
211
	$(NULL)
212
if HAVE_DARWIN
213
libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
214
else
215 216 217
if HAVE_ANDROID
libvlccore_la_SOURCES += $(SOURCES_libvlc_android)
else
218
if HAVE_LINUX
219
libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
220
else
221
if HAVE_WIN32
222
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
223
else
224
if HAVE_SYMBIAN
225
#libvlccore_la_SOURCES += $(SOURCES_libvlc_symbian)
226
else
komh's avatar
komh committed
227 228 229
if HAVE_OS2
libvlccore_la_SOURCES += $(SOURCES_libvlc_os2)
else
230
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
231
endif
232 233 234
endif
endif
endif
235
endif
236
endif
237 238 239
if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif
240
if ENABLE_SOUT
241
libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
242 243 244
if ENABLE_VLM
libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
endif
245
endif
246

247
SOURCES_libvlc_darwin = \
Pierre Ynard's avatar
Pierre Ynard committed
248
	posix/darwin_dirs.c \
249
	posix/filesystem.c \
250
	posix/plugin.c \
251
	posix/thread.c \
252
	posix/timer.c \
253
	posix/darwin_specific.c \
254
	posix/rand.c \
255 256
	$(NULL)

257 258
SOURCES_libvlc_android = \
	android/dirs.c \
Rafaël Carré's avatar
Rafaël Carré committed
259
	android/thread.c \
260
	posix/filesystem.c \
261
	android/netconf.c \
262 263 264 265 266 267 268 269
	posix/plugin.c \
	posix/timer.c \
	posix/linux_cpu.c \
	posix/linux_specific.c \
	posix/specific.c \
	posix/rand.c \
	$(NULL)

270
SOURCES_libvlc_linux = \
271 272
	posix/dirs.c \
	posix/filesystem.c \
273
	posix/netconf.c \
274
	posix/plugin.c \
275
	posix/thread.c \
276
	posix/timer.c \
277
	posix/linux_cpu.c \
278
	posix/linux_specific.c \
279
	posix/specific.c \
280
	posix/rand.c \
281 282
	$(NULL)

283
SOURCES_libvlc_win32 = \
284
	win32/dirs.c \
285
	win32/filesystem.c \
286
	win32/netconf.c \
287
	win32/plugin.c \
288
	win32/thread.c \
289
	win32/specific.c \
290
	win32/winsock.c \
291
	win32/rand.c \
292 293
	$(NULL)

294 295
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
296
	symbian/dirs.c \
297
	win32/plugin.c \
298
	posix/rand.c \
299 300
	$(NULL)

komh's avatar
komh committed
301
SOURCES_libvlc_os2 = \
302
	os2/getaddrinfo.c \
303
	os2/dirs.c \
304 305
	os2/filesystem.c \
	os2/plugin.c \
komh's avatar
komh committed
306
	os2/thread.c \
komh's avatar
komh committed
307
	os2/specific.c \
308
	os2/rand.c \
komh's avatar
komh committed
309 310
	$(NULL)

311
SOURCES_libvlc_other = \
312 313
	posix/dirs.c \
	posix/filesystem.c \
314
	posix/netconf.c \
315
	posix/thread.c \
316
	posix/timer.c \
317
	posix/plugin.c \
318
	posix/specific.c \
319
	posix/rand.c \
320
	$(NULL)
321

322 323 324
SOURCES_libvlc_common = \
	libvlc.c \
	libvlc.h \
325
	libvlc-module.c \
326
	missing.c \
327
	revision.c \
328
	version.c \
329
	interface/dialog.c \
330
	interface/interface.c \
331
	playlist/playlist_internal.h \
332
	playlist/art.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
333
	playlist/art.h \
334
	playlist/aout.c \
335 336 337
	playlist/thread.c \
	playlist/control.c \
	playlist/engine.c \
338
	playlist/fetcher.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
339
	playlist/fetcher.h \
340 341
	playlist/sort.c \
	playlist/loadsave.c \
342
	playlist/preparser.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
343
	playlist/preparser.h \
344
	playlist/tree.c \
345
	playlist/item.c \
346
	playlist/search.c \
347
	playlist/services_discovery.c \
348
	input/item.c \
349 350 351 352
	input/access.c \
	input/clock.c \
	input/control.c \
	input/decoder.c \
353
	input/decoder_synchro.c \
354 355
	input/demux.c \
	input/es_out.c \
356
	input/es_out_timeshift.c \
357
	input/event.c \
358
	input/input.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
359
	input/info.h \
360
	input/meta.c \
361
	input/access.h \
362 363
	input/clock.h \
	input/decoder.h \
364
	input/demux.h \
365
	input/es_out.h \
366
	input/es_out_timeshift.h \
367
	input/event.h \
368
	input/item.h \
369
	input/stream.h \
370
	input/input_internal.h \
371
	input/input_interface.h \
372
	input/vlm_internal.h \
Laurent Aimar's avatar
Laurent Aimar committed
373
	input/vlm_event.h \
374 375
	input/resource.h \
	input/resource.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
376
	input/stats.c \
377
	input/stream.c \
378
	input/stream_demux.c \
379
	input/stream_filter.c \
380
	input/stream_memory.c \
381 382
	input/subtitles.c \
	input/var.c \
ivoire's avatar
ivoire committed
383
	video_output/chrono.h \
384 385
	video_output/control.c \
	video_output/control.h \
386 387
	video_output/display.c \
	video_output/display.h \
Pierre Ynard's avatar
Pierre Ynard committed
388
	video_output/event.h \
389 390
	video_output/inhibit.c \
	video_output/inhibit.h \
391 392
	video_output/interlacing.c \
	video_output/interlacing.h \
393 394
	video_output/snapshot.c \
	video_output/snapshot.h \
395
	video_output/statistic.h \
396 397
	video_output/video_output.c \
	video_output/video_text.c \
398
	video_output/video_epg.c \
399 400
	video_output/video_widgets.c \
	video_output/vout_subpictures.c \
401
	video_output/window.c \
402
	video_output/opengl.c \
403
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
404
	video_output/vout_internal.h \
405
	video_output/vout_control.h \
406
	video_output/vout_wrapper.c \
zorglub's avatar
zorglub committed
407
	audio_output/aout_internal.h \
408 409 410 411
	audio_output/common.c \
	audio_output/dec.c \
	audio_output/filters.c \
	audio_output/output.c \
412
	audio_output/volume.c \
413 414 415 416
	network/getaddrinfo.c \
	network/io.c \
	network/tcp.c \
	network/udp.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
417
	network/rootbind.c \
418
	network/tls.c \
419 420 421
	text/charset.c \
	text/strings.c \
	text/unicode.c \
422
	text/url.c \
423
	text/filesystem.c \
424 425
	text/iso_lang.c \
	text/iso-639_def.h \
426
	misc/md5.c \
427
	misc/probe.c \
428
	misc/rand.c \
429 430
	misc/mtime.c \
	misc/block.c \
431
	misc/fourcc.c \
432
	misc/es_format.c \
433
	misc/picture.c \
434 435
	misc/picture_fifo.c \
	misc/picture_pool.c \
436 437
	modules/modules.h \
	modules/modules.c \
438
	modules/bank.c \
439
	modules/cache.c \
440
	modules/entry.c \
441
	modules/textdomain.c \
442 443
	misc/threads.c \
	misc/cpu.c \
444
	misc/epg.c \
445
	misc/exit.c \
446
	config/configuration.h \
447 448 449
	config/core.c \
	config/chain.c \
	config/file.c \
450
        config/help.c \
451
	config/intf.c \
452
	config/keys.c \
453
	config/cmdline.c \
454 455
	config/getopt.c \
	config/vlc_getopt.h \
456
	misc/events.c \
457 458
	misc/image.c \
	misc/messages.c \
459
	misc/mime.c \
460
	misc/objects.c \
zorglub's avatar
zorglub committed
461
	misc/variables.h \
462 463
	misc/variables.c \
	misc/error.c \
Rafaël Carré's avatar
Typo  
Rafaël Carré committed
464
	misc/update.h \
465
	misc/update.c \
466
	misc/update_crypto.c \
467 468
	misc/xml.c \
	extras/libc.c \
469
	extras/tdestroy.c \
Laurent Aimar's avatar
Laurent Aimar committed
470
	misc/filter.c \
471
	misc/filter_chain.c \
472
	misc/http_auth.c \
473
	misc/fingerprinter.c \
474
	misc/text_style.c \
475 476
	misc/subpicture.c \
	misc/subpicture.h \
477 478
	$(NULL)

479 480 481 482
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

483 484 485 486 487 488 489 490
SOURCES_libvlc_sout = \
	stream_output/stream_output.c \
	stream_output/stream_output.h \
	stream_output/announce.c \
	stream_output/sap.c \
	stream_output/sdp.c \
	$(NULL)

491 492
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
493
	input/vlm_event.c \
494 495 496
	input/vlmshell.c \
	$(NULL)

497 498 499 500
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
	test_md5 \
	test_timer \
	test_url \
	test_utf8 \
	test_xmlent \
	test_headers

TESTS = $(check_PROGRAMS)

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
test_md5_SOURCES = test/md5.c
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
533 534 535 536 537
###############################################################################
# GIT revision
###############################################################################

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

540 541 542 543
$(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
544

545
$(srcdir)/revision.txt:
546
	$(AM_V_at)$(MAKE) stamp-revision
547
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
548 549

stamp-revision:
550
	$(AM_V_at)rm -f -- revision.tmp
551 552 553 554 555 556
	$(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 \
557 558
		rm -f -- revision.tmp; \
	else \
559 560 561
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
562

563 564 565
###############################################################################
# Unit/regression test
###############################################################################
566

567
dist_check_SCRIPTS = check_headers
568

569
check-local:
570
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
571 572 573 574 575 576 577 578
	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
579
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
580

581
FORCE:
582 583 584 585
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE