Makefile.am 14.1 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 \
Rafaël Carré's avatar
Rafaël Carré committed
26
	../include/vlc_addons.h \
27
	../include/vlc_aout.h \
28
	../include/vlc_aout_volume.h \
29
	../include/vlc_arrays.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 \
64
	../include/vlc_meta_fetcher.h \
jetru's avatar
jetru committed
65
	../include/vlc_media_library.h \
66
	../include/vlc_mime.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 \
80
	../include/vlc_fingerprinter.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 \
Rémi Denis-Courmont's avatar
Tabs    
Rémi Denis-Courmont committed
111
	../include/vlc_pgpkey.h \
112
113
	../include/vlc_update.h \
	../include/vlc_vod.h \
Pierre Ynard's avatar
Pierre Ynard committed
114
	../include/vlc_vout_wrapper.h \
Pierre Ynard's avatar
Pierre Ynard committed
115
	../include/vlc_windows_interfaces.h \
116
117
	$(NULL)

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

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

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

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

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

160
161
162
163
###############################################################################
# Building libvlc
###############################################################################

164
lib_LTLIBRARIES = libvlccore.la
165

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

libvlccore_la_SOURCES = $(SOURCES_libvlc)
libvlccore_la_LDFLAGS = \
	$(LDFLAGS_libvlccore) \
183
	-no-undefined \
184
	-export-symbols $(srcdir)/libvlccore.sym \
185
	-version-info 8:0:0
186
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
187
	../compat/libcompat.la \
188
	$(LTLIBINTL) $(LTLIBICONV) \
189
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
190
libvlccore_la_DEPENDENCIES = libvlccore.sym
191
if HAVE_WIN32
192
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
193
194
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version \
						 -Wc,--static -Wc,-static-libgcc
195
endif
196
197
198
if HAVE_OS2
libvlccore_la_LDFLAGS += -avoid-version
endif
199
200
201
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
202

203
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
204
	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
205

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

252
SOURCES_libvlc_darwin = \
253
	darwin/dirs.c \
254
	posix/filesystem.c \
255
	posix/plugin.c \
256
	darwin/thread.c \
257
	posix/timer.c \
258
	darwin/specific.c \
259
	posix/rand.c \
260
	darwin/error.c \
261
	darwin/netconf.c \
262
263
	$(NULL)

264
265
SOURCES_libvlc_android = \
	android/dirs.c \
Rafaël Carré's avatar
Rafaël Carré committed
266
	android/thread.c \
267
	android/error.c \
268
	posix/filesystem.c \
269
	android/netconf.c \
270
271
272
273
274
275
276
277
	posix/plugin.c \
	posix/timer.c \
	posix/linux_cpu.c \
	posix/linux_specific.c \
	posix/specific.c \
	posix/rand.c \
	$(NULL)

278
SOURCES_libvlc_linux = \
279
	posix/dirs.c \
280
	posix/error.c \
281
	posix/filesystem.c \
282
	posix/netconf.c \
283
	posix/plugin.c \
284
	posix/thread.c \
285
	posix/timer.c \
286
	posix/linux_cpu.c \
287
	posix/linux_specific.c \
288
	posix/specific.c \
289
	posix/rand.c \
290
291
	$(NULL)

292
SOURCES_libvlc_win32 = \
293
	win32/dirs.c \
294
	win32/error.c \
295
	win32/filesystem.c \
296
	win32/netconf.c \
297
	win32/plugin.c \
298
	win32/thread.c \
299
	win32/specific.c \
300
	win32/winsock.c \
301
	win32/rand.c \
302
303
	$(NULL)

304
305
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
306
	symbian/dirs.c \
307
	win32/plugin.c \
308
	posix/rand.c \
309
310
	$(NULL)

311
SOURCES_libvlc_os2 = \
312
	os2/getaddrinfo.c \
313
	os2/dirs.c \
314
	darwin/error.c \
315
	os2/filesystem.c \
KO Myung-Hun's avatar
KO Myung-Hun committed
316
	os2/netconf.c \
317
	os2/plugin.c \
318
	os2/thread.c \
319
	os2/specific.c \
320
	os2/rand.c \
321
322
	$(NULL)

323
SOURCES_libvlc_other = \
324
	posix/dirs.c \
325
	posix/error.c \
326
	posix/filesystem.c \
327
	posix/netconf.c \
328
	posix/thread.c \
329
	posix/timer.c \
330
	posix/plugin.c \
331
	posix/specific.c \
332
	posix/rand.c \
333
	$(NULL)
334

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

495
496
497
498
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

499
500
501
502
503
504
505
SOURCES_libvlc_sout = \
	stream_output/stream_output.c \
	stream_output/stream_output.h \
	stream_output/sap.c \
	stream_output/sdp.c \
	$(NULL)

506
507
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
508
	input/vlm_event.c \
509
510
511
	input/vlmshell.c \
	$(NULL)

512
513
514
515
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

516
517
518
519
520
521
522
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
	test_md5 \
523
	test_picture_pool \
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
	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
539
test_picture_pool_SOURCES = test/picture_pool.c
540
541
542
543
544
545
546
547
548
549
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
550
551
552
553
554
###############################################################################
# GIT revision
###############################################################################

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

557
558
559
560
$(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
561

562
$(srcdir)/revision.txt:
563
	$(AM_V_at)$(MAKE) stamp-revision
564
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
565
566

stamp-revision:
567
	$(AM_V_at)rm -f -- revision.tmp
568
569
570
571
572
573
	$(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 \
574
575
		rm -f -- revision.tmp; \
	else \
576
577
578
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
579

580
581
582
###############################################################################
# Unit/regression test
###############################################################################
583

584
dist_check_SCRIPTS = check_headers
585

586
check-local:
587
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
588
589
590
591
592
593
594
595
	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
596
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
597

598
FORCE:
599
600
601
602
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE