3 ## genmf file for the VLC media player
5 ## Copyright (C) 2005-2007 the VideoLAN team
7 ## Authors: Sam Hocevar <sam@zoy.org>
8 ## RĂ©mi Denis-Courmont <rem # videolan # org>
10 cd $
(dirname "$0")/.. ||
exit 1
15 modf
="modules/${dir}/Modules.am"
16 if test ! -f "$modf"; then
17 echo "$modf does not exist!" >&2
20 makf
="modules/${dir}/Makefile.am"
21 basedir
="`echo "${dir}" | cut -f1 -d/`"
22 mods
="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | sort | uniq | xargs`"
23 plugins
="`sed -n -e 's/^.*lib\([^ ]*\)_plugin\.la.*/\1/p' < "${modf}" | sort | uniq | xargs`"
28 case " ${plugins} " in
32 libvlc_ltlibs
="${libvlc_ltlibs} \$(LTLIB${mod})"
33 extra_ltlibs
="${extra_ltlibs} lib${mod}_plugin.la"
37 rm -f "${makf}" && cat > "${makf}" << EOF
38 # ${makf} automatically generated from ${modf} by $0
39 # DO NOT EDIT THIS FILE DIRECTLY! See Modules.am instead.
44 libvlc_LTLIBRARIES = ${libvlc_ltlibs}
45 EXTRA_LTLIBRARIES = ${extra_ltlibs}
47 include \$(top_srcdir)/modules/common.am
52 cat >> "${makf}" << EOF
54 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
55 nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
56 # Force per-target objects:
57 lib${mod}_plugin_la_CPPFLAGS = \$(AM_CPPFLAGS) \$(CPPFLAGS_${mod})
58 lib${mod}_plugin_la_CFLAGS = \$(AM_CFLAGS) \$(CFLAGS_${mod})
59 lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS) \$(CXXFLAGS_${mod})
60 lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS) \$(OBJCFLAGS_${mod})
61 # Set LIBADD manually:
62 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \$(LIBS_${mod})
63 lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod})