diff options
author | Johannes Schickel | 2007-05-27 10:46:47 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-05-27 10:46:47 +0000 |
commit | 2d43de587acb02be9822cd5397395583d0b60875 (patch) | |
tree | 810a24d0ce1cb2da1495476e9c6a026492d44106 | |
parent | d37e8b62b65d75cee73fbfe0494aa769255cb53f (diff) | |
download | scummvm-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.cpp | 2 | ||||
-rwxr-xr-x | configure | 16 | ||||
-rw-r--r-- | rules.mk | 2 |
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" @@ -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= @@ -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)) |