1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
5 AUTOMAKE_OPTIONS = subdir-objects
8 EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym vlc-control.pc.in
10 BUILT_SOURCES = modules/builtin.h misc/revision.c ../include/vlc_about.h
11 CLEANFILES = $(BUILT_SOURCES)
13 ###############################################################################
15 ###############################################################################
17 pkgincludedir = $(includedir)/vlc
19 dist_pkginclude_HEADERS = \
20 ../include/vlc/vlc.h \
21 ../include/vlc/libvlc.h \
22 ../include/vlc/libvlc_structures.h \
23 ../include/vlc/mediacontrol.h \
24 ../include/vlc/mediacontrol_structures.h \
27 noinst_HEADERS = $(HEADERS_include)
30 ../include/iso_lang.h \
33 ../include/vlc_access.h \
34 ../include/vlc_acl.h \
35 ../include/vlc_aout.h \
36 ../include/vlc_arrays.h \
37 ../include/vlc_bits.h \
38 ../include/vlc_block.h \
39 ../include/vlc_block_helper.h \
40 ../include/vlc_charset.h \
41 ../include/vlc_codec.h \
42 ../include/vlc_codec_synchro.h \
43 ../include/vlc_codecs.h \
44 ../include/vlc_common.h \
45 ../include/vlc_config.h \
46 ../include/vlc_config_cat.h \
47 ../include/vlc_configuration.h \
48 ../include/vlc_demux.h \
49 ../include/vlc_devices.h \
50 ../include/vlc_epg.h \
52 ../include/vlc_es_out.h \
53 ../include/vlc_events.h \
54 ../include/vlc_filter.h \
55 ../include/vlc_fixups.h \
56 ../include/vlc_httpd.h \
57 ../include/vlc_image.h \
58 ../include/vlc_input.h \
59 ../include/vlc_interface.h \
60 ../include/vlc_intf_strings.h \
61 ../include/vlc_keys.h \
62 ../include/vlc_md5.h \
63 ../include/vlc_messages.h \
64 ../include/vlc_meta.h \
65 ../include/vlc_modules.h \
66 ../include/vlc_modules_macros.h \
67 ../include/vlc_mtime.h \
68 ../include/vlc_network.h \
69 ../include/vlc_objects.h \
70 ../include/vlc_osd.h \
71 ../include/vlc_pgpkey.h \
72 ../include/vlc_playlist.h \
73 ../include/vlc_plugin.h \
74 ../include/vlc_rand.h \
75 ../include/vlc_services_discovery.h \
76 ../include/vlc_sout.h \
77 ../include/vlc_stream.h \
78 ../include/vlc_streaming.h \
79 ../include/vlc_strings.h \
80 ../include/vlc_threads.h \
81 ../include/vlc_threads_funcs.h \
82 ../include/vlc_tls.h \
83 ../include/vlc_update.h \
84 ../include/vlc_url.h \
85 ../include/vlc_variables.h \
86 ../include/vlc_vlm.h \
87 ../include/vlc_vod.h \
88 ../include/vlc_vout.h \
89 ../include/vlc_xml.h \
92 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
94 cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
96 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
97 test -n "$${plugins}" && \
98 for p in $${plugins}; do \
99 echo "int vlc_entry__$$p (module_t *);" ; \
102 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
103 echo " do \\" >> "$@.tmp"
104 echo " { \\" >> "$@.tmp"
106 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
107 test -n "$${plugins}" && \
108 for p in $${plugins}; do \
109 echo " ALLOCATE_BUILTIN($$p); \\" ; \
112 echo ' } while( 0 );' >> "$@.tmp"
113 mv -f -- "$@.tmp" "$@"
115 modules/modules.c: modules/builtin.h
117 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
119 mkdir -p -- ../include
120 echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
121 echo "static const char psz_license[] =" >> "$@.tmp"
122 cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
124 echo "static const char psz_thanks[] =" >> "$@.tmp"
125 grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
127 echo "static const char psz_authors[] =" >> "$@.tmp"
128 grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
130 mv -f -- "$@.tmp" "$@"
132 ###############################################################################
133 # pkg-config integration
134 ###############################################################################
136 pkgconfigdir = $(libdir)/pkgconfig
137 pkgconfig_DATA = vlc-control.pc
138 CLEANFILES += $(pkgconfig_DATA)
140 vlc-control.pc: vlc-control.pc.in $(top_builddir)/config.status
141 cd $(top_builddir) && \
142 $(SHELL) ./config.status --file=src/vlc-control.pc
144 ###############################################################################
146 ###############################################################################
149 $(top_builddir)/compile
151 lib_LTLIBRARIES = libvlc.la libvlc-control.la
153 AM_LDFLAGS = -no-undefined -no-install
155 AM_LDFLAGS += -avoid-version
158 libvlc_la_SOURCES = $(SOURCES_libvlc)
159 nodist_libvlc_la_SOURCES = misc/revision.c
160 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
161 -DDATA_PATH=\"$(pkgdatadir)\"
162 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
163 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
164 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
166 if HAVE_COMPILER_EXPORT
167 libvlc_la_LDFLAGS += -export-dynamic
169 libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym
171 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
173 libvlc_la_DEPENDENCIES = libvlc.sym
175 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
176 libvlc_control_la_LIBADD = libvlc.la
177 libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
178 libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
179 if HAVE_COMPILER_EXPORT
180 libvlc_control_la_LDFLAGS += -export-dynamic
182 libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
185 EXTRA_libvlc_la_SOURCES = \
186 $(SOURCES_libvlc_beos) \
187 $(SOURCES_libvlc_darwin) \
188 $(SOURCES_libvlc_win32) \
189 $(SOURCES_libvlc_dirent) \
190 $(SOURCES_libvlc_getopt) \
193 libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
196 libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
199 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
202 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
205 libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
208 libvlc_la_SOURCES += $(SOURCES_libvlc_getopt)
211 SOURCES_libvlc_beos = \
212 misc/beos_specific.cpp \
215 SOURCES_libvlc_darwin = \
216 misc/darwin_specific.c \
219 SOURCES_libvlc_win32 = \
220 misc/win32_specific.c \
223 SOURCES_libvlc_dirent = \
227 SOURCES_libvlc_getopt = \
233 SOURCES_libvlc_common = \
238 interface/interface.h \
239 interface/interface.c \
240 interface/intf_eject.c \
241 interface/interaction.c \
242 playlist/playlist_internal.h \
247 playlist/loadsave.c \
251 playlist/services_discovery.c \
257 input/decoder_synchro.c \
262 input/input_internal.h \
263 input/vlm_internal.h \
268 video_output/video_output.c \
269 video_output/vout_pictures.c \
270 video_output/vout_pictures.h \
271 video_output/video_text.c \
272 video_output/video_widgets.c \
273 video_output/vout_subpictures.c \
274 video_output/vout_intf.c \
275 audio_output/aout_internal.h \
276 audio_output/common.c \
278 audio_output/filters.c \
279 audio_output/input.c \
280 audio_output/mixer.c \
281 audio_output/output.c \
282 audio_output/intf.c \
283 stream_output/stream_output.c \
284 stream_output/stream_output.h \
285 stream_output/announce.c \
286 stream_output/profiles.c \
287 stream_output/sap.c \
288 stream_output/sdp.c \
293 network/getaddrinfo.c \
320 config/configuration.h \
341 $(SOURCES_libvlc_common) \
342 $(OPT_SOURCES_libvlc_beos) \
343 $(OPT_SOURCES_libvlc_darwin) \
344 $(OPT_SOURCES_libvlc_win32) \
345 $(OPT_SOURCES_libvlc_dirent) \
346 $(OPT_SOURCES_libvlc_getopt) \
349 SOURCES_libvlc_control = \
350 control/libvlc_internal.h \
357 control/dynamic_media_list.c \
359 control/flat_media_list_view.c \
360 control/hierarchical_media_list_view.c \
361 control/hierarchical_node_media_list_view.c \
362 control/media_descriptor.c \
363 control/media_instance.c \
364 control/media_list.c \
365 control/media_list_path.h \
366 control/media_list_player.c \
367 control/media_list_view.c \
368 control/media_library.c \
369 control/mediacontrol_internal.h \
370 control/mediacontrol_core.c \
371 control/mediacontrol_util.c \
372 control/mediacontrol_audio_video.c \
373 control/media_discoverer.c \
376 ###############################################################################
378 ###############################################################################
382 echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
383 REVISION="$$((LANG=C git --git-dir=$(top_srcdir)/.git show-ref -s HEAD 2>/dev/null || echo exported) | cut -b -10)"; \
384 echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
388 ###############################################################################
390 ###############################################################################
395 vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
397 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
398 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
399 vlc_LDADD = $(DATA_win32_rc) libvlc.la $(LTLIBINTL) `$(VLC_CONFIG) -libs vlc`
401 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
403 @case `$(VLC_CONFIG) --linkage vlc builtin` in \
404 c++) cmd="$(CXXLINK)" ;; \
405 objc) cmd="$(OBJCLINK)" ;; \
406 c|*) cmd="$(LINK)" ;; \
408 cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
413 DATA_win32_rc = $(noinst_DATA)
414 noinst_DATA = vlc_win32_rc.$(OBJEXT)
416 vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
417 $(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 $@
420 ###############################################################################
421 # Unit/regression test
422 ###############################################################################
432 dist_check_SCRIPTS = check_symbols
433 TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
435 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
437 test_dictionary_SOURCES = test/dictionary.c
438 test_dictionary_LDADD = libvlc.la
439 test_dictionary_CFLAGS = $(CFLAGS_tests)
441 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
442 test_i18n_atof_LDADD = libvlc.la
443 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
445 test_url_SOURCES = test/url.c
446 test_url_LDADD = libvlc.la
447 test_url_CFLAGS = $(CFLAGS_tests)
449 test_utf8_SOURCES = test/utf8.c
450 test_utf8_LDADD = libvlc.la
451 test_utf8_CFLAGS = $(CFLAGS_tests)
453 test_headers_SOURCES = test/headers.c
454 test_headers_CFLAGS = $(CFLAGS_tests)
456 test_control_SOURCES = control/testapi.c
457 test_control_LDADD = libvlc-control.la
458 test_control_CFLAGS = $(CFLAGS_tests)
461 for h in `echo $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
463 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
464 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
466 echo "Header $$h not included in test/headers.c!"; \
472 @echo "Generated source cannot be phony. Go away." >&2