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
24 dist_pkginclude_HEADERS = \
25 ../include/vlc/vlc.h \
26 ../include/vlc/common.h \
27 ../include/vlc/deprecated.h \
28 ../include/vlc/libvlc.h \
29 ../include/vlc/libvlc_structures.h \
30 ../include/vlc/libvlc_media_list.h \
31 ../include/vlc/libvlc_events.h \
32 ../include/vlc/libvlc_vlm.h \
33 ../include/vlc/mediacontrol.h \
34 ../include/vlc/mediacontrol_structures.h \
37 noinst_HEADERS = $(HEADERS_include)
40 ../include/iso_lang.h \
43 ../include/vlc_access.h \
44 ../include/vlc_acl.h \
45 ../include/vlc_aout.h \
46 ../include/vlc_arrays.h \
47 ../include/vlc_bits.h \
48 ../include/vlc_block.h \
49 ../include/vlc_block_helper.h \
50 ../include/vlc_charset.h \
51 ../include/vlc_codec.h \
52 ../include/vlc_codec_synchro.h \
53 ../include/vlc_codecs.h \
54 ../include/vlc_common.h \
55 ../include/vlc_config.h \
56 ../include/vlc_config_cat.h \
57 ../include/vlc_configuration.h \
58 ../include/vlc_demux.h \
59 ../include/vlc_devices.h \
60 ../include/vlc_epg.h \
62 ../include/vlc_es_out.h \
63 ../include/vlc_events.h \
64 ../include/vlc_filter.h \
65 ../include/vlc_fixups.h \
66 ../include/vlc_httpd.h \
67 ../include/vlc_image.h \
68 ../include/vlc_input.h \
69 ../include/vlc_interface.h \
70 ../include/vlc_intf_strings.h \
71 ../include/vlc_keys.h \
72 ../include/vlc_md5.h \
73 ../include/vlc_messages.h \
74 ../include/vlc_meta.h \
75 ../include/vlc_modules.h \
76 ../include/vlc_modules_macros.h \
77 ../include/vlc_mtime.h \
78 ../include/vlc_network.h \
79 ../include/vlc_objects.h \
80 ../include/vlc_osd.h \
81 ../include/vlc_pgpkey.h \
82 ../include/vlc_playlist.h \
83 ../include/vlc_plugin.h \
84 ../include/vlc_rand.h \
85 ../include/vlc_services_discovery.h \
86 ../include/vlc_sout.h \
87 ../include/vlc_stream.h \
88 ../include/vlc_streaming.h \
89 ../include/vlc_strings.h \
90 ../include/vlc_threads.h \
91 ../include/vlc_threads_funcs.h \
92 ../include/vlc_tls.h \
93 ../include/vlc_update.h \
94 ../include/vlc_url.h \
95 ../include/vlc_variables.h \
96 ../include/vlc_vlm.h \
97 ../include/vlc_vod.h \
98 ../include/vlc_vout.h \
99 ../include/vlc_xml.h \
102 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
104 cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
106 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
107 test -n "$${plugins}" && \
108 for p in $${plugins}; do \
109 echo "int vlc_entry__$$p (module_t *);" ; \
112 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
113 echo " do \\" >> "$@.tmp"
114 echo " { \\" >> "$@.tmp"
116 plugins="$$($(VLC_CONFIG) --list plugin)" ; \
117 test -n "$${plugins}" && \
118 for p in $${plugins}; do \
119 echo " ALLOCATE_BUILTIN($$p); \\" ; \
122 echo ' } while( 0 );' >> "$@.tmp"
123 mv -f -- "$@.tmp" "$@"
125 modules/modules.c: modules/builtin.h
127 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
129 mkdir -p -- ../include
130 echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
131 echo "static const char psz_license[] =" >> "$@.tmp"
132 cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
134 echo "static const char psz_thanks[] =" >> "$@.tmp"
135 grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
137 echo "static const char psz_authors[] =" >> "$@.tmp"
138 grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
140 mv -f -- "$@.tmp" "$@"
142 ###############################################################################
143 # pkg-config integration
144 ###############################################################################
146 pkgconfigdir = $(libdir)/pkgconfig
147 pkgconfig_DATA = vlc-control.pc vlc-plugin.pc
148 CLEANFILES += $(pkgconfig_DATA)
150 .pc.in.pc: $(top_builddir)/config.status
151 cd "$(top_builddir)" && \
152 $(SHELL) ./config.status --file="src/$@"
154 ###############################################################################
156 ###############################################################################
159 $(top_builddir)/compile
161 lib_LTLIBRARIES = libvlc.la libvlc-control.la
163 AM_LDFLAGS = -no-undefined -no-install
165 AM_LDFLAGS += -avoid-version
168 libvlc_la_SOURCES = $(SOURCES_libvlc)
169 nodist_libvlc_la_SOURCES = misc/revision.c
170 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
171 -DLOCALEDIR=\"$(localedir)\" \
172 -DDATA_PATH=\"$(pkgdatadir)\" \
173 -DPLUGIN_PATH=\"$(pkglibdir)\"
174 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
175 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
176 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
178 if HAVE_COMPILER_EXPORT
179 libvlc_la_LDFLAGS += -export-dynamic
181 libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym
183 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
185 libvlc_la_DEPENDENCIES = libvlc.sym
187 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
188 libvlc_control_la_LIBADD = libvlc.la
189 libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
190 libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
191 if HAVE_COMPILER_EXPORT
192 libvlc_control_la_LDFLAGS += -export-dynamic
194 libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
197 EXTRA_libvlc_la_SOURCES = \
198 $(SOURCES_libvlc_beos) \
199 $(SOURCES_libvlc_darwin) \
200 $(SOURCES_libvlc_win32) \
201 $(SOURCES_libvlc_dirent) \
202 $(SOURCES_libvlc_getopt) \
205 libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
208 libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
211 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
214 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
217 libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
220 libvlc_la_SOURCES += $(SOURCES_libvlc_getopt)
223 SOURCES_libvlc_beos = \
224 misc/beos_specific.cpp \
227 SOURCES_libvlc_darwin = \
228 misc/darwin_specific.c \
231 SOURCES_libvlc_win32 = \
232 misc/win32_specific.c \
235 SOURCES_libvlc_dirent = \
239 SOURCES_libvlc_getopt = \
245 SOURCES_libvlc_common = \
250 interface/interface.h \
251 interface/interface.c \
252 interface/intf_eject.c \
253 interface/interaction.c \
254 playlist/playlist_internal.h \
259 playlist/loadsave.c \
263 playlist/services_discovery.c \
269 input/decoder_synchro.c \
274 input/input_internal.h \
275 input/vlm_internal.h \
280 video_output/video_output.c \
281 video_output/vout_pictures.c \
282 video_output/vout_pictures.h \
283 video_output/video_text.c \
284 video_output/video_widgets.c \
285 video_output/vout_subpictures.c \
286 video_output/vout_intf.c \
287 audio_output/aout_internal.h \
288 audio_output/common.c \
290 audio_output/filters.c \
291 audio_output/input.c \
292 audio_output/mixer.c \
293 audio_output/output.c \
294 audio_output/intf.c \
295 stream_output/stream_output.c \
296 stream_output/stream_output.h \
297 stream_output/announce.c \
298 stream_output/profiles.c \
299 stream_output/sap.c \
300 stream_output/sdp.c \
305 network/getaddrinfo.c \
333 config/configuration.h \
354 $(SOURCES_libvlc_common) \
355 $(OPT_SOURCES_libvlc_beos) \
356 $(OPT_SOURCES_libvlc_darwin) \
357 $(OPT_SOURCES_libvlc_win32) \
358 $(OPT_SOURCES_libvlc_dirent) \
359 $(OPT_SOURCES_libvlc_getopt) \
362 SOURCES_libvlc_control = \
363 control/libvlc_internal.h \
371 control/flat_media_list_view.c \
372 control/hierarchical_media_list_view.c \
373 control/hierarchical_node_media_list_view.c \
375 control/media_player.c \
376 control/media_list.c \
377 control/media_list_path.h \
378 control/media_list_player.c \
379 control/media_list_view.c \
380 control/media_library.c \
381 control/mediacontrol_internal.h \
382 control/mediacontrol_core.c \
383 control/mediacontrol_util.c \
384 control/mediacontrol_audio_video.c \
385 control/media_discoverer.c
387 ###############################################################################
389 ###############################################################################
393 echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
394 REVISION="$$((LANG=C git --git-dir=$(top_srcdir)/.git show-ref -s HEAD 2>/dev/null || echo exported) | cut -b -10)"; \
395 echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
399 ###############################################################################
401 ###############################################################################
408 vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
410 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
411 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
412 vlc_LDADD = $(DATA_win32_rc) libvlc.la $(LTLIBINTL) `$(VLC_CONFIG) -libs vlc`
415 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
417 @case `$(VLC_CONFIG) --linkage vlc builtin` in \
418 c++) cmd="$(CXXLINK)" ;; \
419 objc) cmd="$(OBJCLINK)" ;; \
420 c|*) cmd="$(LINK)" ;; \
422 cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
427 DATA_win32_rc = $(noinst_DATA)
428 noinst_DATA = vlc_win32_rc.$(OBJEXT)
430 vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
431 $(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 $@
435 ###############################################################################
436 # Unit/regression test
437 ###############################################################################
447 dist_check_SCRIPTS = check_symbols
448 TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
450 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
452 test_dictionary_SOURCES = test/dictionary.c
453 test_dictionary_LDADD = libvlc.la
454 test_dictionary_CFLAGS = $(CFLAGS_tests)
456 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
457 test_i18n_atof_LDADD = libvlc.la
458 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
460 test_url_SOURCES = test/url.c
461 test_url_LDADD = libvlc.la
462 test_url_CFLAGS = $(CFLAGS_tests)
464 test_utf8_SOURCES = test/utf8.c
465 test_utf8_LDADD = libvlc.la
466 test_utf8_CFLAGS = $(CFLAGS_tests)
468 test_headers_SOURCES = test/headers.c
469 test_headers_CFLAGS = $(CFLAGS_tests)
471 test_control_SOURCES = control/testapi.c
472 test_control_LDADD = libvlc-control.la
473 test_control_CFLAGS = $(CFLAGS_tests)
476 for h in `echo $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
478 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
479 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
481 echo "Header $$h not included in test/headers.c!"; \
487 @echo "Generated source cannot be phony. Go away." >&2