[Scummvm-cvs-logs] SF.net SVN: scummvm:[52728] scummvm/branches/gsoc2010-plugins

dhewg at users.sourceforge.net dhewg at users.sourceforge.net
Wed Sep 15 09:43:16 CEST 2010


Revision: 52728
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52728&view=rev
Author:   dhewg
Date:     2010-09-15 07:43:16 +0000 (Wed, 15 Sep 2010)

Log Message:
-----------
PLUGINS: Cleanup.

- Unify ELF loader handling in configure
- Rename ELF_LOADER_TARGET to USE_ELF_LOADER

Modified Paths:
--------------
    scummvm/branches/gsoc2010-plugins/backends/platform/ds/arm9/makefile
    scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
    scummvm/branches/gsoc2010-plugins/backends/platform/psp/Makefile
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.cpp
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.h
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.cpp
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.h
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.cpp
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.h
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf32.h
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.cpp
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.h
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.cpp
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.h
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.cpp
    scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.h
    scummvm/branches/gsoc2010-plugins/base/plugins.h
    scummvm/branches/gsoc2010-plugins/configure

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ds/arm9/makefile
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ds/arm9/makefile	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ds/arm9/makefile	2010-09-15 07:43:16 UTC (rev 52728)
@@ -237,7 +237,7 @@
 
 
 ASFLAGS = -mcpu=arm9tdmi -mthumb-interwork
-DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DELF_LOADER_TARGET -DARM -DARM_TARGET -DONE_PLUGIN_AT_A_TIME
+DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DUSE_ELF_LOADER -DARM -DARM_TARGET -DONE_PLUGIN_AT_A_TIME
 ifdef USE_MAD
 	DEFINES += -DUSE_MAD
 endif

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2	2010-09-15 07:43:16 UTC (rev 52728)
@@ -78,7 +78,7 @@
 TARGET = elf/scummvm.elf
 
 DEFINES += -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -DDISABLE_SAVEGAME_SORTING -D_EE -D__PLAYSTATION2__ -G2 -O2 -Wall -Wno-multichar -fno-rtti -fno-exceptions -DNO_ADAPTOR
-DEFINES += -DELF_LOADER_TARGET -DMIPS_TARGET -DONE_PLUGIN_AT_A_TIME
+DEFINES += -DUSE_ELF_LOADER -DMIPS_TARGET -DONE_PLUGIN_AT_A_TIME
 
 INCLUDES  = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) 
 INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/psp/Makefile
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/psp/Makefile	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/psp/Makefile	2010-09-15 07:43:16 UTC (rev 52728)
@@ -67,7 +67,7 @@
 # Variables for common Scummvm makefile
 CXX      = psp-g++
 CXXFLAGS = -O3 -Wall -Wno-multichar -fno-exceptions -fno-rtti
-DEFINES  = -D__PSP__ -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DUSE_ZLIB  -DDISABLE_DOSBOX_OPL -DUSE_RGB_COLOR -DELF_LOADER_TARGET -DMIPS_TARGET
+DEFINES  = -D__PSP__ -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DUSE_ZLIB  -DDISABLE_DOSBOX_OPL -DUSE_RGB_COLOR -DUSE_ELF_LOADER -DMIPS_TARGET
 
 LDFLAGS  :=
 INCDIR   := $(srcdir) . $(srcdir)/engines/ $(PSPSDK)/include

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.cpp	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.cpp	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,9 +23,10 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(ARM_TARGET)
+#include "common/scummsys.h"
 
-#include "backends/plugins/elf/elf-loader.h"
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET)
+
 #include "backends/plugins/elf/arm-loader.h"
 
 #include "common/debug.h"
@@ -128,5 +129,5 @@
 	return true;
 }
 
-#endif /* defined(DYNAMIC_MODULES) && defined(ARM_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET) */
 

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/arm-loader.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,11 +23,13 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(ARM_TARGET)
-
 #ifndef BACKENDS_PLUGINS_ARM_LOADER_H
 #define BACKENDS_PLUGINS_ARM_LOADER_H
 
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET)
+
 #include "backends/plugins/elf/elf-loader.h"
 
 class ARMDLObject : public DLObject {
@@ -41,6 +43,7 @@
 	}
 };
 
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET) */
+
 #endif /* BACKENDS_PLUGINS_ARM_LOADER_H */
 
-#endif /* defined(DYNAMIC_MODULES) && defined(ARM_TARGET) */

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.cpp	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.cpp	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,8 +23,10 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
+#include "common/scummsys.h"
 
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 #include "backends/plugins/elf/elf-loader.h"
 
 #include "common/debug.h"
@@ -423,5 +425,5 @@
 	return 0;
 }
 
-#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
 

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-loader.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,11 +23,13 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
-
 #ifndef BACKENDS_PLUGINS_ELF_LOADER_H
 #define BACKENDS_PLUGINS_ELF_LOADER_H
 
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 #include <stddef.h>
 
 #include "backends/plugins/elf/elf32.h"
@@ -96,7 +98,7 @@
 	void discard_symtab();
 };
 
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
+
 #endif /* BACKENDS_PLUGINS_ELF_LOADER_H */
 
-#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */
-

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.cpp	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.cpp	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,8 +23,10 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
+#include "common/scummsys.h"
 
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 #ifdef ELF_LOADER_CXA_ATEXIT
 #include <cxxabi.h>
 #endif
@@ -158,4 +160,5 @@
 	return true;
 }
 
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf-provider.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,11 +23,13 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
-
 #ifndef BACKENDS_PLUGINS_ELF_PROVIDER_H
 #define BACKENDS_PLUGINS_ELF_PROVIDER_H
 
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 #include "backends/plugins/elf/elf-loader.h"
 
 #include "common/fs.h"
@@ -74,6 +76,7 @@
 	bool isPluginFilename(const Common::FSNode &node) const;
 };
 
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 #endif /* BACKENDS_PLUGINS_ELF_PROVIDER_H */
 
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf32.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf32.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/elf32.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -28,6 +28,8 @@
 
 #include "common/scummsys.h"
 
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 /**
  *  ELF stuff:
  *  The contents of this file were gathered mainly from the SYSTEM V APPLICATION BINARY INTERFACE.
@@ -250,5 +252,7 @@
 	__valgp; \
 }
 
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
 #endif /* BACKENDS_ELF_H */
 

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.cpp	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.cpp	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,8 +23,10 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
+#include "common/scummsys.h"
 
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
+
 #include "backends/plugins/elf/mips-loader.h"
 
 #include "common/debug.h"
@@ -331,5 +333,5 @@
 	}
 }
 
-#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET) */
 

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/mips-loader.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -24,11 +24,13 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
-
 #ifndef BACKENDS_PLUGINS_MIPS_LOADER_H
 #define BACKENDS_PLUGINS_MIPS_LOADER_H
 
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
+
 #include "backends/plugins/elf/elf-loader.h"
 #include "backends/plugins/elf/shorts-segment-manager.h"
 
@@ -51,7 +53,7 @@
 	}
 };
 
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET) */
+
 #endif /* BACKENDS_PLUGINS_MIPS_LOADER_H */
 
-#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
-

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.cpp	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.cpp	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,8 +23,10 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(PPC_TARGET)
+#include "common/scummsys.h"
 
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET)
+
 #include "backends/plugins/elf/elf-loader.h"
 #include "backends/plugins/elf/ppc-loader.h"
 
@@ -123,5 +125,5 @@
 	return true;
 }
 
-#endif /* defined(DYNAMIC_MODULES) && defined(PPC_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET) */
 

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/ppc-loader.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,11 +23,13 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(PPC_TARGET)
-
 #ifndef BACKENDS_PLUGINS_PPC_LOADER_H
 #define BACKENDS_PLUGINS_PPC_LOADER_H
 
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET)
+
 #include "backends/plugins/elf/elf-loader.h"
 
 class PPCDLObject : public DLObject {
@@ -41,7 +43,7 @@
 	}
 };
 
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET) */
+
 #endif /* BACKENDS_PLUGINS_PPC_LOADER_H */
 
-#endif /* defined(DYNAMIC_MODULES) && defined(PPC_TARGET) */
-

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.cpp	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.cpp	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,8 +23,10 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
+#include "common/scummsys.h"
 
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
+
 #include "backends/plugins/elf/shorts-segment-manager.h"
 
 #include "common/debug.h"
@@ -82,5 +84,6 @@
 	delete seg;
 }
 
-#endif /* DYNAMIC_MODULES && MIPS_TARGET */
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
 
+

Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf/shorts-segment-manager.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -23,11 +23,13 @@
  *
  */
 
-#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
-
 #ifndef SHORTS_SEGMENT_MANAGER_H
 #define SHORTS_SEGMENT_MANAGER_H
 
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
+
 #include "backends/plugins/elf/elf32.h"
 
 #include "common/singleton.h"
