Makefile.am 11.6 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_structures.h \
32 33 34
	../include/vlc/libvlc_media_list.h \
	../include/vlc/libvlc_events.h \
	../include/vlc/libvlc_vlm.h \
35 36 37 38
	../include/vlc/mediacontrol.h \
	../include/vlc/mediacontrol_structures.h \
	$(NULL)

39
pluginsinclude_HEADERS = \
40 41
	../include/vlc_access.h \
	../include/vlc_acl.h \
42
	../include/vlc_aout.h \
43
	../include/vlc_arrays.h \
44
	../include/vlc_avcodec.h \
45 46 47 48 49
	../include/vlc_bits.h \
	../include/vlc_block.h \
	../include/vlc_block_helper.h \
	../include/vlc_charset.h \
	../include/vlc_codec.h \
50 51
	../include/vlc_common.h \
	../include/vlc_config.h \
52
	../include/vlc_config_cat.h \
53
	../include/vlc_configuration.h \
54
	../include/vlc_dialog.h \
55
	../include/vlc_demux.h \
56
	../include/vlc_epg.h \
57
	../include/vlc_es.h \
58 59
	../include/vlc_es_out.h \
	../include/vlc_events.h \
60
	../include/vlc_filter.h \
61
	../include/vlc_fourcc.h \
62 63
	../include/vlc_gcrypt.h \
	../include/vlc_httpd.h \
64 65
	../include/vlc_image.h \
	../include/vlc_input.h \
66
	../include/vlc_input_item.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
67
	../include/vlc_main.h \
68
	../include/vlc_md5.h \
69
	../include/vlc_messages.h \
70
	../include/vlc_meta.h \
71 72 73
	../include/vlc_modules.h \
	../include/vlc_mtime.h \
	../include/vlc_objects.h \
74
	../include/vlc_picture.h \
75
	../include/vlc_playlist.h \
76
	../include/vlc_plugin.h \
77 78 79
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
	../include/vlc_sout.h \
80 81
	../include/vlc_stream.h \
	../include/vlc_strings.h \
82
	../include/vlc_subpicture.h \
83
	../include/vlc_threads.h \
84
	../include/vlc_url.h \
85 86 87
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
	../include/vlc_vout.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
88
	../include/vlc_window.h \
89
	../include/vlc_xml.h \
90
	$(NULL)
91

92
noinst_HEADERS = \
93
	../include/mmx.h \
94
	../include/vlc_codec_synchro.h \
95 96
	../include/vlc_codecs.h \
	../include/vlc_devices.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
97
	../include/vlc_fixups.h \
98
	../include/vlc_interface.h \
99
	../include/vlc_intf_strings.h \
100
	../include/vlc_iso_lang.h \
101
	../include/vlc_keys.h \
102
	../include/vlc_network.h \
103
	../include/vlc_osd.h \
Rémi Denis-Courmont's avatar
Tabs  
Rémi Denis-Courmont committed
104
	../include/vlc_pgpkey.h \
105
	../include/vlc_tls.h \
106 107 108 109
	../include/vlc_update.h \
	../include/vlc_vod.h \
	$(NULL)

110 111 112 113 114 115 116 117 118 119 120 121 122 123
../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" "$@"
124

125 126 127 128 129
###############################################################################
# pkg-config integration
###############################################################################

pkgconfigdir = $(libdir)/pkgconfig
130
pkgconfig_DATA = libvlc.pc vlc-plugin.pc
131 132
CLEANFILES += $(pkgconfig_DATA)

133 134 135 136
.pc.in.pc: $(top_builddir)/config.status
	cd "$(top_builddir)" && \
	$(SHELL) ./config.status --file="src/$@"

137 138 139 140
###############################################################################
# Building libvlc
###############################################################################

141 142 143
nice:
	$(top_builddir)/compile

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

146
AM_LDFLAGS = -no-undefined
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
147
if HAVE_WIN32
148
AM_LDFLAGS += -avoid-version
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
149
endif
150 151 152
if HAVE_WINCE
AM_LDFLAGS += -avoid-version
endif
153

154
libvlccore_la_SOURCES = $(SOURCES_libvlc)
155
libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
156
	-DMODULE_STRING=\"main\" \
157
	-DLOCALEDIR=\"$(localedir)\" \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
158
	-DSYSCONFDIR=\"$(sysconfdir)\" \
159
	-DDATA_PATH=\"$(vlcdatadir)\" \
160
	-DLIBDIR=\"$(libdir)\" \
161
	-DPLUGIN_PATH=\"$(vlclibdir)\"
162
libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
163
	-no-undefined \
164
	-export-symbols $(srcdir)/libvlccore.sym \
165
	-version-info 3:0:0
166
libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
167
	$(LTLIBINTL) ../compat/libcompat.la
168
libvlccore_la_DEPENDENCIES = libvlccore.sym
169
if HAVE_WIN32
170 171
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
172
endif
173

174 175 176
libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@

177
libvlc_la_SOURCES = $(SOURCES_libvlc_control)
178 179
libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
	libvlccore.la ../compat/libcompat.la
180
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
181
libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
182
	-version-info 5:0:0 \
183
	-export-symbols $(srcdir)/libvlc.sym
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
184
libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
185
if HAVE_WIN32
186 187
libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
188 189
endif

190

191
EXTRA_libvlccore_la_SOURCES = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
192 193
	$(SOURCES_libvlc_beos) \
	$(SOURCES_libvlc_darwin) \
194
	$(SOURCES_libvlc_linux) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
195
	$(SOURCES_libvlc_win32) \
196
	$(SOURCES_libvlc_other) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
197 198
	$(SOURCES_libvlc_dirent) \
	$(SOURCES_libvlc_getopt) \
199
	$(SOURCES_libvlc_httpd) \
200
	$(SOURCES_libvlc_sout) \
201
	$(SOURCES_libvlc_vlm) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
202
	$(NULL)
203
if HAVE_BEOS
204
libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
205
else
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
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
219
endif
220 221 222 223
endif
endif
endif
endif
224
if BUILD_DIRENT
225
libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
226 227
endif
if BUILD_GETOPT
228
libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
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 241 242 243
SOURCES_libvlc_beos = \
	$(NULL)

SOURCES_libvlc_darwin = \
244
	misc/darwin_specific.c \
245 246
	$(NULL)

247 248 249 250
SOURCES_libvlc_linux = \
	misc/linux_specific.c \
	$(NULL)

251 252
SOURCES_libvlc_win32 = \
	misc/win32_specific.c \
253
	network/winsock.c \
254 255
	$(NULL)

256 257
SOURCES_libvlc_other = misc/not_specific.c

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

398 399 400 401
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

402 403 404 405 406 407 408 409
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)

410 411
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
412
	input/vlm_event.c \
413 414 415
	input/vlmshell.c \
	$(NULL)

416 417 418 419 420 421 422 423 424
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)

425
SOURCES_libvlc_control = \
Clément Stenac's avatar
Clément Stenac committed
426
	control/libvlc_internal.h \
427 428 429 430 431 432
	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
433
	control/event.c \
434
	control/flat_media_list_view.c \
435
	control/hierarchical_media_list_view.c \
436
	control/hierarchical_node_media_list_view.c \
437 438
	control/media.c \
	control/media_player.c \
439
	control/media_list.c \
440
	control/media_list_path.h \
441
	control/media_list_player.c \
442
	control/media_list_view.c \
443
	control/media_library.c \
Clément Stenac's avatar
Clément Stenac committed
444
	control/mediacontrol_internal.h \
445 446
	control/mediacontrol_core.c \
	control/mediacontrol_util.c \
447
	control/mediacontrol_audio_video.c \
448
	control/media_discoverer.c
449

450 451 452
###############################################################################
# Unit/regression test
###############################################################################
453

454
dist_check_SCRIPTS = check_symbols check_headers
455
TESTS = check_symbols
456 457

check-local:
458
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
459 460 461 462 463 464 465 466
	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
467
	$(srcdir)/check_headers $(pkginclude_HEADERS)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
468
	$(srcdir)/check_headers $(pluginsinclude_HEADERS)
469

470
FORCE:
471 472 473 474
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE