Makefile.am 12.7 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 = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
10
	vlc-plugin.pc.in \
11
	libvlccore.sym \
12
	revision.txt
13

14
BUILT_SOURCES = $(nodist_pluginsinclude_HEADERS)
Christophe Mutricy's avatar
Christophe Mutricy committed
15
CLEANFILES = $(BUILT_SOURCES)
16

17
SUFFIXES = .pc.in .pc .rc.in .rc
18

19 20 21 22
###############################################################################
# Headers
###############################################################################

23
pluginsincludedir = $(pkgincludedir)/plugins
24

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

102
noinst_HEADERS = \
103
	../include/vlc_codec_synchro.h \
104
	../include/vlc_codecs.h \
Pierre Ynard's avatar
Pierre Ynard committed
105
	../include/vlc_extensions.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 \
Pierre Ynard's avatar
Pierre Ynard committed
110
	../include/vlc_memory.h \
111
	../include/vlc_osd.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
112
	../include/vlc_pgpkey.h \
113 114
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
115
	../include/vlc_vout_wrapper.h \
Pierre Ynard's avatar
Pierre Ynard committed
116
	../include/vlc_windows_interfaces.h \
117 118
	$(NULL)

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

136 137 138 139 140
###############################################################################
# pkg-config integration
###############################################################################

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

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

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

161 162 163 164
###############################################################################
# Building libvlc
###############################################################################

165
lib_LTLIBRARIES = libvlccore.la
166

167
AM_CPPFLAGS = $(INCICONV) \
168
	-DMODULE_STRING=\"main\" \
169
	-DLOCALEDIR=\"$(localedir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
170
	-DSYSCONFDIR=\"$(sysconfdir)\" \
171
	-DPKGDATADIR=\"$(vlcdatadir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
172
	-DPKGLIBDIR=\"$(vlclibdir)\"
173 174 175 176 177 178
AM_CFLAGS = $(CFLAGS_libvlccore)

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

192
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
193
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
194

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

240
SOURCES_libvlc_darwin = \
Pierre Ynard's avatar
Pierre Ynard committed
241
	posix/darwin_dirs.c \
242
	posix/filesystem.c \
243
	posix/plugin.c \
244 245
	posix/thread.c \
	posix/darwin_specific.c \
246
	posix/rand.c \
247 248
	$(NULL)

249
SOURCES_libvlc_linux = \
250 251
	posix/dirs.c \
	posix/filesystem.c \
252
	posix/plugin.c \
253
	posix/thread.c \
254
	posix/linux_cpu.c \
255
	posix/linux_specific.c \
256
	posix/specific.c \
257
	posix/rand.c \
258 259
	$(NULL)

260
SOURCES_libvlc_win32 = \
261
	win32/dirs.c \
262
	win32/filesystem.c \
263
	win32/plugin.c \
264
	win32/thread.c \
265
	win32/specific.c \
266
	win32/winsock.c \
267
	win32/rand.c \
268 269
	$(NULL)

270 271
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
272
	symbian/dirs.c \
273
	win32/plugin.c \
274
	posix/rand.c \
275 276
	$(NULL)

komh's avatar
komh committed
277
SOURCES_libvlc_os2 = \
278
	os2/getaddrinfo.c \
279
	os2/dirs.c \
280 281
	os2/filesystem.c \
	os2/plugin.c \
komh's avatar
komh committed
282
	os2/thread.c \
komh's avatar
komh committed
283
	os2/specific.c \
284
	os2/rand.c \
komh's avatar
komh committed
285 286
	$(NULL)

287
SOURCES_libvlc_other = \
288 289 290
	posix/dirs.c \
	posix/filesystem.c \
	posix/thread.c \
291
	posix/plugin.c \
292
	posix/specific.c \
293
	posix/rand.c \
294
	$(NULL)
295

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

457 458 459 460
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

461 462 463 464 465 466 467 468
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)

469 470
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
471
	input/vlm_event.c \
472 473 474
	input/vlmshell.c \
	$(NULL)

475 476 477 478
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
479 480 481 482 483
###############################################################################
# GIT revision
###############################################################################

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

486 487 488 489
$(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
490

491
$(srcdir)/revision.txt:
492
	$(AM_V_at)$(MAKE) stamp-revision
493
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
494 495

stamp-revision:
496
	$(AM_V_at)rm -f -- revision.tmp
497 498 499 500 501 502
	$(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 \
503 504
		rm -f -- revision.tmp; \
	else \
505 506 507
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
508

509 510 511
###############################################################################
# Unit/regression test
###############################################################################
512

513
dist_check_SCRIPTS = check_headers
514

515
check-local:
516
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
517 518 519 520 521 522 523 524
	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
525
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
526

527
FORCE:
528 529 530 531
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE