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

5
AUTOMAKE_OPTIONS = subdir-objects
6
SUBDIRS = . test
7

8
NULL =
9
EXTRA_DIST = extras/COPYING \
10
	misc/beos_specific.cpp \
11
	libvlc.pc.in \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
12
	vlc-plugin.pc.in \
13
	libvlc.sym \
14
	libvlccore.sym
15

16
BUILT_SOURCES = ../include/vlc_about.h
Christophe Mutricy's avatar
Christophe Mutricy committed
17
CLEANFILES = $(BUILT_SOURCES)
18

19 20
SUFFIXES = .pc.in .pc

21 22 23 24
###############################################################################
# Headers
###############################################################################

25
pluginsincludedir = $(pkgincludedir)/plugins
26

27
pkginclude_HEADERS = \
28
	../include/vlc/vlc.h \
29
	../include/vlc/deprecated.h \
30
	../include/vlc/libvlc.h \
31
	../include/vlc/libvlc_events.h \
32 33 34 35 36 37 38 39
	../include/vlc/libvlc_media.h \
	../include/vlc/libvlc_media_discoverer.h \
	../include/vlc/libvlc_media_library.h \
	../include/vlc/libvlc_media_list.h \
	../include/vlc/libvlc_media_list_player.h \
	../include/vlc/libvlc_media_list_view.h \
	../include/vlc/libvlc_media_player.h \
	../include/vlc/libvlc_structures.h \
40
	../include/vlc/libvlc_vlm.h \
41 42 43 44
	../include/vlc/mediacontrol.h \
	../include/vlc/mediacontrol_structures.h \
	$(NULL)

45
pluginsinclude_HEADERS = \
46 47
	../include/vlc_access.h \
	../include/vlc_acl.h \
48
	../include/vlc_aout.h \
49
	../include/vlc_aout_mixer.h \
50
	../include/vlc_arrays.h \
Pierre Ynard's avatar
Pierre Ynard committed
51
	../include/vlc_art_finder.h \
52
	../include/vlc_avcodec.h \
53 54 55 56 57
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
	../include/vlc_charset.h \
	../include/vlc_codec.h \
58 59
	../include/vlc_common.h \
	../include/vlc_config.h \
60
	../include/vlc_config_cat.h \
61
	../include/vlc_configuration.h \
62
	../include/vlc_cpu.h \
63
	../include/vlc_dialog.h \
64
	../include/vlc_demux.h \
65
	../include/vlc_epg.h \
66
	../include/vlc_es.h \
67 68
	../include/vlc_es_out.h \
	../include/vlc_events.h \
69
	../include/vlc_filter.h \
70
	../include/vlc_fourcc.h \
71
	../include/vlc_gcrypt.h \
72
	../include/vlc_http.h \
73
	../include/vlc_httpd.h \
74
	../include/vlc_image.h \
75
	../include/vlc_inhibit.h \
76
	../include/vlc_input.h \
77
	../include/vlc_input_item.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
78
	../include/vlc_main.h \
79
	../include/vlc_md5.h \
80
	../include/vlc_messages.h \
81
	../include/vlc_meta.h \
82
	../include/vlc_modules.h \
Pierre Ynard's avatar
Pierre Ynard committed
83
	../include/vlc_mouse.h \
84 85
	../include/vlc_mtime.h \
	../include/vlc_objects.h \
86
	../include/vlc_picture.h \
87 88
	../include/vlc_picture_fifo.h \
	../include/vlc_picture_pool.h \
89
	../include/vlc_playlist.h \
90
	../include/vlc_plugin.h \
91 92
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
Srikanth Raju's avatar
Srikanth Raju committed
93
	../include/vlc_sql.h \
94
	../include/vlc_sout.h \
95 96
	../include/vlc_stream.h \
	../include/vlc_strings.h \
97
	../include/vlc_subpicture.h \
98
	../include/vlc_threads.h \
99
	../include/vlc_url.h \
100 101
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
102
	../include/vlc_video_splitter.h \
103
	../include/vlc_vout.h \
104
	../include/vlc_vout_display.h \
105
	../include/vlc_vout_window.h \
106
	../include/vlc_xml.h \
107
	$(NULL)
108

109
noinst_HEADERS = \
110
	../include/mmx.h \
111
	../include/vlc_codec_synchro.h \
112
	../include/vlc_codecs.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
113
	../include/vlc_fixups.h \
114
	../include/vlc_interface.h \
115
	../include/vlc_intf_strings.h \
116
	../include/vlc_iso_lang.h \
117
	../include/vlc_keys.h \
Pierre Ynard's avatar
Pierre Ynard committed
118
	../include/vlc_memory.h \
119
	../include/vlc_network.h \
120
	../include/vlc_osd.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
121
	../include/vlc_pgpkey.h \
122
	../include/vlc_tls.h \
123 124
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
125
	../include/vlc_vout_wrapper.h \
126 127
	$(NULL)

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

144
	mv -f -- "$@.tmp" "$@"
145

146 147 148 149 150
###############################################################################
# pkg-config integration
###############################################################################

pkgconfigdir = $(libdir)/pkgconfig
151
pkgconfig_DATA = libvlc.pc vlc-plugin.pc
152 153
CLEANFILES += $(pkgconfig_DATA)

154 155 156 157
.pc.in.pc: $(top_builddir)/config.status
	cd "$(top_builddir)" && \
	$(SHELL) ./config.status --file="src/$@"

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

162 163 164
nice:
	$(top_builddir)/compile

165
lib_LTLIBRARIES = libvlccore.la libvlc.la
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
166

167
AM_LDFLAGS = -no-undefined
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
168
if HAVE_WIN32
169
AM_LDFLAGS += -avoid-version
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
170
endif
171 172 173
if HAVE_WINCE
AM_LDFLAGS += -avoid-version
endif
174

175
libvlccore_la_SOURCES = $(SOURCES_libvlc)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
176
nodist_libvlccore_la_SOURCES = revision.c
177
libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
178
	-DMODULE_STRING=\"main\" \
179
	-DLOCALEDIR=\"$(localedir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
180
	-DSYSCONFDIR=\"$(sysconfdir)\" \
181
	-DDATA_PATH=\"$(vlcdatadir)\" \
182
	-DLIBDIR=\"$(libdir)\" \
183
	-DPLUGIN_PATH=\"$(vlclibdir)\"
184
libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
185
	-no-undefined \
186
	-export-symbols $(srcdir)/libvlccore.sym \
187
	-version-info 4:0:0
188
libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
189
	$(LTLIBINTL) ../compat/libcompat.la
190
libvlccore_la_DEPENDENCIES = libvlccore.sym
191
if HAVE_WIN32
192 193
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
194
endif
195

196 197 198
libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@

199
libvlc_la_SOURCES = $(SOURCES_libvlc_control)
200
nodist_libvlc_la_SOURCES = revision.c
201 202
libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
	libvlccore.la ../compat/libcompat.la
203
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
204
libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
205
	-version-info 5:0:0 \
206
	-export-symbols $(srcdir)/libvlc.sym
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
207
libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
208
if HAVE_WIN32
209 210
libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
211 212
endif

213

214
EXTRA_libvlccore_la_SOURCES = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
215 216
	$(SOURCES_libvlc_beos) \
	$(SOURCES_libvlc_darwin) \
217
	$(SOURCES_libvlc_linux) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
218
	$(SOURCES_libvlc_win32) \
219
	$(SOURCES_libvlc_other) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
220 221
	$(SOURCES_libvlc_dirent) \
	$(SOURCES_libvlc_getopt) \
222
	$(SOURCES_libvlc_httpd) \
223
	$(SOURCES_libvlc_sout) \
224
	$(SOURCES_libvlc_vlm) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
225
	$(NULL)
226
if HAVE_BEOS
227
libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
228
else
229
if HAVE_DARWIN
230
libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
231 232
else
if HAVE_LINUX
233
libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
234
else
235
if HAVE_WIN32
236
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
237
else
238
if HAVE_WINCE
239
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
240
else
241
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
242
endif
243 244 245 246
endif
endif
endif
endif
247
if BUILD_DIRENT
248
libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
249 250
endif
if BUILD_GETOPT
251
libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
252
endif
253 254 255
if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif
256
if ENABLE_SOUT
257
libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
258 259 260
if ENABLE_VLM
libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
endif
261
endif
262

263
SOURCES_libvlc_beos = \
264
	misc/pthread.c \
265 266 267
	$(NULL)

SOURCES_libvlc_darwin = \
268
	config/dirs_macos.c \
269
	misc/pthread.c \
270
	misc/darwin_specific.c \
271 272
	$(NULL)

273
SOURCES_libvlc_linux = \
274
	config/dirs_xdg.c \
275
	misc/pthread.c \
276 277 278
	misc/linux_specific.c \
	$(NULL)

279
SOURCES_libvlc_win32 = \
280
	config/dirs_win.c \
281
	misc/w32thread.c \
282
	misc/win32_specific.c \
283
	network/winsock.c \
284 285
	$(NULL)

