Makefile.am 11.5 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 62
	../include/vlc_gcrypt.h \
	../include/vlc_httpd.h \
63 64
	../include/vlc_image.h \
	../include/vlc_input.h \
65
	../include/vlc_input_item.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
66
	../include/vlc_main.h \
67
	../include/vlc_md5.h \
68
	../include/vlc_messages.h \
69
	../include/vlc_meta.h \
70 71 72
	../include/vlc_modules.h \
	../include/vlc_mtime.h \
	../include/vlc_objects.h \
73
	../include/vlc_playlist.h \
74
	../include/vlc_plugin.h \
75 76 77
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
	../include/vlc_sout.h \
78 79
	../include/vlc_stream.h \
	../include/vlc_strings.h \
80
	../include/vlc_threads.h \
81
	../include/vlc_url.h \
82 83 84
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
	../include/vlc_vout.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
85
	../include/vlc_window.h \
86
	../include/vlc_xml.h \
87
	$(NULL)
88

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

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

122 123 124 125 126
###############################################################################
# pkg-config integration
###############################################################################

pkgconfigdir = $(libdir)/pkgconfig
127
pkgconfig_DATA = libvlc.pc vlc-plugin.pc
128 129
CLEANFILES += $(pkgconfig_DATA)

130 131 132 133
.pc.in.pc: $(top_builddir)/config.status
	cd "$(top_builddir)" && \
	$(SHELL) ./config.status --file="src/$@"

134 135 136 137
###############################################################################
# Building libvlc
###############################################################################

138 139 140
nice:
	$(top_builddir)/compile

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

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

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

171 172 173
libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@

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

187

188
EXTRA_libvlccore_la_SOURCES = \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
189 190
	$(SOURCES_libvlc_beos) \
	$(SOURCES_libvlc_darwin) \
191
	$(SOURCES_libvlc_linux) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
192
	$(SOURCES_libvlc_win32) \
193
	$(SOURCES_libvlc_other) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
194 195
	$(SOURCES_libvlc_dirent) \
	$(SOURCES_libvlc_getopt) \
196
	$(SOURCES_libvlc_httpd) \
197
	$(SOURCES_libvlc_sout) \
198
	$(SOURCES_libvlc_vlm) \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
199
	$(NULL)
200
if HAVE_BEOS
201
libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
202
else
203
if HAVE_DARWIN
204
libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
205 206
else
if HAVE_LINUX
207
libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
208
else
209
if HAVE_WIN32
210
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
211
else
212
if HAVE_WINCE
213
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
214
else
215
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
216
endif
217 218 219 220
endif
endif
endif
endif
221
if BUILD_DIRENT
222
libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
223 224
endif
if BUILD_GETOPT
225
libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
226
endif
227 228 229
if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif
230
if ENABLE_SOUT
231
libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
232 233 234
if ENABLE_VLM
libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
endif
235
endif
236

237 238 239 240
SOURCES_libvlc_beos = \
	$(NULL)

SOURCES_libvlc_darwin = \
241
	misc/darwin_specific.c \
242 243
	$(NULL)

244 245 246 247
SOURCES_libvlc_linux = \
	misc/linux_specific.c \
	$(NULL)

248 249
SOURCES_libvlc_win32 = \
	misc/win32_specific.c \
250
	network/winsock.c \
251 252
	$(NULL)

253 254
SOURCES_libvlc_other = misc/not_specific.c

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

394 395 396 397
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

398 399 400 401 402 403 404 405
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)

406 407
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
408
	input/vlm_event.c \
409 410 411
	input/vlmshell.c \
	$(NULL)

412 413 414 415 416 417 418 419 420
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)

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

446 447 448
###############################################################################
# Unit/regression test
###############################################################################
449

450
dist_check_SCRIPTS = check_symbols check_headers
451
TESTS = check_symbols
452 453

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

466
FORCE:
467 468 469 470
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE