aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2007-05-27 10:46:47 +0000
committerJohannes Schickel2007-05-27 10:46:47 +0000
commit2d43de587acb02be9822cd5397395583d0b60875 (patch)
tree810a24d0ce1cb2da1495476e9c6a026492d44106
parentd37e8b62b65d75cee73fbfe0494aa769255cb53f (diff)
downloadscummvm-rg350-2d43de587acb02be9822cd5397395583d0b60875.tar.gz
scummvm-rg350-2d43de587acb02be9822cd5397395583d0b60875.tar.bz2
scummvm-rg350-2d43de587acb02be9822cd5397395583d0b60875.zip
Commit of patch #1715310 ("WIN32: Dynamic Plugin support with MinGW").
svn-id: r26963
-rw-r--r--backends/plugins/win32/win32-provider.cpp2
-rwxr-xr-xconfigure16
-rw-r--r--rules.mk2
3 files changed, 19 insertions, 1 deletions
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index b88f900027..357be4646b 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -27,6 +27,8 @@
#include "backends/plugins/dynamic-plugin.h"
#include "common/fs.h"
+#include <windows.h>
+
#define PLUGIN_DIRECTORY ""
#define PLUGIN_PREFIX ""
#define PLUGIN_SUFFIX ".dll"
diff --git a/configure b/configure
index ad2c14595a..b2005860b8 100755
--- a/configure
+++ b/configure
@@ -1025,6 +1025,22 @@ POST_OBJS_FLAGS :=
LIBS += -ldl
'
;;
+ *mingw32*)
+_def_plugin='
+#define PLUGIN_PREFIX ""
+#define PLUGIN_SUFFIX ".dll"
+'
+_mak_plugins='
+BUILD_PLUGINS := 1
+PLUGIN_PREFIX :=
+PLUGIN_SUFFIX := .dll
+PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
+CXXFLAGS += -DDYNAMIC_MODULES
+PLUGIN_LDFLAGS := -shared ./libscummvm.a $(LIBS)
+PRE_OBJS_FLAGS := -Wl,--whole-archive
+POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a
+'
+ ;;
*)
_build_plugins=no
_mak_plugins=
diff --git a/rules.mk b/rules.mk
index f1f1888095..4941da5788 100644
--- a/rules.mk
+++ b/rules.mk
@@ -17,7 +17,7 @@ ifdef PLUGIN
PLUGIN-$(MODULE) := plugins/$(PLUGIN_PREFIX)$(notdir $(MODULE))$(PLUGIN_SUFFIX)
$(PLUGIN-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(PLUGIN_EXTRA_DEPS)
$(MKDIR) plugins
- $(CXX) $(PLUGIN_LDFLAGS) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) -o $@
+ $(CXX) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@
PLUGIN:=
plugins: $(PLUGIN-$(MODULE))