286
SOURCES_libvlc_other = \
287
	config/dirs_xdg.c \
288 289
	misc/pthread.c \
	misc/not_specific.c
290

291 292 293 294 295 296 297 298 299 300 301 302 303
SOURCES_libvlc_dirent = \
	extras/dirent.c \
	$(NULL)

SOURCES_libvlc_getopt = \
	extras/getopt.c \
	extras/getopt.h \
	extras/getopt1.c \
	$(NULL)

SOURCES_libvlc_common = \
	libvlc.c \
	libvlc.h \
304
	libvlc-module.c \
305
	missing.c \
306
	version.c \
307
	interface/dialog.c \
308 309
	interface/interface.c \
	interface/intf_eject.c \
310
	playlist/playlist_internal.h \
311
	playlist/art.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
312
	playlist/art.h \
313 314 315
	playlist/thread.c \
	playlist/control.c \
	playlist/engine.c \
316
	playlist/fetcher.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
317
	playlist/fetcher.h \
318 319
	playlist/sort.c \
	playlist/loadsave.c \
320
	playlist/preparser.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
321
	playlist/preparser.h \
322
	playlist/tree.c \
323
	playlist/item.c \
324
	playlist/search.c \
325
	playlist/services_discovery.c \
326
	input/item.c \
327 328 329 330
	input/access.c \
	input/clock.c \
	input/control.c \
	input/decoder.c \
331
	input/decoder_synchro.c \
332 333
	input/demux.c \
	input/es_out.c \
334
	input/es_out_timeshift.c \
335
	input/event.c \
336
	input/input.c \
337
	input/meta.c \
338
	input/access.h \
339 340
	input/clock.h \
	input/decoder.h \
341
	input/demux.h \
342
	input/es_out.h \
343
	input/es_out_timeshift.h \
344
	input/event.h \
345
	input/item.h \
346
	input/stream.h \
347
	input/input_internal.h \
348
	input/input_interface.h \
349
	input/vlm_internal.h \
Laurent Aimar's avatar
Laurent Aimar committed
350
	input/vlm_event.h \
351 352
	input/resource.h \
	input/resource.c \
353
	input/stream.c \
354
	input/stream_demux.c \
355
	input/stream_filter.c \
356
	input/stream_memory.c \
357 358
	input/subtitles.c \
	input/var.c \
359 360
	video_output/display.c \
	video_output/display.h \
Pierre Ynard's avatar
Pierre Ynard committed
361
	video_output/event.h \
362 363
	video_output/inhibit.c \
	video_output/inhibit.h \
364 365
	video_output/snapshot.c \
	video_output/snapshot.h \
366
	video_output/statistic.h \
367 368 369 370 371 372
	video_output/video_output.c \
	video_output/vout_pictures.c \
	video_output/vout_pictures.h \
	video_output/video_text.c \
	video_output/video_widgets.c \
	video_output/vout_subpictures.c \
373
	video_output/window.c \
374
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
375
	video_output/vout_internal.h \
376
	video_output/vout_control.h \
Clément Stenac's avatar
Clément Stenac committed
377
	audio_output/aout_internal.h \
378 379 380
	audio_output/common.c \
	audio_output/dec.c \
	audio_output/filters.c \
381
	audio_output/input.c \
382 383 384 385 386 387 388 389 390 391 392
	audio_output/mixer.c \
	audio_output/output.c \
	audio_output/intf.c \
	osd/osd.c \
	osd/osd_text.c \
	osd/osd_widgets.c \
	network/acl.c \
	network/getaddrinfo.c \
	network/io.c \
	network/tcp.c \
	network/udp.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
393
	network/rootbind.c \
394
	network/tls.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
395
	network/poll.c \
396 397 398
	text/charset.c \
	text/strings.c \
	text/unicode.c \
399
	text/filesystem.c \
400
	text/wincp.c \
401 402
	text/iso_lang.c \
	text/iso-639_def.h \
403
	misc/md5.c \
404
	misc/rand.c \
405 406
	misc/mtime.c \
	misc/block.c \
407
	misc/fourcc.c \
408
	misc/es_format.c \
409 410
	misc/picture_fifo.c \
	misc/picture_pool.c \
411 412
	modules/modules.h \
	modules/modules.c \
413
	modules/cache.c \
414
	modules/entry.c \
415
	modules/os.c \
416 417 418
	misc/threads.c \
	misc/stats.c \
	misc/cpu.c \
419
	misc/action.c \
420
	misc/epg.c \
421
	config/configuration.h \
422 423 424
	config/core.c \
	config/chain.c \
	config/file.c \
425
	config/intf.c \
426
	config/keys.c \
427
	config/cmdline.c \
428
	misc/events.c \
429 430 431
	misc/image.c \
	misc/messages.c \
	misc/objects.c \
Clément Stenac's avatar
Clément Stenac committed
432
	misc/variables.h \
433 434
	misc/variables.c \
	misc/error.c \
Rafaël Carré's avatar
Typo  
Rafaël Carré committed
435
	misc/update.h \
436
	misc/update.c \
437
	misc/update_crypto.c \
438 439
	misc/xml.c \
	extras/libc.c \
Laurent Aimar's avatar
Laurent Aimar committed
440
	misc/filter.c \
441
	misc/filter_chain.c \
442
	misc/http_auth.c \
Srikanth Raju's avatar
Srikanth Raju committed
443
	misc/sql.c \
444 445
	$(NULL)

446 447 448 449
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

450 451 452 453 454 455 456 457
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)

458 459
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
460
	input/vlm_event.c \
461 462 463
	input/vlmshell.c \
	$(NULL)

464 465 466 467 468 469 470 471 472
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(OPT_SOURCES_libvlc_beos) \
	$(OPT_SOURCES_libvlc_darwin) \
	$(OPT_SOURCES_libvlc_win32) \
	$(OPT_SOURCES_libvlc_dirent) \
	$(OPT_SOURCES_libvlc_getopt) \
	$(NULL)

473
SOURCES_libvlc_control = \
Clément Stenac's avatar
Clément Stenac committed
474
	control/libvlc_internal.h \
475
	control/event_internal.h \
476 477 478 479
	control/media_internal.h \
	control/media_list_internal.h \
	control/media_list_view_internal.h \
	control/media_player_internal.h \
480
	control/core.c \
481
	control/error.c \
482 483 484 485 486
	control/log.c \
	control/playlist.c \
	control/vlm.c \
	control/video.c \
	control/audio.c \
Filippo Carone's avatar
Filippo Carone committed
487
	control/event.c \
488
	control/event_async.c \
489
	control/flat_media_list_view.c \
490
	control/hierarchical_media_list_view.c \
491
	control/hierarchical_node_media_list_view.c \
492 493
	control/media.c \
	control/media_player.c \
494
	control/media_list.c \
495
	control/media_list_path.h \
496
	control/media_list_player.c \
497
	control/media_list_view.c \
498
	control/media_library.c \
Clément Stenac's avatar
Clément Stenac committed
499
	control/mediacontrol_internal.h \
500 501
	control/mediacontrol_core.c \
	control/mediacontrol_util.c \
502
	control/mediacontrol_audio_video.c \
503
	control/media_discoverer.c
504

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
505 506 507 508 509 510 511 512 513
###############################################################################
# GIT revision
###############################################################################

BUILT_SOURCES += stamp-revision
CLEANFILES += revision.txt revision.c

revision.c: revision.txt
	rm -f -- revision.c
514
	echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
515 516
		> revision.c

517
revision.txt: Makefile.am
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
518 519 520 521 522
	$(MAKE) stamp-revision
	touch revision.txt

stamp-revision:
	rm -f -- revision.tmp
523
	(git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
524
		--match '?.*.*' --always || echo exported) > revision.tmp
525 526 527 528 529
	if diff revision.tmp revision.txt >/dev/null; then \
		rm -f -- revision.tmp; \
	else \
		mv -f -- revision.tmp revision.txt; \
	fi 2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
530

531 532 533
###############################################################################
# Unit/regression test
###############################################################################
534

535
dist_check_SCRIPTS = check_symbols check_headers
536
TESTS = check_symbols
537

538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
check_DATA = libvlc-headers.sym libvlc-sorted.sym
CLEANFILES += $(check_DATA)

libvlc-sorted.sym: libvlccore.sym
	rm -f libvlc-sorted.sym
	sort -fdu < "$(srcdir)/libvlccore.sym" > libvlc-sorted.sym

libvlc-headers.sym:
	rm -f libvlc-headers.sym
	cat ${srcdir}/../include/vlc_*.h ${srcdir}/control/*.h | \
	sed -n -e 's/^[ ]*VLC_EXPORT[ ]*([^,]*,\([^,]*\),.*/\1/p' | \
	sed -e 's/[^a-zA-Z0-9_]*//' | \
	sort -fdu > libvlc-headers.sym

.PHONY: libvlc-headers.sym

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
	$(srcdir)/check_headers $(pkginclude_HEADERS)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
565
	$(srcdir)/check_headers $(pluginsinclude_HEADERS)
566

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

.PHONY: FORCE