Commit caae8fc1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Grrr damn Mac OS X linker

parent 7e747209
...@@ -216,7 +216,6 @@ noinst_HEADERS = ...@@ -216,7 +216,6 @@ noinst_HEADERS =
EXTRA_DIST = Modules.am EXTRA_DIST = Modules.am
BUILT_SOURCES = BUILT_SOURCES =
SUBDIRS = ${subdirs} SUBDIRS = ${subdirs}
SUFFIXES = _plugin\$(LIBEXT) _plugin.a
libvlcdir = \$(libdir)/vlc/\$(basedir) libvlcdir = \$(libdir)/vlc/\$(basedir)
...@@ -234,8 +233,6 @@ endif ...@@ -234,8 +233,6 @@ endif
endif endif
all: all-modules all: all-modules
# Find out which modules were enabled and tell make to build them
all-modules: all-modules:
@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\ @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\ if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\
...@@ -244,18 +241,6 @@ all-modules: ...@@ -244,18 +241,6 @@ all-modules:
\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
test -z "\$\$fail" test -z "\$\$fail"
# Build a plugin with the adequate linker and linker's flags
_plugin.a_plugin\$(LIBEXT):
@mod="\$*" ; mod=\$\${mod:3} ; \
ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` -u vlc_entry__0_8_2" ; \
case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\
c++) ld="\$(CXXLINK)" ;; \
objc) ld="\$(OBJCLINK)" ;; \
c|*) ld="\$(LINK)" ;; \
esac ; \
echo \$\$ld \$< \$\$ldfl ; \
\$\$ld \$< \$\$ldfl
\$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/bootstrap \$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/bootstrap
cd \$(top_srcdir) && \$(SHELL) ./bootstrap cd \$(top_srcdir) && \$(SHELL) ./bootstrap
...@@ -330,6 +315,9 @@ endif ...@@ -330,6 +315,9 @@ endif
EOF EOF
for mod in $mods for mod in $mods
do do
if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < "${modf}" >/dev/null 2>&1; then
PRIVATE='#'; else
PRIVATE=''; fi
if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
NODIST=''; else NODIST=''; else
NODIST='#'; fi NODIST='#'; fi
...@@ -355,14 +343,14 @@ clean-${mod}: ...@@ -355,14 +343,14 @@ clean-${mod}:
EOF EOF
fi fi
if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
BUILT_SOURCES += \$(B${mod}) ${PRIVATE}BUILT_SOURCES += \$(B${mod})
EOF EOF
fi fi
cat >> "${makf}" << EOF cat >> "${makf}" << EOF
lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod}) ${PRIVATE}lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod}) ${PRIVATE}nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> "${makf}" << EOF cat >> "${makf}" << EOF
...@@ -370,10 +358,10 @@ lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\` ...@@ -370,10 +358,10 @@ lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\` lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\` lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
lib${mod}_pic_a_SOURCES = \$(SOURCES_${mod}) lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
nodist_lib${mod}_pic_a_SOURCES = \$(nodist_SOURCES_${mod}) nodist_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> "${makf}" << EOF cat >> "${makf}" << EOF
...@@ -392,6 +380,15 @@ lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` ...@@ -392,6 +380,15 @@ lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`
lib${mod}dir = \$(libdir)/vlc/${topdir}
${PRIVATE}lib${mod}_plugin\$(LIBEXT): \$(lib${mod}_plugin_a_OBJECTS)
${PRIVATE} @case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\
${PRIVATE} c++) echo \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
${PRIVATE} objc) echo \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
${PRIVATE} c|*) echo \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
${PRIVATE} esac
EOF EOF
done done
done done
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment