1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
5 AUTOMAKE_OPTIONS = subdir-objects
8 EXTRA_DIST = extras/COPYING modules/builtin.h.in \
9 misc/beos_specific.cpp \
15 BUILT_SOURCES = modules/builtin.h misc/revision.c ../include/vlc_about.h
16 CLEANFILES = $(BUILT_SOURCES)
20 ###############################################################################
22 ###############################################################################
24 pkgincludedir = $(includedir)/vlc
25 pluginsincludedir = $(pkgincludedir)/plugins
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 ../include/vlc/libvlc_media_list.h \
33 ../include/vlc/libvlc_events.h \
34 ../include/vlc/libvlc_vlm.h \
35 ../include/vlc/mediacontrol.h \
36 ../include/vlc/mediacontrol_structures.h \
39 pluginsinclude_HEADERS = \
40 ../include/vlc_access.h \
41 ../include/vlc_acl.h \
42 ../include/vlc_aout.h \
43 ../include/vlc_arrays.h \
44 ../include/vlc_bits.h \
45 ../include/vlc_block.h \
46 ../include/vlc_block_helper.h \
47 ../include/vlc_charset.h \
48 ../include/vlc_codec.h \
49 ../include/vlc_common.h \
50 ../include/vlc_config.h \
51 ../include/vlc_config_cat.h \
52 ../include/vlc_configuration.h \
53 ../include/vlc_demux.h \
54 ../include/vlc_epg.h \
56 ../include/vlc_es_out.h \
57 ../include/vlc_events.h \
58 ../include/vlc_filter.h \
59 ../include/vlc_gcrypt.h \
60 ../include/vlc_httpd.h \
61 ../include/vlc_image.h \
62 ../include/vlc_input.h \
63 ../include/vlc_main.h \
64 ../include/vlc_md5.h \
65 ../include/vlc_messages.h \
66 ../include/vlc_meta.h \
67 ../include/vlc_modules.h \
68 ../include/vlc_mtime.h \
69 ../include/vlc_objects.h \
70 ../include/vlc_playlist.h \
71 ../include/vlc_plugin.h \
72 ../include/vlc_rand.h \
73 ../include/vlc_services_discovery.h \
74 ../include/vlc_sout.h \
75 ../include/vlc_stream.h \
76 ../include/vlc_strings.h \
77 ../include/vlc_threads.h \
78 ../include/vlc_url.h \
79 ../include/vlc_variables.h \
80 ../include/vlc_vlm.h \
81 ../include/vlc_vout.h \
82 ../include/vlc_window.h \
83 ../include/vlc_xml.h \
88 ../include/vlc_codec_synchro.h \
89 ../include/vlc_codecs.h \
90 ../include/vlc_devices.h \
91 ../include/vlc_fixups.h \
92 ../include/vlc_interface.h \
93 ../include/vlc_intf_strings.h \
94 ../include/vlc_iso_lang.h \
95 ../include/vlc_keys.h \
96 ../include/vlc_network.h \
97 ../include/vlc_osd.h \
98 ../include/vlc_pgpkey.h \
99 ../include/vlc_streaming.h \
100 ../include/vlc_tls.h \
101 ../include/vlc_update.h \
102 ../include/vlc_vod.h \
105 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
107 cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
109 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
110 test -n "$${plugins}" && \
111 for p in $${plugins}; do \
112 echo "int vlc_entry__$$p (module_t *);" ; \
115 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
116 echo " do \\" >> "$@.tmp"
117 echo " { \\" >> "$@.tmp"
119 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
120 test -n "$${plugins}" && \
121 for p in $${plugins}; do \
122 echo " ALLOCATE_BUILTIN($$p); \\" ; \
125 echo ' } while( 0 );' >> "$@.tmp"
126 mv -f -- "$@.tmp" "$@"
128 modules/modules.c: modules/builtin.h
130 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
132 mkdir -p -- ../include
133 echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
134 echo "static const char psz_license[] =" >> "$@.tmp"
135 cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
137 echo "static const char psz_thanks[] =" >> "$@.tmp"
138 grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
140 echo "static const char psz_authors[] =" >> "$@.tmp"
141 grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
143 mv -f -- "$@.tmp" "$@"
145 ###############################################################################
146 # pkg-config integration
147 ###############################################################################
149 pkgconfigdir = $(libdir)/pkgconfig
150 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
151 CLEANFILES += $(pkgconfig_DATA)
153 .pc.in.pc: $(top_builddir)/config.status
154 cd "$(top_builddir)" && \
155 $(SHELL) ./config.status --file="src/$@"
157 ###############################################################################
159 ###############################################################################
162 $(top_builddir)/compile
164 lib_LTLIBRARIES = libvlccore.la libvlc.la
166 AM_LDFLAGS = -no-undefined -no-install
168 AM_LDFLAGS += -avoid-version
171 libvlccore_la_SOURCES = $(SOURCES_libvlc)
172 nodist_libvlccore_la_SOURCES = misc/revision.c
173 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
174 -DMODULE_STRING=\"main\" \
175 -DLOCALEDIR=\"$(localedir)\" \
176 -DSYSCONFDIR=\"$(sysconfdir)\" \
177 -DDATA_PATH=\"$(pkgdatadir)\" \
178 -DLIBDIR=\"$(libdir)\" \
179 -DPLUGIN_PATH=\"$(pkglibdir)\"
180 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
181 -export-symbols $(srcdir)/libvlccore.sym \
183 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
184 libvlccore_la_DEPENDENCIES = libvlccore.sym
186 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
187 libvlc_la_LIBADD = libvlccore.la
188 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
189 -DMODULE_STRING=\"control\"
190 libvlc_la_LDFLAGS = $(AM_LDFLAGS) \
191 -version-info 2:0:0 \
192 -export-symbols $(srcdir)/libvlc.sym
193 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
195 EXTRA_libvlccore_la_SOURCES = \
196 $(SOURCES_libvlc_beos) \
197 $(SOURCES_libvlc_darwin) \
198 $(SOURCES_libvlc_linux) \
199 $(SOURCES_libvlc_win32) \
200 $(SOURCES_libvlc_other) \
201 $(SOURCES_libvlc_dirent) \
202 $(SOURCES_libvlc_getopt) \
203 $(SOURCES_libvlc_sout) \
206 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
209 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
212 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
215 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
218 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
220 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
227 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
230 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
233 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
236 SOURCES_libvlc_beos = \
239 SOURCES_libvlc_darwin = \
240 misc/darwin_specific.c \
243 SOURCES_libvlc_linux = \
244 misc/linux_specific.c \
247 SOURCES_libvlc_win32 = \
248 misc/win32_specific.c \
252 SOURCES_libvlc_other = misc/not_specific.c
254 SOURCES_libvlc_dirent = \
258 SOURCES_libvlc_getopt = \
264 SOURCES_libvlc_common = \
269 interface/interface.h \
270 interface/interface.c \
271 interface/intf_eject.c \
272 interface/interaction.c \
273 playlist/playlist_internal.h \
278 playlist/loadsave.c \
282 playlist/services_discovery.c \
288 input/decoder_synchro.c \
293 input/input_internal.h \
294 input/vlm_internal.h \
299 video_output/video_output.c \
300 video_output/vout_pictures.c \
301 video_output/vout_pictures.h \
302 video_output/video_text.c \
303 video_output/video_widgets.c \
304 video_output/vout_subpictures.c \
305 video_output/vout_intf.c \
306 audio_output/aout_internal.h \
307 audio_output/common.c \
309 audio_output/filters.c \
310 audio_output/input.c \
311 audio_output/mixer.c \
312 audio_output/output.c \
313 audio_output/intf.c \
318 network/getaddrinfo.c \
345 config/configuration.h \
364 misc/filter_chain.c \
367 SOURCES_libvlc_sout = \
370 stream_output/stream_output.c \
371 stream_output/stream_output.h \
372 stream_output/announce.c \
373 stream_output/profiles.c \
374 stream_output/sap.c \
375 stream_output/sdp.c \
379 $(SOURCES_libvlc_common) \
380 $(OPT_SOURCES_libvlc_beos) \
381 $(OPT_SOURCES_libvlc_darwin) \
382 $(OPT_SOURCES_libvlc_win32) \
383 $(OPT_SOURCES_libvlc_dirent) \
384 $(OPT_SOURCES_libvlc_getopt) \
387 SOURCES_libvlc_control = \
388 control/libvlc_internal.h \
396 control/flat_media_list_view.c \
397 control/hierarchical_media_list_view.c \
398 control/hierarchical_node_media_list_view.c \
400 control/media_player.c \
401 control/media_list.c \
402 control/media_list_path.h \
403 control/media_list_player.c \
404 control/media_list_view.c \
405 control/media_library.c \
406 control/mediacontrol_internal.h \
407 control/mediacontrol_core.c \
408 control/mediacontrol_util.c \
409 control/mediacontrol_audio_video.c \
410 control/media_discoverer.c
412 ###############################################################################
414 ###############################################################################
418 echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
419 REVISION="$$(LANG=C git --git-dir=$(top_srcdir)/.git show-ref --head -s HEAD 2>/dev/null || echo exported)"; \
420 REVISION="$$(echo $$REVISION|cut -b -10)"; \
421 echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
425 ###############################################################################
427 ###############################################################################
429 EXTRA_PROGRAMS = vlc vlc-wrapper
433 bin_PROGRAMS += vlc-wrapper
437 EXTRA_vlc_SOURCES = vlc.c winvlc.c
441 vlc_SOURCES = winvlc.c
443 vlc_wrapper_SOURCES = network/rootwrap.c
445 vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
447 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
448 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
449 # vlc needs libvlccore for locale conversion
450 vlc_LDADD = $(DATA_win32_rc) libvlc.la libvlccore.la $(LTLIBINTL) \
451 `$(VLC_CONFIG) -libs vlc`
454 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
456 @case `$(VLC_CONFIG) --linkage vlc builtin` in \
457 c++) cmd="$(CXXLINK)" ;; \
458 objc) cmd="$(OBJCLINK)" ;; \
459 c|*) cmd="$(LINK)" ;; \
461 cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
466 DATA_win32_rc = $(noinst_DATA)
467 noinst_DATA = vlc_win32_rc.$(OBJEXT)
469 vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
470 $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(top_srcdir)/share -i $< -o $@
474 ###############################################################################
475 # Unit/regression test
476 ###############################################################################
486 dist_check_SCRIPTS = check_symbols check_headers
487 TESTS = $(check_PROGRAMS) check_symbols
489 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
491 test_block_SOURCES = test/block.c
492 test_block_LDADD = libvlccore.la
493 test_block_CFLAGS = $(CFLAGS_tests)
495 test_dictionary_SOURCES = test/dictionary.c
496 test_dictionary_LDADD = libvlccore.la
497 test_dictionary_CFLAGS = $(CFLAGS_tests)
499 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
500 test_i18n_atof_LDADD = libvlccore.la
501 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
503 test_url_SOURCES = test/url.c
504 test_url_LDADD = libvlccore.la
505 test_url_CFLAGS = $(CFLAGS_tests)
507 test_utf8_SOURCES = test/utf8.c
508 test_utf8_LDADD = libvlccore.la
509 test_utf8_CFLAGS = $(CFLAGS_tests)
511 test_headers_SOURCES = test/headers.c
512 test_headers_CFLAGS = $(CFLAGS_tests)
515 for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
517 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
518 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
520 echo "Header $$h not included in test/headers.c!"; \
524 $(srcdir)/check_headers $(pkginclude_HEADERS)
525 $(srcdir)/check_headers $(pluginsinclude_HEADERS)
528 @echo "Generated source cannot be phony. Go away." >&2