Makefile.am 13.6 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 \
26
	../include/vlc_aout.h \
Rafaël Carré's avatar
Rafaël Carré committed
27
	../include/vlc_aout_intf.h \
28
	../include/vlc_aout_volume.h \
29
	../include/vlc_arrays.h \
Pierre Ynard's avatar
Pierre Ynard committed
30
	../include/vlc_art_finder.h \
31
	../include/vlc_atomic.h \
32
	../include/vlc_avcodec.h \
33
34
35
36
37
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
	../include/vlc_charset.h \
	../include/vlc_codec.h \
38
39
	../include/vlc_common.h \
	../include/vlc_config.h \
40
	../include/vlc_config_cat.h \
41
	../include/vlc_configuration.h \
42
	../include/vlc_cpu.h \
43
	../include/vlc_dialog.h \
44
	../include/vlc_demux.h \
45
	../include/vlc_epg.h \
46
	../include/vlc_es.h \
47
48
	../include/vlc_es_out.h \
	../include/vlc_events.h \
49
	../include/vlc_filter.h \
50
	../include/vlc_fourcc.h \
51
	../include/vlc_fs.h \
52
	../include/vlc_gcrypt.h \
53
	../include/vlc_opengl.h \
54
	../include/vlc_http.h \
55
	../include/vlc_httpd.h \
56
	../include/vlc_image.h \
57
	../include/vlc_inhibit.h \
58
	../include/vlc_input.h \
59
	../include/vlc_input_item.h \
Rafaël Carré's avatar
Rafaël Carré committed
60
	../include/vlc_keys.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
61
	../include/vlc_main.h \
62
	../include/vlc_md5.h \
63
	../include/vlc_messages.h \
64
	../include/vlc_meta.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 \
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) $(IDN_CFLAGS) \
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
AM_CFLAGS = $(CFLAGS_libvlccore)
174
175
176
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
endif
177
178
179
180
if HAVE_DBUS
AM_CPPFLAGS += -DHAVE_DBUS
AM_CFLAGS += $(DBUS_CFLAGS)
endif
181
182
183
184
185

libvlccore_la_SOURCES = $(SOURCES_libvlc)
libvlccore_la_LDFLAGS = \
	-no-undefined \
	$(LDFLAGS_libvlccore) \
186
	-no-undefined \
187
	-export-symbols $(srcdir)/libvlccore.sym \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
188
	-version-info 5:0:0
189
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
190
	../compat/libcompat.la \
191
	$(LTLIBINTL) $(LTLIBICONV) \
192
	$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
193
libvlccore_la_DEPENDENCIES = libvlccore.sym
194
if HAVE_WIN32
195
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
196
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version
197
endif
198
199
200
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
201

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

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

246
SOURCES_libvlc_darwin = \
Pierre Ynard's avatar
Pierre Ynard committed
247
	posix/darwin_dirs.c \
248
	posix/filesystem.c \
249
	posix/plugin.c \
250
	posix/thread.c \
251
	posix/timer.c \
252
	posix/darwin_specific.c \
253
	posix/rand.c \
254
255
	$(NULL)

256
SOURCES_libvlc_linux = \
257
258
	posix/dirs.c \
	posix/filesystem.c \
259
	posix/plugin.c \
260
	posix/thread.c \
261
	posix/timer.c \
262
	posix/linux_cpu.c \
263
	posix/linux_specific.c \
264
	posix/specific.c \
265
	posix/rand.c \
266
267
	$(NULL)

268
SOURCES_libvlc_win32 = \
269
	win32/dirs.c \
270
	win32/filesystem.c \
271
	win32/plugin.c \
272
	misc/rwlock.h \
273
	win32/thread.c \
274
	win32/specific.c \
275
	win32/winsock.c \
276
	win32/rand.c \
277
278
	$(NULL)

279
280
SOURCES_libvlc_symbian = \
	symbian/path.cpp \
281
	symbian/dirs.c \
282
	win32/plugin.c \
283
	posix/rand.c \
284
285
	$(NULL)

286
SOURCES_libvlc_os2 = \
287
	os2/getaddrinfo.c \
288
	os2/dirs.c \
289
290
	os2/filesystem.c \
	os2/plugin.c \
291
	misc/rwlock.h \
292
	os2/thread.c \
293
	os2/specific.c \
294
	os2/rand.c \
295
296
	$(NULL)

297
SOURCES_libvlc_other = \
298
299
300
	posix/dirs.c \
	posix/filesystem.c \
	posix/thread.c \
301
	posix/timer.c \
302
	posix/plugin.c \
303
	posix/specific.c \
304
	posix/rand.c \
305
	$(NULL)
306

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

470
471
472
473
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

474
475
476
477
478
479
480
481
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)

482
483
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
484
	input/vlm_event.c \
485
486
487
	input/vlmshell.c \
	$(NULL)

488
489
490
491
SOURCES_libvlc = \
	$(SOURCES_libvlc_common) \
	$(NULL)

492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# Unit/regression tests
#
check_PROGRAMS = \
	test_block \
	test_dictionary \
	test_i18n_atof \
	test_md5 \
	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
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
524
525
526
527
528
###############################################################################
# GIT revision
###############################################################################

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

531
532
533
534
$(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
535

536
$(srcdir)/revision.txt:
537
	$(AM_V_at)$(MAKE) stamp-revision
538
	$(AM_V_GEN)touch $@
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
539
540

stamp-revision:
541
	$(AM_V_at)rm -f -- revision.tmp
542
543
544
545
546
547
	$(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 \
548
549
		rm -f -- revision.tmp; \
	else \
550
551
552
		mv -f -- revision.tmp $(srcdir)/revision.txt; \
	fi
#2>&1
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
553

554
555
556
###############################################################################
# Unit/regression test
###############################################################################
557

558
dist_check_SCRIPTS = check_headers
559

560
check-local:
561
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
562
563
564
565
566
567
568
569
	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
570
	$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
571

572
FORCE:
573
574
575
576
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE