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
	../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_playlist.h \
75
	../include/vlc_plugin.h \
76 77 78
	../include/vlc_rand.h \
	../include/vlc_services_discovery.h \
	../include/vlc_sout.h \
79 80
	../include/vlc_stream.h \
	../include/vlc_strings.h \
81
	../include/vlc_threads.h \
82
	../include/vlc_url.h \
83 84 85
	../include/vlc_variables.h \
	../include/vlc_vlm.h \
	../include/vlc_vout.h \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
86
	../include/vlc_window.h \
87
	../include/vlc_xml.h \
88
	$(NULL)
89

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

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

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

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

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

135 136 137 138
###############################################################################
# Building libvlc
###############################################################################

139 140 141
nice:
	$(top_builddir)/compile

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

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

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

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

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

188

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

238 239 240 241
SOURCES_libvlc_beos = \
	$(NULL)

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

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

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

254 255
SOURCES_libvlc_other = misc/not_specific.c

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

396 397 398 399
SOURCES_libvlc_httpd = \
	network/httpd.c \
	$(NULL)

400 401 402 403 404 405 406 407
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)

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

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

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

448 449 450
###############################################################################
# Unit/regression test
###############################################################################
451

452
dist_check_SCRIPTS = check_symbols check_headers
453
TESTS = check_symbols
454 455

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

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

.PHONY: FORCE