Makefile.am 13.6 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 79
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
	../include/vlc_sout.h \
80
	../include/vlc_spu.h \
81 82
	../include/vlc_stream.h \
	../include/vlc_strings.h \
83
	../include/vlc_subpicture.h \
84
	../include/vlc_text_style.h \
85
	../include/vlc_threads.h \
86
	../include/vlc_tls.h \
87
	../include/vlc_url.h \
88 89
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
90
	../include/vlc_video_splitter.h \
91
	../include/vlc_vout.h \
92
	../include/vlc_vout_display.h \
93
	../include/vlc_vout_osd.h \
94
	../include/vlc_vout_window.h \
95
	../include/vlc_xml.h \
96
	../include/vlc_xlib.h \
97
	$(NULL)
98
nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
99

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

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

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

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

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

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

158 159 160 161
###############################################################################
# Building libvlc
###############################################################################

162
lib_LTLIBRARIES = libvlccore.la
163

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

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

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

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

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

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

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

280
SOURCES_libvlc_win32 = \
281
	win32/dirs.c \
282
	win32/filesystem.c \
283
	win32/plugin.c \
284
	win32/thread.c \
285
	win32/specific.c \
286
	win32/winsock.c \
287
	win32/rand.c \
288 289
	$(NULL)

290 291
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
292
	symbian/dirs.c \
293
	win32/plugin.c \
294
	posix/rand.c \
295 296
	$(NULL)

komh's avatar
komh committed
297
SOURCES_libvlc_os2 = \
298
	os2/getaddrinfo.c \
299
	os2/dirs.c \
300 301
	os2/filesystem.c \
	os2/plugin.c \
komh's avatar
komh committed
302
	os2/thread.c \
komh's avatar
komh committed
303
	os2/specific.c \
304
	os2/rand.c \
komh's avatar
komh committed
305 306
	$(NULL)

307
SOURCES_libvlc_other = \
308 309 310
	posix/dirs.c \
	posix/filesystem.c \
	posix/thread.c \
311
	posix/timer.c \
312
	posix/plugin.c \
313
	posix/specific.c \
314
	posix/rand.c \
315
	$(NULL)
316

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

473 474 475 476
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

477 478 479 480 481 482 483 484
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)

485 486
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
487
	input/vlm_event.c \
488 489 490
	input/vlmshell.c \
	$(NULL)

491 492 493 494
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

495 496 497 498 499 500 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
# 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
527 528 529 530 531
###############################################################################
# GIT revision
###############################################################################

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

534 535 536 537
$(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
538

539
$(srcdir)/revision.txt:
540
	$(AM_V_at)$(MAKE) stamp-revision
541
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
542 543

stamp-revision:
544
	$(AM_V_at)rm -f -- revision.tmp
545 546 547 548 549 550
	$(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 \
551 552
		rm -f -- revision.tmp; \
	else \
553 554 555
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
556

557 558 559
###############################################################################
# Unit/regression test
###############################################################################
560

561
dist_check_SCRIPTS = check_headers
562

563
check-local:
564
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
565 566 567 568 569 570 571 572
	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
573
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
574

575
FORCE:
576 577 578 579
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE