Makefile.am 11.4 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 152
libvlccore_la_SOURCES = $(SOURCES_libvlc)
libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
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 libvlc` $(AM_LDFLAGS) \
160
	-export-symbols $(srcdir)/libvlccore.sym \
161
	-version-info 2:0:0
162 163
libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
libvlccore_la_DEPENDENCIES = libvlccore.sym
164
if HAVE_WIN32
165 166
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
167
endif
168

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

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

185

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

235 236 237 238
SOURCES_libvlc_beos = \
	$(NULL)

SOURCES_libvlc_darwin = \
239
	misc/darwin_specific.c \
240 241
	$(NULL)

242 243 244 245
SOURCES_libvlc_linux = \
	misc/linux_specific.c \
	$(NULL)

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

251 252
SOURCES_libvlc_other = misc/not_specific.c

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

392 393 394 395
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

396 397 398 399 400 401 402 403
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)

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

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

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

444 445 446
###############################################################################
# Unit/regression test
###############################################################################
447

448
dist_check_SCRIPTS = check_symbols check_headers
449
TESTS = check_symbols
450 451

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

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

.PHONY: FORCE