diff options
author | CeRiAl | 2011-04-28 06:40:54 +0800 |
---|---|---|
committer | Ismail Khatib | 2011-05-18 06:04:23 +0800 |
commit | 6db6d69eedeb74d4863b2dd964407ca8bca1c4a8 (patch) | |
tree | b0b2f5da189c13252fdfb2336c2fefa33174a39b | |
parent | 582827df40ed4a86a067c26dface4d51929d391a (diff) | |
download | scummvm-rg350-6db6d69eedeb74d4863b2dd964407ca8bca1c4a8.tar.gz scummvm-rg350-6db6d69eedeb74d4863b2dd964407ca8bca1c4a8.tar.bz2 scummvm-rg350-6db6d69eedeb74d4863b2dd964407ca8bca1c4a8.zip |
WINCE: Enable building of plugins with normal configure/make
Enables building of plugin .dlls without a custom Makefile.
Also removes generation of scummvm.exe.map from configure script.
-rw-r--r-- | backends/platform/wince/module.mk | 5 | ||||
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 1 | ||||
-rw-r--r-- | backends/platform/wince/wince.mk | 7 | ||||
-rw-r--r-- | backends/plugins/sdl/sdl-provider.cpp | 2 | ||||
-rw-r--r-- | backends/plugins/win32/win32-provider.cpp | 9 | ||||
-rw-r--r--[-rwxr-xr-x] | configure | 24 |
6 files changed, 42 insertions, 6 deletions
diff --git a/backends/platform/wince/module.mk b/backends/platform/wince/module.mk index d1c95f5df4..ddad024084 100644 --- a/backends/platform/wince/module.mk +++ b/backends/platform/wince/module.mk @@ -21,9 +21,12 @@ MODULE_OBJS := \ ../../../gui/Key.o \ ../../../gui/KeysDialog.o \ missing/missing.o \ - PocketSCUMM.o \ smartLandScale.o +ifndef DYNAMIC_MODULES +MODULE_OBJS += PocketSCUMM.o +endif + # We don't use rules.mk but rather manually update OBJS and MODULE_DIRS. MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) OBJS := $(MODULE_OBJS) $(OBJS) diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 62d3dd89fc..a53bc41667 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -63,6 +63,7 @@ #include "backends/mixer/wincesdl/wincesdl-mixer.h" #ifdef DYNAMIC_MODULES +#include <malloc.h> #include "backends/plugins/win32/win32-provider.h" #endif diff --git a/backends/platform/wince/wince.mk b/backends/platform/wince/wince.mk index 39be1e84e5..cac3ad4e8f 100644 --- a/backends/platform/wince/wince.mk +++ b/backends/platform/wince/wince.mk @@ -2,3 +2,10 @@ backends/platform/wince/PocketSCUMM.o: $(srcdir)/backends/platform/wince/PocketS $(QUIET)$(MKDIR) $(*D) $(WINDRES) $(WINDRESFLAGS) -I$(srcdir)/backends/platform/wince $< $@ +ifdef DYNAMIC_MODULES +plugins: backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o + $(CXX) backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o -L. -lscummvm -o scummvm.exe + +backends/platform/wince/stub.o: $(srcdir)/backends/platform/wince/stub.cpp + $(CXX) -c $(srcdir)/backends/platform/wince/stub.cpp -o backends/platform/wince/stub.o +endif diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp index 2ebcd77379..00520b48b0 100644 --- a/backends/plugins/sdl/sdl-provider.cpp +++ b/backends/plugins/sdl/sdl-provider.cpp @@ -22,7 +22,7 @@ #include "common/scummsys.h" -#if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND) +#if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND) && !defined(_WIN32_WCE) #include "backends/plugins/sdl/sdl-provider.h" #include "backends/plugins/dynamic-plugin.h" diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp index 5176ec179a..bcbc6bde9e 100644 --- a/backends/plugins/win32/win32-provider.cpp +++ b/backends/plugins/win32/win32-provider.cpp @@ -70,8 +70,15 @@ public: #ifndef _WIN32_WCE _dlHandle = LoadLibrary(_filename.c_str()); #else - if (!_filename.hasSuffix("scummvm.dll")) // skip loading the core scummvm module + if (!_filename.hasSuffix("scummvm.dll") && + !_filename.hasSuffix("libstdc++-6.dll") && + !_filename.hasSuffix("libgcc_s_sjlj-1.dll")) { + // skip loading the core scummvm module and runtime dlls _dlHandle = LoadLibrary(toUnicode(_filename.c_str())); + } else { + // do not generate misleading error message + return false; + } #endif if (!_dlHandle) { diff --git a/configure b/configure index 46e6eb8b8f..bdbda1a8c9 100755..100644 --- a/configure +++ b/configure @@ -1697,8 +1697,8 @@ case $_host_os in fi ;; wince) - CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale" - DEFINES="$DEFINES -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" + CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale -D_WIN32_WCE=300 " + DEFINES="$DEFINES -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__=" ;; # given this is a shell script assume some type of unix @@ -2054,7 +2054,7 @@ if test -n "$_host"; then add_line_to_config_h "#define USE_WII_KBD" ;; wince) - LDFLAGS="$LDFLAGS -Wl,-Map,scummvm.exe.map -Wl,--stack,65536" + LDFLAGS="$LDFLAGS -Wl,--stack,65536" _need_memalign=yes _arm_asm=yes _tremolo=yes @@ -2319,6 +2319,24 @@ PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a ' ;; + wince) + DEFINES="$DEFINES -DUNCACHED_PLUGINS" + HOSTEXEEXT=".dll" +_def_plugin=' +#define PLUGIN_PREFIX "" +#define PLUGIN_SUFFIX ".dll" +' +_mak_plugins=' +DYNAMIC_MODULES := 1 +PLUGIN_PREFIX := +PLUGIN_SUFFIX := .dll +PLUGIN_EXTRA_DEPS = $(EXECUTABLE) +CXXFLAGS += -DDYNAMIC_MODULES +PLUGIN_LDFLAGS := -shared -lscummvm -L. +PRE_OBJS_FLAGS := -Wl,--whole-archive +POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a -shared +' + ;; ps2) _elf_loader=yes DEFINES="$DEFINES -DMIPS_TARGET" |