Commit of patch #1715310 ("WIN32: Dynamic Plugin support with MinGW").

svn-id: r26963
This commit is contained in:
Johannes Schickel 2007-05-27 10:46:47 +00:00
parent d37e8b62b6
commit 2d43de587a
3 changed files with 19 additions and 1 deletions

View File

@ -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"

16
configure vendored
View File

@ -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=

View File

@ -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))