Makefile.am 11.7 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
SOURCES_libvlc_beos = \
241
	misc/pthread.c \
242 243 244
	$(NULL)

SOURCES_libvlc_darwin = \
245
	misc/pthread.c \
246
	misc/darwin_specific.c \
247 248
	$(NULL)

249
SOURCES_libvlc_linux = \
250
	misc/pthread.c \
251 252 253
	misc/linux_specific.c \
	$(NULL)

254
SOURCES_libvlc_win32 = \
255
	misc/w32thread.c \
256
	misc/win32_specific.c \
257
	network/winsock.c \
258 259
	$(NULL)

260 261 262
SOURCES_libvlc_other = \
	misc/pthread.c \
	misc/not_specific.c
263

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

404 405 406 407
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

408 409 410 411 412 413 414 415
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)

416 417
SOURCES_libvlc_vlm = \
	input/vlm.c \
Laurent Aimar's avatar
Laurent Aimar committed
418
	input/vlm_event.c \
419 420 421
	input/vlmshell.c \
	$(NULL)

422 423 424 425 426 427 428 429 430
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)

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

456 457 458
###############################################################################
# Unit/regression test
###############################################################################
459

460
dist_check_SCRIPTS = check_symbols check_headers
461
TESTS = check_symbols
462 463

check-local:
464
	for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
465 466 467 468 469 470 471 472
	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
473
	$(srcdir)/check_headers $(pkginclude_HEADERS)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
474
	$(srcdir)/check_headers $(pluginsinclude_HEADERS)
475

476
FORCE:
477 478 479 480
	@echo "Generated source cannot be phony. Go away." >&2
	@exit 1

.PHONY: FORCE