Makefile.am 12.9 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_arrays.h \
50
	../include/vlc_avcodec.h \
51 52 53 54 55
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
	../include/vlc_charset.h \
	../include/vlc_codec.h \
56 57
	../include/vlc_common.h \
	../include/vlc_config.h \
58
	../include/vlc_config_cat.h \
59
	../include/vlc_configuration.h \
60
	../include/vlc_dialog.h \
61
	../include/vlc_demux.h \
62
	../include/vlc_epg.h \
63
	../include/vlc_es.h \
64 65
	../include/vlc_es_out.h \
	../include/vlc_events.h \
66
	../include/vlc_filter.h \
67
	../include/vlc_fourcc.h \
68 69
	../include/vlc_gcrypt.h \
	../include/vlc_httpd.h \
70 71
	../include/vlc_image.h \
	../include/vlc_input.h \
72
	../include/vlc_input_item.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
73
	../include/vlc_main.h \
74
	../include/vlc_md5.h \
75
	../include/vlc_messages.h \
76
	../include/vlc_meta.h \
77 78 79
	../include/vlc_modules.h \
	../include/vlc_mtime.h \
	../include/vlc_objects.h \
80
	../include/vlc_picture.h \
81 82
	../include/vlc_picture_fifo.h \
	../include/vlc_picture_pool.h \
83
	../include/vlc_playlist.h \
84
	../include/vlc_plugin.h \
85 86 87
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
	../include/vlc_sout.h \
88 89
	../include/vlc_stream.h \
	../include/vlc_strings.h \
90
	../include/vlc_subpicture.h \
91
	../include/vlc_threads.h \
92
	../include/vlc_url.h \
93 94
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
95
	../include/vlc_video_splitter.h \
96
	../include/vlc_vout.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
97
	../include/vlc_window.h \
98
	../include/vlc_xml.h \
99
	$(NULL)
100

101
noinst_HEADERS = \
102
	../include/mmx.h \
103
	../include/vlc_codec_synchro.h \
104 105
	../include/vlc_codecs.h \
	../include/vlc_devices.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
106
	../include/vlc_fixups.h \
107
	../include/vlc_interface.h \
108
	../include/vlc_intf_strings.h \
109
	../include/vlc_iso_lang.h \
110
	../include/vlc_keys.h \
111
	../include/vlc_network.h \
112
	../include/vlc_osd.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
113
	../include/vlc_pgpkey.h \
114
	../include/vlc_tls.h \
115 116 117 118
	../include/vlc_update.h \
	../include/vlc_vod.h \
	$(NULL)

119 120 121 122 123 124 125 126 127 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"
	cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
	echo ";" >> "$@.tmp"
	echo "static const char psz_thanks[] =" >> "$@.tmp"
	grep -v '$$Id:'  $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
	echo ";" >> "$@.tmp"
	echo "static const char psz_authors[] =" >> "$@.tmp"
	grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
	echo ";" >> "$@.tmp"
	mv -f -- "$@.tmp" "$@"
133

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

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

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

146 147 148 149
###############################################################################
# Building libvlc
###############################################################################

150 151 152
nice:
	$(top_builddir)/compile

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

155
AM_LDFLAGS = -no-undefined
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
156
if HAVE_WIN32
157
AM_LDFLAGS += -avoid-version
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
158
endif
159 160 161
if HAVE_WINCE
AM_LDFLAGS += -avoid-version
endif
162

163
libvlccore_la_SOURCES = $(SOURCES_libvlc)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
164
nodist_libvlccore_la_SOURCES = revision.c
165
libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
166
	-DMODULE_STRING=\"main\" \
167
	-DLOCALEDIR=\"$(localedir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
168
	-DSYSCONFDIR=\"$(sysconfdir)\" \
169
	-DDATA_PATH=\"$(vlcdatadir)\" \
170
	-DLIBDIR=\"$(libdir)\" \
171
	-DPLUGIN_PATH=\"$(vlclibdir)\"
172
libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
173
	-no-undefined \
174
	-export-symbols $(srcdir)/libvlccore.sym \
175
	-version-info 3:0:0
176
libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
177
	$(LTLIBINTL) ../compat/libcompat.la
178
libvlccore_la_DEPENDENCIES = libvlccore.sym
179
if HAVE_WIN32
180 181
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
182
endif
183

184 185 186
libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@

187
libvlc_la_SOURCES = $(SOURCES_libvlc_control)
188
nodist_libvlc_la_SOURCES = revision.c
189 190
libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
	libvlccore.la ../compat/libcompat.la
191
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
192
libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
193
	-version-info 5:0:0 \
194
	-export-symbols $(srcdir)/libvlc.sym
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
195
libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
196
if HAVE_WIN32
197 198
libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
199 200
endif

201

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

251
SOURCES_libvlc_beos = \
252
	misc/pthread.c \
253 254 255
	$(NULL)

SOURCES_libvlc_darwin = \
256
	misc/pthread.c \
257
	misc/darwin_specific.c \
258 259
	$(NULL)

260
SOURCES_libvlc_linux = \
261
	misc/pthread.c \
262 263 264
	misc/linux_specific.c \
	$(NULL)

265
SOURCES_libvlc_win32 = \
266
	misc/w32thread.c \
267
	misc/win32_specific.c \
268
	network/winsock.c \
269 270
	$(NULL)

271 272 273
SOURCES_libvlc_other = \
	misc/pthread.c \
	misc/not_specific.c
274

275 276 277 278 279 280 281 282 283 284 285 286 287
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 \
288
	libvlc-module.c \
289
	missing.c \
290
	version.c \
291
	interface/dialog.c \
292 293
	interface/interface.c \
	interface/intf_eject.c \
294
	playlist/playlist_internal.h \
295
	playlist/art.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
296
	playlist/art.h \
297 298 299
	playlist/thread.c \
	playlist/control.c \
	playlist/engine.c \
300
	playlist/fetcher.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
301
	playlist/fetcher.h \
302 303
	playlist/sort.c \
	playlist/loadsave.c \
304
	playlist/preparser.c \
Christophe Mutricy's avatar
Christophe Mutricy committed
305
	playlist/preparser.h \
306
	playlist/tree.c \
307
	playlist/item.c \
308
	playlist/search.c \
309
	playlist/services_discovery.c \
310
	input/item.c \
311 312 313 314
	input/access.c \
	input/clock.c \
	input/control.c \
	input/decoder.c \
315
	input/decoder_synchro.c \
316 317
	input/demux.c \
	input/es_out.c \
318
	input/es_out_timeshift.c \
319
	input/event.c \
320
	input/input.c \
321
	input/meta.c \
322
	input/access.h \
323 324
	input/clock.h \
	input/decoder.h \
325
	input/demux.h \
326
	input/es_out.h \
327
	input/es_out_timeshift.h \
328
	input/event.h \
329
	input/item.h \
330
	input/stream.h \
331
	input/input_internal.h \
332
	input/input_interface.h \
333
	input/vlm_internal.h \
Laurent Aimar's avatar
Laurent Aimar committed
334
	input/vlm_event.h \
335 336
	input/resource.h \
	input/resource.c \
337
	input/stream.c \
338
	input/stream_demux.c \
339
	input/stream_filter.c \
340
	input/stream_memory.c \
341 342 343 344 345 346 347 348 349
	input/subtitles.c \
	input/var.c \
	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 \
	video_output/vout_intf.c \
Laurent Aimar's avatar
Laurent Aimar committed
350
	video_output/vout_internal.h \
351
	video_output/vout_control.h \
Clément Stenac's avatar
Clément Stenac committed
352
	audio_output/aout_internal.h \
353 354 355
	audio_output/common.c \
	audio_output/dec.c \
	audio_output/filters.c \
356
	audio_output/input.c \
357 358 359 360 361 362 363 364 365 366 367
	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
368
	network/rootbind.c \
369
	network/tls.c \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
370
	network/poll.c \
