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 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 = \
39 ../include/vlc_arrays.h \
40 ../include/vlc_common.h \
41 ../include/vlc_config.h \
42 ../include/vlc_configuration.h \
43 ../include/vlc_main.h \
44 ../include/vlc_messages.h \
45 ../include/vlc_modules.h \
46 ../include/vlc_mtime.h \
47 ../include/vlc_objects.h \
48 ../include/vlc_plugin.h \
49 ../include/vlc_threads.h \
50 ../include/vlc_variables.h \
54 ../include/iso_lang.h \
56 ../include/vlc_access.h \
57 ../include/vlc_acl.h \
58 ../include/vlc_aout.h \
59 ../include/vlc_bits.h \
60 ../include/vlc_block.h \
61 ../include/vlc_block_helper.h \
62 ../include/vlc_charset.h \
63 ../include/vlc_codec.h \
64 ../include/vlc_codec_synchro.h \
65 ../include/vlc_codecs.h \
66 ../include/vlc_config_cat.h \
67 ../include/vlc_demux.h \
68 ../include/vlc_devices.h \
69 ../include/vlc_epg.h \
71 ../include/vlc_es_out.h \
72 ../include/vlc_events.h \
73 ../include/vlc_filter.h \
74 ../include/vlc_fixups.h \
75 ../include/vlc_gcrypt.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_rand.h \
89 ../include/vlc_services_discovery.h \
90 ../include/vlc_sout.h \
91 ../include/vlc_stream.h \
92 ../include/vlc_streaming.h \
93 ../include/vlc_strings.h \
94 ../include/vlc_tls.h \
95 ../include/vlc_update.h \
96 ../include/vlc_url.h \
97 ../include/vlc_vlm.h \
98 ../include/vlc_vod.h \
99 ../include/vlc_vout.h \
100 ../include/vlc_xml.h \
103 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
105 cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
107 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
108 test -n "$${plugins}" && \
109 for p in $${plugins}; do \
110 echo "int vlc_entry__$$p (module_t *);" ; \
113 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
114 echo " do \\" >> "$@.tmp"
115 echo " { \\" >> "$@.tmp"
117 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
118 test -n "$${plugins}" && \
119 for p in $${plugins}; do \
120 echo " ALLOCATE_BUILTIN($$p); \\" ; \
123 echo ' } while( 0 );' >> "$@.tmp"
124 mv -f -- "$@.tmp" "$@"
126 modules/modules.c: modules/builtin.h
128 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
130 mkdir -p -- ../include
131 echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
132 echo "static const char psz_license[] =" >> "$@.tmp"
133 cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
135 echo "static const char psz_thanks[] =" >> "$@.tmp"
136 grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
138 echo "static const char psz_authors[] =" >> "$@.tmp"
139 grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
141 mv -f -- "$@.tmp" "$@"
143 ###############################################################################
144 # pkg-config integration
145 ###############################################################################
147 pkgconfigdir = $(libdir)/pkgconfig
148 pkgconfig_DATA = vlc-control.pc vlc-plugin.pc
149 CLEANFILES += $(pkgconfig_DATA)
151 .pc.in.pc: $(top_builddir)/config.status
152 cd "$(top_builddir)" && \
153 $(SHELL) ./config.status --file="src/$@"
155 ###############################################################################
157 ###############################################################################
160 $(top_builddir)/compile
162 lib_LTLIBRARIES = libvlccore.la libvlc.la
164 AM_LDFLAGS = -no-undefined -no-install
166 AM_LDFLAGS += -avoid-version
169 libvlccore_la_SOURCES = $(SOURCES_libvlc)
170 nodist_libvlccore_la_SOURCES = misc/revision.c
171 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
172 -DMODULE_STRING=\"main\" \
173 -DLOCALEDIR=\"$(localedir)\" \
174 -DSYSCONFDIR=\"$(sysconfdir)\" \
175 -DDATA_PATH=\"$(pkgdatadir)\" \
176 -DLIBDIR=\"$(libdir)\" \
177 -DPLUGIN_PATH=\"$(pkglibdir)\"
178 libvlccore_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
179 libvlccore_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
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-regex '^_?(libvlc|mediacontrol)_.*'
194 EXTRA_libvlccore_la_SOURCES = \
195 $(SOURCES_libvlc_beos) \
196 $(SOURCES_libvlc_darwin) \
197 $(SOURCES_libvlc_linux) \
198 $(SOURCES_libvlc_win32) \
199 $(SOURCES_libvlc_other) \
200 $(SOURCES_libvlc_dirent) \
201 $(SOURCES_libvlc_getopt) \
202 $(SOURCES_libvlc_sout) \
205 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
208 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
211 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
214 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
217 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
219 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
226 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
229 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
232 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
235 SOURCES_libvlc_beos = \
236 misc/beos_specific.cpp \
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 \
365 SOURCES_libvlc_sout = \
368 stream_output/stream_output.c \
369 stream_output/stream_output.h \
370 stream_output/announce.c \
371 stream_output/profiles.c \
372 stream_output/sap.c \
373 stream_output/sdp.c \
377 $(SOURCES_libvlc_common) \
378 $(OPT_SOURCES_libvlc_beos) \
379 $(OPT_SOURCES_libvlc_darwin) \
380 $(OPT_SOURCES_libvlc_win32) \
381 $(OPT_SOURCES_libvlc_dirent) \
382 $(OPT_SOURCES_libvlc_getopt) \
385 SOURCES_libvlc_control = \
386 control/libvlc_internal.h \
394 control/flat_media_list_view.c \
395 control/hierarchical_media_list_view.c \
396 control/hierarchical_node_media_list_view.c \
398 control/media_player.c \
399 control/media_list.c \
400 control/media_list_path.h \
401 control/media_list_player.c \
402 control/media_list_view.c \
403 control/media_library.c \
404 control/mediacontrol_internal.h \
405 control/mediacontrol_core.c \
406 control/mediacontrol_util.c \
407 control/mediacontrol_audio_video.c \
408 control/media_discoverer.c
410 ###############################################################################
412 ###############################################################################
416 echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
417 REVISION="$$(LANG=C git --git-dir=$(top_srcdir)/.git show-ref -s HEAD 2>/dev/null || echo exported)"; \
418 REVISION="$$(echo $$REVISION|cut -b -10)"; \
419 echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
423 ###############################################################################
425 ###############################################################################
434 vlc_SOURCES = winvlc.c
437 vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
439 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
440 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
441 # vlc needs libvlccore for locale conversion
442 vlc_LDADD = $(DATA_win32_rc) libvlc.la libvlccore.la $(LTLIBINTL) \
443 `$(VLC_CONFIG) -libs vlc`
446 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
448 @case `$(VLC_CONFIG) --linkage vlc builtin` in \
449 c++) cmd="$(CXXLINK)" ;; \
450 objc) cmd="$(OBJCLINK)" ;; \
451 c|*) cmd="$(LINK)" ;; \
453 cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
458 DATA_win32_rc = $(noinst_DATA)
459 noinst_DATA = vlc_win32_rc.$(OBJEXT)
461 vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
462 $(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 $@
466 ###############################################################################
467 # Unit/regression test
468 ###############################################################################
478 dist_check_SCRIPTS = check_symbols check_headers
479 TESTS = $(check_PROGRAMS) check_symbols
481 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
483 test_block_SOURCES = test/block.c
484 test_block_LDADD = libvlccore.la
485 test_block_CFLAGS = $(CFLAGS_tests)
487 test_dictionary_SOURCES = test/dictionary.c
488 test_dictionary_LDADD = libvlccore.la
489 test_dictionary_CFLAGS = $(CFLAGS_tests)
491 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
492 test_i18n_atof_LDADD = libvlccore.la
493 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
495 test_url_SOURCES = test/url.c
496 test_url_LDADD = libvlccore.la
497 test_url_CFLAGS = $(CFLAGS_tests)
499 test_utf8_SOURCES = test/utf8.c
500 test_utf8_LDADD = libvlccore.la
501 test_utf8_CFLAGS = $(CFLAGS_tests)
503 test_headers_SOURCES = test/headers.c
504 test_headers_CFLAGS = $(CFLAGS_tests)
507 for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
509 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
510 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
512 echo "Header $$h not included in test/headers.c!"; \
516 $(srcdir)/check_headers $(pkginclude_HEADERS)
517 # Hmm, this test should not fail:
518 -$(srcdir)/check_headers $(pluginsinclude_HEADERS)
521 @echo "Generated source cannot be phony. Go away." >&2