@@ -109,7 +111,7 @@
 	char *_highestAddress;
 };
 
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
+
 #endif /* SHORTS_SEGMENT_MANAGER_H */
 
-#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
-

Modified: scummvm/branches/gsoc2010-plugins/base/plugins.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/base/plugins.h	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/base/plugins.h	2010-09-15 07:43:16 UTC (rev 52728)
@@ -91,10 +91,11 @@
 	(ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN) && DYNAMIC_MODULES)
 
 // see comments in backends/plugins/elf/elf-provider.cpp
-#if defined(ELF_LOADER_TARGET) && defined(ELF_LOADER_CXA_ATEXIT)
-#define PLUGIN_DYNAMIC_EXTRA_DECL uint32 __dso_handle __attribute__((visibility ("hidden"))) = 0
+#if defined(USE_ELF_LOADER) && defined(ELF_LOADER_CXA_ATEXIT)
+#define PLUGIN_DYNAMIC_DSO_HANDLE \
+	uint32 __dso_handle __attribute__((visibility("hidden"))) = 0;
 #else
-#define PLUGIN_DYNAMIC_EXTRA_DECL void dummyFuncToAllowTrailingSemicolon()
+#define PLUGIN_DYNAMIC_DSO_HANDLE
 #endif
 
 /**
@@ -126,7 +127,7 @@
  */
 #define REGISTER_PLUGIN_DYNAMIC(ID,TYPE,PLUGINCLASS) \
 	extern "C" { \
-		PLUGIN_DYNAMIC_EXTRA_DECL; \
+		PLUGIN_DYNAMIC_DSO_HANDLE \
 		PLUGIN_EXPORT int32 PLUGIN_getVersion() { return PLUGIN_VERSION; } \
 		PLUGIN_EXPORT int32 PLUGIN_getType() { return TYPE; } \
 		PLUGIN_EXPORT int32 PLUGIN_getTypeVersion() { return TYPE##_VERSION; } \

Modified: scummvm/branches/gsoc2010-plugins/configure
===================================================================
--- scummvm/branches/gsoc2010-plugins/configure	2010-09-14 22:16:31 UTC (rev 52727)
+++ scummvm/branches/gsoc2010-plugins/configure	2010-09-15 07:43:16 UTC (rev 52728)
@@ -137,6 +137,7 @@
 _enable_prof=no
 _unix=no
 _global_constructors=no
+_elf_loader=no
 # Default vkeybd/keymapper options
 _vkeybd=no
 _keymapper=no
@@ -1617,7 +1618,6 @@
 			DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DSTREAM_AUDIO_FROM_DISK"
 			DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU"
 			DEFINES="$DEFINES -DDISABLE_COMMAND_LINE"
-			DEFINES="$DEFINES -DARM_TARGET"
 			_need_memalign=yes
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
@@ -2007,20 +2007,10 @@
 '
 		;;
 	ds)
-DEFINES="$DEFINES -DELF_LOADER_TARGET -DELF_LOADER_CXA_ATEXIT -DONE_PLUGIN_AT_A_TIME"
-_def_plugin='
-#define PLUGIN_PREFIX	""
-#define PLUGIN_SUFFIX	".plg"
-'
+		_elf_loader=yes
+		DEFINES="$DEFINES -DARM_TARGET -DELF_LOADER_CXA_ATEXIT -DONE_PLUGIN_AT_A_TIME"
 _mak_plugins='
-DYNAMIC_MODULES		:= 1
-PLUGIN_PREFIX		:=
-PLUGIN_SUFFIX		:= .plg
-PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
-CXXFLAGS		+= -DDYNAMIC_MODULES
-PLUGIN_LDFLAGS		= -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mno-fpu -Wl,--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms
-PRE_OBJS_FLAGS		:= -Wl,--whole-archive
-POST_OBJS_FLAGS		:= -Wl,--no-whole-archive
+PLUGIN_LDFLAGS		+= -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mno-fpu
 '
 		;;
 	freebsd*)
@@ -2041,20 +2031,10 @@
 '
 		;;
 	gamecube | wii)
-DEFINES="$DEFINES -DELF_LOADER_TARGET -DPPC_TARGET -DELF_LOADER_CXA_ATEXIT -DONE_PLUGIN_AT_A_TIME"
-_def_plugin='
-#define PLUGIN_PREFIX	""
-#define PLUGIN_SUFFIX	".plg"
-'
+		_elf_loader=yes
+		DEFINES="$DEFINES -DPPC_TARGET -DELF_LOADER_CXA_ATEXIT -DONE_PLUGIN_AT_A_TIME"
 _mak_plugins='
-DYNAMIC_MODULES		:= 1
-PLUGIN_PREFIX		:=
-PLUGIN_SUFFIX		:= .plg
-PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
-CXXFLAGS			+= -DDYNAMIC_MODULES
-PLUGIN_LDFLAGS		= -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/wii/plugin.ld -Wl,--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms
-PRE_OBJS_FLAGS		:= -Wl,--whole-archive
-POST_OBJS_FLAGS		:= -Wl,--no-whole-archive
+PLUGIN_LDFLAGS		+= -Wl,-T$(srcdir)/backends/plugins/wii/plugin.ld
 '
 		;;
 	linux*|android)
@@ -2092,40 +2072,19 @@
 '
 		;;
 	ps2)
-DEFINES="$DEFINES -DELF_LOADER_TARGET -DMIPS_TARGET"
-_def_plugin='
-#define PLUGIN_PREFIX	""
-#define PLUGIN_SUFFIX	".plg"
-'
+		_elf_loader=yes
+		DEFINES="$DEFINES -DMIPS_TARGET"
 _mak_plugins='
-DYNAMIC_MODULES		:= 1
-PLUGIN_PREFIX		:=
-PLUGIN_SUFFIX		:= .plg
-PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
-CXXFLAGS		+= -DDYNAMIC_MODULES
-LDFLAGS			+= -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T$(srcdir)/backends/plugins/ps2/main_prog.ld
-PLUGIN_LDFLAGS 	+= -mno-crt0 $(PS2SDK)/ee/startup/crt0.o
-PLUGIN_LDFLAGS 	+= -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/ps2/plugin.ld,--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms -lstdc++ -lc
-PRE_OBJS_FLAGS		:= -Wl,--whole-archive
-POST_OBJS_FLAGS		:= -Wl,--no-whole-archive
+LDFLAGS				+= -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T$(srcdir)/backends/plugins/ps2/main_prog.ld
+PLUGIN_LDFLAGS		+= -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc
 '
 		;;
 	psp)
-DEFINES="$DEFINES -DELF_LOADER_TARGET -DMIPS_TARGET -DELF_LOADER_CXA_ATEXIT"
-_def_plugin='
-#define PLUGIN_PREFIX	""
-#define PLUGIN_SUFFIX	".plg"
-'
+		_elf_loader=yes
+		DEFINES="$DEFINES -DMIPS_TARGET -DELF_LOADER_CXA_ATEXIT"
 _mak_plugins='
-DYNAMIC_MODULES		:= 1
-PLUGIN_PREFIX		:=
-PLUGIN_SUFFIX		:= .plg
-PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
-CXXFLAGS		+= -DDYNAMIC_MODULES
-LDFLAGS			+= -Wl,-T$(srcdir)/backends/platform/psp/main_prog.ld
-PLUGIN_LDFLAGS		= -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms,-T$(srcdir)/backends/plugins/psp/plugin.ld -lc -Wl,--wrap,memcpy
-PRE_OBJS_FLAGS		:= -Wl,--whole-archive
-POST_OBJS_FLAGS		:= -Wl,--no-whole-archive
+LDFLAGS				+= -Wl,-T$(srcdir)/backends/platform/psp/main_prog.ld
+PLUGIN_LDFLAGS		+= -Wl,-T$(srcdir)/backends/plugins/psp/plugin.ld -lc -Wl,--wrap,memcpy
 '
 		;;
 	*)
@@ -2137,7 +2096,28 @@
 	echo "$_dynamic_modules"
 fi
 
+#
+# Check whether integrated ELF loader support is requested
+#
+define_in_config_if_yes "$_elf_loader" 'USE_ELF_LOADER'
 
+if test "$_elf_loader" = yes; then
+	CXXFLAGS="$CXXFLAGS -DDYNAMIC_MODULES"
+	_def_plugin='
+#define PLUGIN_PREFIX	""
+#define PLUGIN_SUFFIX	".plg"
+'
+	_mak_plugins='
+DYNAMIC_MODULES		:= 1
+PLUGIN_PREFIX		:=
+PLUGIN_SUFFIX		:= .plg
+PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
+PLUGIN_LDFLAGS		= -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms
+PRE_OBJS_FLAGS		:= -Wl,--whole-archive
+POST_OBJS_FLAGS		:= -Wl,--no-whole-archive
+'"$_mak_plugins"
+fi
+
 #
 # Check whether integrated MT-32 emulator support is requested
 #


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list