371 372 373
	text/charset.c \
	text/strings.c \
	text/unicode.c \
374
	text/filesystem.c \
375
	text/wincp.c \
376 377
	text/iso_lang.c \
	text/iso-639_def.h \
378
	misc/md5.c \
379
	misc/rand.c \
380 381
	misc/mtime.c \
	misc/block.c \
382
	misc/fourcc.c \
383
	misc/es_format.c \
384 385
	modules/modules.h \
	modules/modules.c \
386
	modules/cache.c \
387
	modules/entry.c \
388
	modules/os.c \
389 390 391
	misc/threads.c \
	misc/stats.c \
	misc/cpu.c \
392
	misc/action.c \
393
	config/configuration.h \
394
	config/core.c \
395
	config/dirs.c \
396 397
	config/chain.c \
	config/file.c \
398
	config/intf.c \
399
	config/cmdline.c \
400
	misc/events.c \
401 402 403
	misc/image.c \
	misc/messages.c \
	misc/objects.c \
Clément Stenac's avatar
Clément Stenac committed
404
	misc/variables.h \
405 406
	misc/variables.c \
	misc/error.c \
Rafaël Carré's avatar
Typo  
Rafaël Carré committed
407
	misc/update.h \
408 409
	misc/update.c \
	misc/xml.c \
410
	misc/devices.c \
411
	extras/libc.c \
Laurent Aimar's avatar
Laurent Aimar committed
412
	misc/filter.c \
413
	misc/filter_chain.c \
414 415
	$(NULL)

416 417 418 419
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

420 421 422 423 424 425 426 427
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)

428 429
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
430
	input/vlm_event.c \
431 432 433
	input/vlmshell.c \
	$(NULL)

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

443
SOURCES_libvlc_control = \
Clément Stenac's avatar
Clément Stenac committed
444
	control/libvlc_internal.h \
445
	control/event_internal.h \
446 447 448 449
	control/media_internal.h \
	control/media_list_internal.h \
	control/media_list_view_internal.h \
	control/media_player_internal.h \
450 451 452 453 454 455
	control/core.c \
	control/log.c \
	control/playlist.c \
	control/vlm.c \
	control/video.c \
	control/audio.c \
Filippo Carone's avatar
Filippo Carone committed
456
	control/event.c \
457
	control/event_async.c \
458
	control/flat_media_list_view.c \
459
	control/hierarchical_media_list_view.c \
460
	control/hierarchical_node_media_list_view.c \
461 462
	control/media.c \
	control/media_player.c \
463
	control/media_list.c \
464
	control/media_list_path.h \
465
	control/media_list_player.c \
466
	control/media_list_view.c \
467
	control/media_library.c \
Clément Stenac's avatar
Clément Stenac committed
468
	control/mediacontrol_internal.h \
469 470
	control/mediacontrol_core.c \
	control/mediacontrol_util.c \
471
	control/mediacontrol_audio_video.c \
472
	control/media_discoverer.c
473

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
474 475 476 477 478 479 480 481 482
###############################################################################
# GIT revision
###############################################################################

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

revision.c: revision.txt
	rm -f -- revision.c
483
	echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
484 485 486 487 488 489 490 491
		> revision.c

revision.txt:
	$(MAKE) stamp-revision
	touch revision.txt

stamp-revision:
	rm -f -- revision.tmp
492 493
	(git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
		--always || echo exported) > revision.tmp
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
494 495 496
	diff revision.tmp revision.txt >/dev/null 2>&1 || \
	mv -f -- revision.tmp revision.txt

497 498 499
###############################################################################
# Unit/regression test
###############################################################################
500

501
dist_check_SCRIPTS = check_symbols check_headers
502
TESTS = check_symbols
503 504

check-local:
505
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
506 507 508 509 510 511 512 513
	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
514
	$(srcdir)/check_headers $(pkginclude_HEADERS)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
515
	$(srcdir)/check_headers $(pluginsinclude_HEADERS)
516

517
FORCE:
518 519 520 521
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE