From 7a79cedebf6e0bde2e6a3a0be818593a5d7b35d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 19 Feb 2006 09:03:58 +0000 Subject: [PATCH] - Seemingly fix linking of plugins with shared libvlc on Win32 - Hopefully the same on Darwin !!! BIG FAT WARNING !!! On architectures where you need to resolve all symbols when linking a shared library, libvlc must be built before the plugins, so that they can resolve symbols from the libvlc API. Also, the "builtins" must be built before libvlc (regardless of the architecture or use of shared libvlc). However, our build system currently builds all modules, whether builtins or plugins, then libvlc and then vlc. Obviously, we could swap the build orders, so that libvlc gets built before modules/ but that will only work if there is no buitins modules. I'm not too keen on the idea of recursing twice within the modules/ subdirectories (once for builtins, and once for plugins). Until the issue is settled, here is how to build and test the shared libvlc on Win32: 1/ run configure with --enable-shared-libvlc 2/ build all built-in modules (or disable them all) one by one, 3/ make libvlc.dll 4/ make --- bootstrap | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bootstrap b/bootstrap index 78dd8affaa..ed62199741 100755 --- a/bootstrap +++ b/bootstrap @@ -207,6 +207,23 @@ libvlcdir = \$(libdir)/vlc/\$(basedir) EXTRA_LIBRARIES = ${extra_libs} include Modules.am +if BUILD_SHARED +if BUILD_PIC +LIBVLC = \$(top_builddir)/libvlc_pic\$(LIBEXT) +else +LIBVLC = \$(top_builddir)/libvlc\$(LIBEXT) +endif +if HAVE_WIN32 +LIBADD = \$(LIBVLC) +endif +if HAVE_WINCE +LIBADD = \$(LIBVLC) +endif +if HAVE_DARWIN +LIBADD = \$(LIBVLC) +endif +endif + all: all-modules # Find out which modules were enabled and tell make to build them @@ -221,7 +238,7 @@ all-modules: # Build a plugin with the adequate linker and linker's flags _plugin.a_plugin\$(LIBEXT): @mod="\$*" ; mod=\$\${mod#lib} ; \ - ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` -u \$(SYMPREF)\$(VLC_ENTRY)" ; \ + ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` \$(LIBADD) -u \$(SYMPREF)\$(VLC_ENTRY)" ; \ case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\ c++) ld="\$(CXXLINK)" ;; \ objc) ld="\$(OBJCLINK)" ;; \