New vu meter visualization.
[vlc/gmpfix.git] / modules / genmf
blob4969410018bf87ff260c15fce843d3928d1fbc86
1 #! /bin/sh
3 ## genmf file for the VLC media player
4 ##
5 ## Copyright (C) 2005-2007 the VideoLAN team
6 ##
7 ## Authors: Sam Hocevar <sam@zoy.org>
8 ## RĂ©mi Denis-Courmont <rem # videolan # org>
10 cd $(dirname "$0")/.. || exit 1
12 while test "$1"
14 printf "."
15 dir="$1"
16 modf="modules/${dir}/Modules.am"
17 makf="modules/${dir}/Makefile.am"
18 basedir="`echo "${dir}" | cut -f1 -d/`"
19 mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | sort | uniq | xargs`"
20 plugins="`sed -n -e 's/^.*lib\([^ ]*\)_plugin\.la.*/\1/p' < "${modf}" | sort | uniq | xargs`"
21 libvlc_ltlibs=""
22 extra_ltlibs=""
23 for mod in $mods
25 case " ${plugins} " in
26 *\ ${mod}\ *)
29 libvlc_ltlibs="${libvlc_ltlibs} \$(LTLIB${mod})"
30 extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
32 esac
33 done
34 rm -f "${makf}" && cat > "${makf}" << EOF
35 # ${makf} automatically generated from ${modf} by $0
36 # DO NOT EDIT THIS FILE DIRECTLY! See Modules.am instead.
38 basedir = ${basedir}
39 dir = ${dir}
40 mods = ${mods}
41 libvlc_LTLIBRARIES = ${libvlc_ltlibs}
42 EXTRA_LTLIBRARIES = ${extra_ltlibs}
44 include \$(top_srcdir)/modules/common.am
46 EOF
47 for mod in $mods
49 cat >> "${makf}" << EOF
50 # The ${mod} plugin
51 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
52 nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
53 # Force per-target objects:
54 lib${mod}_plugin_la_CFLAGS = \$(AM_CFLAGS)
55 lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS)
56 lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS)
57 # Set LIBADD and DEPENDENCIES manually:
58 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD)
59 lib${mod}_plugin_la_DEPENDENCIES =
61 EOF
62 done
64 shift
65 done
66 printf "\n"