1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
5 AUTOMAKE_OPTIONS = subdir-objects
8 EXTRA_DIST = extras/COPYING modules/builtin.h.in \
13 BUILT_SOURCES = modules/builtin.h misc/revision.c ../include/vlc_about.h
14 CLEANFILES = $(BUILT_SOURCES)
18 ###############################################################################
20 ###############################################################################
22 pkgincludedir = $(includedir)/vlc
23 pluginsincludedir = $(pkgincludedir)/plugins
25 dist_pkginclude_HEADERS = \
26 ../include/vlc/vlc.h \
27 ../include/vlc/common.h \
28 ../include/vlc/deprecated.h \
29 ../include/vlc/libvlc.h \
30 ../include/vlc/libvlc_structures.h \
31 ../include/vlc/libvlc_media_list.h \
32 ../include/vlc/libvlc_events.h \
33 ../include/vlc/libvlc_vlm.h \
34 ../include/vlc/mediacontrol.h \
35 ../include/vlc/mediacontrol_structures.h \
38 pluginsinclude_HEADERS = \
40 ../include/vlc_arrays.h \
41 ../include/vlc_common.h \
42 ../include/vlc_config.h \
43 ../include/vlc_configuration.h \
44 ../include/vlc_messages.h \
45 ../include/vlc_modules.h \
46 ../include/vlc_modules_macros.h \
47 ../include/vlc_mtime.h \
48 ../include/vlc_objects.h \
49 ../include/vlc_threads.h \
50 ../include/vlc_threads_funcs.h
51 ../include/vlc_variables.h \
55 ../include/iso_lang.h \
57 ../include/vlc_access.h \
58 ../include/vlc_acl.h \
59 ../include/vlc_aout.h \
60 ../include/vlc_bits.h \
61 ../include/vlc_block.h \
62 ../include/vlc_block_helper.h \
63 ../include/vlc_charset.h \
64 ../include/vlc_codec.h \
65 ../include/vlc_codec_synchro.h \
66 ../include/vlc_codecs.h \
67 ../include/vlc_config_cat.h \
68 ../include/vlc_demux.h \
69 ../include/vlc_devices.h \
70 ../include/vlc_epg.h \
72 ../include/vlc_es_out.h \
73 ../include/vlc_events.h \
74 ../include/vlc_filter.h \
75 ../include/vlc_fixups.h \
76 ../include/vlc_httpd.h \
77 ../include/vlc_image.h \
78 ../include/vlc_input.h \
79 ../include/vlc_interface.h \
80 ../include/vlc_intf_strings.h \
81 ../include/vlc_keys.h \
82 ../include/vlc_md5.h \
83 ../include/vlc_meta.h \
84 ../include/vlc_network.h \
85 ../include/vlc_osd.h \
86 ../include/vlc_pgpkey.h \
87 ../include/vlc_playlist.h \
88 ../include/vlc_plugin.h \
89 ../include/vlc_rand.h \
90 ../include/vlc_services_discovery.h \
91 ../include/vlc_sout.h \
92 ../include/vlc_stream.h \
93 ../include/vlc_streaming.h \
94 ../include/vlc_strings.h \
95 ../include/vlc_tls.h \
96 ../include/vlc_update.h \
97 ../include/vlc_url.h \
98 ../include/vlc_vlm.h \
99 ../include/vlc_vod.h \
100 ../include/vlc_vout.h \
101 ../include/vlc_xml.h \
104 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
106 cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
108 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
109 test -n "$${plugins}" && \
110 for p in $${plugins}; do \
111 echo "int vlc_entry__$$p (module_t *);" ; \
114 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
115 echo " do \\" >> "$@.tmp"
116 echo " { \\" >> "$@.tmp"
118 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
119 test -n "$${plugins}" && \
120 for p in $${plugins}; do \
121 echo " ALLOCATE_BUILTIN($$p); \\" ; \
124 echo ' } while( 0 );' >> "$@.tmp"
125 mv -f -- "$@.tmp" "$@"
127 modules/modules.c: modules/builtin.h
129 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
131 mkdir -p -- ../include
132 echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
133 echo "static const char psz_license[] =" >> "$@.tmp"
134 cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
136 echo "static const char psz_thanks[] =" >> "$@.tmp"
137 grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
139 echo "static const char psz_authors[] =" >> "$@.tmp"
140 grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
142 mv -f -- "$@.tmp" "$@"
144 ###############################################################################
145 # pkg-config integration
146 ###############################################################################
148 pkgconfigdir = $(libdir)/pkgconfig
149 pkgconfig_DATA = vlc-control.pc vlc-plugin.pc
150 CLEANFILES += $(pkgconfig_DATA)
152 .pc.in.pc: $(top_builddir)/config.status
153 cd "$(top_builddir)" && \
154 $(SHELL) ./config.status --file="src/$@"
156 ###############################################################################
158 ###############################################################################
161 $(top_builddir)/compile
163 lib_LTLIBRARIES = libvlc.la libvlc-control.la
165 AM_LDFLAGS = -no-undefined -no-install
167 AM_LDFLAGS += -avoid-version
170 libvlc_la_SOURCES = $(SOURCES_libvlc)
171 nodist_libvlc_la_SOURCES = misc/revision.c
172 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
173 -DLOCALEDIR=\"$(localedir)\" \
174 -DDATA_PATH=\"$(pkgdatadir)\" \
175 -DPLUGIN_PATH=\"$(pkglibdir)\"
176 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
177 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
178 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
180 if HAVE_COMPILER_EXPORT
181 libvlc_la_LDFLAGS += -export-dynamic
183 libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym
185 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
187 libvlc_la_DEPENDENCIES = libvlc.sym
189 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
190 libvlc_control_la_LIBADD = libvlc.la
191 libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
192 libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
193 if HAVE_COMPILER_EXPORT
194 libvlc_control_la_LDFLAGS += -export-dynamic
196 libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
199 EXTRA_libvlc_la_SOURCES = \
200 $(SOURCES_libvlc_beos) \
201 $(SOURCES_libvlc_darwin) \
202 $(SOURCES_libvlc_win32) \
203 $(SOURCES_libvlc_dirent) \
204 $(SOURCES_libvlc_getopt) \
205 $(SOURCES_libvlc_sout) \
208 libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
211 libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
214 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
217 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
220 libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
223 libvlc_la_SOURCES += $(SOURCES_libvlc_getopt)
226 libvlc_la_SOURCES += $(SOURCES_libvlc_sout)
229 SOURCES_libvlc_beos = \
230 misc/beos_specific.cpp \
233 SOURCES_libvlc_darwin = \
234 misc/darwin_specific.c \
237 SOURCES_libvlc_win32 = \
238 misc/win32_specific.c \
241 SOURCES_libvlc_dirent = \
245 SOURCES_libvlc_getopt = \
251 SOURCES_libvlc_common = \
256 interface/interface.h \
257 interface/interface.c \
258 interface/intf_eject.c \
259 interface/interaction.c \
260 playlist/playlist_internal.h \
265 playlist/loadsave.c \
269 playlist/services_discovery.c \
275 input/decoder_synchro.c \
280 input/input_internal.h \
281 input/vlm_internal.h \
286 video_output/video_output.c \
287 video_output/vout_pictures.c \
288 video_output/vout_pictures.h \
289 video_output/video_text.c \
290 video_output/video_widgets.c \
291 video_output/vout_subpictures.c \
292 video_output/vout_intf.c \
293 audio_output/aout_internal.h \
294 audio_output/common.c \
296 audio_output/filters.c \
297 audio_output/input.c \
298 audio_output/mixer.c \
299 audio_output/output.c \
300 audio_output/intf.c \
305 network/getaddrinfo.c \
333 config/configuration.h \
352 SOURCES_libvlc_sout = \
354 stream_output/stream_output.c \
355 stream_output/stream_output.h \
356 stream_output/announce.c \
357 stream_output/profiles.c \
358 stream_output/sap.c \
359 stream_output/sdp.c \
363 $(SOURCES_libvlc_common) \
364 $(OPT_SOURCES_libvlc_beos) \
365 $(OPT_SOURCES_libvlc_darwin) \
366 $(OPT_SOURCES_libvlc_win32) \
367 $(OPT_SOURCES_libvlc_dirent) \
368 $(OPT_SOURCES_libvlc_getopt) \
371 SOURCES_libvlc_control = \
372 control/libvlc_internal.h \
380 control/flat_media_list_view.c \
381 control/hierarchical_media_list_view.c \
382 control/hierarchical_node_media_list_view.c \
384 control/media_player.c \
385 control/media_list.c \
386 control/media_list_path.h \
387 control/media_list_player.c \
388 control/media_list_view.c \
389 control/media_library.c \
390 control/mediacontrol_internal.h \
391 control/mediacontrol_core.c \
392 control/mediacontrol_util.c \
393 control/mediacontrol_audio_video.c \
394 control/media_discoverer.c
396 ###############################################################################
398 ###############################################################################
402 echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
403 REVISION="$$(LANG=C git --git-dir=$(top_srcdir)/.git show-ref -s HEAD 2>/dev/null || echo exported)"; \
404 REVISION="$$(echo $$REVISION|cut -b -10)"; \
405 echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
409 ###############################################################################
411 ###############################################################################
418 vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
420 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
421 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
422 vlc_LDADD = $(DATA_win32_rc) libvlc.la $(LTLIBINTL) `$(VLC_CONFIG) -libs vlc`
425 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
427 @case `$(VLC_CONFIG) --linkage vlc builtin` in \
428 c++) cmd="$(CXXLINK)" ;; \
429 objc) cmd="$(OBJCLINK)" ;; \
430 c|*) cmd="$(LINK)" ;; \
432 cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
437 DATA_win32_rc = $(noinst_DATA)
438 noinst_DATA = vlc_win32_rc.$(OBJEXT)
440 vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
441 $(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 $@
445 ###############################################################################
446 # Unit/regression test
447 ###############################################################################
456 dist_check_SCRIPTS = check_symbols check_headers
457 TESTS = $(check_PROGRAMS) check_symbols
459 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
461 test_dictionary_SOURCES = test/dictionary.c
462 test_dictionary_LDADD = libvlc.la
463 test_dictionary_CFLAGS = $(CFLAGS_tests)
465 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
466 test_i18n_atof_LDADD = libvlc.la
467 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
469 test_url_SOURCES = test/url.c
470 test_url_LDADD = libvlc.la
471 test_url_CFLAGS = $(CFLAGS_tests)
473 test_utf8_SOURCES = test/utf8.c
474 test_utf8_LDADD = libvlc.la
475 test_utf8_CFLAGS = $(CFLAGS_tests)
477 test_headers_SOURCES = test/headers.c
478 test_headers_CFLAGS = $(CFLAGS_tests)
481 for h in `echo $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
483 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
484 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
486 echo "Header $$h not included in test/headers.c!"; \
490 $(srcdir)/check_headers $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS)
491 # Hmm, this test should not fail:
492 -$(srcdir)/check_headers $(pluginsinclude_HEADERS)
495 @echo "Generated source cannot be phony. Go away." >&2