Makefile.am 12.8 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 27
	../include/vlc_access.h \
	../include/vlc_acl.h \
28
	../include/vlc_aout.h \
Rafaël Carré's avatar
Rafaël Carré committed
29
	../include/vlc_aout_intf.h \
30
	../include/vlc_aout_mixer.h \
31
	../include/vlc_arrays.h \
Pierre Ynard's avatar
Pierre Ynard committed
32
	../include/vlc_art_finder.h \
33
	../include/vlc_atomic.h \
34
	../include/vlc_avcodec.h \
35 36 37 38 39
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
	../include/vlc_charset.h \
	../include/vlc_codec.h \
40 41
	../include/vlc_common.h \
	../include/vlc_config.h \
42
	../include/vlc_config_cat.h \
43
	../include/vlc_configuration.h \
44
	../include/vlc_cpu.h \
45
	../include/vlc_dialog.h \
46
	../include/vlc_demux.h \
47
	../include/vlc_epg.h \
48
	../include/vlc_es.h \
49 50
	../include/vlc_es_out.h \
	../include/vlc_events.h \
51
	../include/vlc_filter.h \
52
	../include/vlc_fourcc.h \
53
	../include/vlc_fs.h \
54
	../include/vlc_gcrypt.h \
55
	../include/vlc_opengl.h \
56
	../include/vlc_http.h \
57
	../include/vlc_httpd.h \
58
	../include/vlc_image.h \
59
	../include/vlc_inhibit.h \
60
	../include/vlc_input.h \
61
	../include/vlc_input_item.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 \
110
	../include/vlc_keys.h \
Pierre Ynard's avatar
Pierre Ynard committed
111
	../include/vlc_memory.h \
112
	../include/vlc_osd.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
113
	../include/vlc_pgpkey.h \
114 115
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
116
	../include/vlc_vout_wrapper.h \
Pierre Ynard's avatar
Pierre Ynard committed
117
	../include/vlc_windows_interfaces.h \
118 119
	$(NULL)

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

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

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

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

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

162 163 164 165
###############################################################################
# Building libvlc
###############################################################################

166
lib_LTLIBRARIES = libvlccore.la
167

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

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

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

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

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

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

263
SOURCES_libvlc_win32 = \
264
	win32/dirs.c \
265
	win32/atomic.c \
266
	win32/filesystem.c \
267
	win32/plugin.c \
268
	win32/thread.c \
269
	win32/specific.c \
270
	win32/winsock.c \
271
	win32/rand.c \
272 273
	$(NULL)

274 275
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
276 277
	symbian/dirs.c \
	misc/atomic.c \
278
	win32/plugin.c \
279
	posix/rand.c \
280 281
	$(NULL)

komh's avatar
komh committed
282
SOURCES_libvlc_os2 = \
283
	os2/getaddrinfo.c \
284
	os2/dirs.c \
komh's avatar
komh committed
285 286
	misc/atomic.c \
	posix/filesystem.c \
komh's avatar
komh committed
287
	posix/plugin.c \
komh's avatar
komh committed
288
	os2/thread.c \
komh's avatar
komh committed
289
	os2/specific.c \
290
	os2/rand.c \
komh's avatar
komh committed
291 292
	$(NULL)

293
SOURCES_libvlc_other = \
294
	posix/dirs.c \
295
	misc/atomic.c \
296 297
	posix/filesystem.c \
	posix/thread.c \
298
	posix/plugin.c \
299
	posix/specific.c \
300
	posix/rand.c \
301
	$(NULL)
302

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

466 467 468 469
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

470 471 472 473 474 475 476 477
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)

478 479
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
480
	input/vlm_event.c \
481 482 483
	input/vlmshell.c \
	$(NULL)

484 485 486 487
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
488 489 490 491 492
###############################################################################
# GIT revision
###############################################################################

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

495 496 497 498
$(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
499

500
$(srcdir)/revision.txt:
501
	$(AM_V_at)$(MAKE) stamp-revision
502
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
503 504

stamp-revision:
505
	$(AM_V_at)rm -f -- revision.tmp
506 507 508 509 510 511
	$(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 \
512 513
		rm -f -- revision.tmp; \
	else \
514 515 516
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
517

518 519 520
###############################################################################
# Unit/regression test
###############################################################################
521

522
dist_check_SCRIPTS = check_headers
523

524
check-local:
525
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
526 527 528 529 530 531 532 533
	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
534
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
535

536
FORCE:
537 538 539 540
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE