aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAndre Heider2010-09-15 07:43:16 +0000
committerAndre Heider2010-09-15 07:43:16 +0000
commit41834499edb64965058dea33f1a3176810c52d88 (patch)
treebe351979a751694b3412961719c78df07405dbfe /backends
parentfd4189180da1faee7ac50d13757987bb9625b1ed (diff)
downloadscummvm-rg350-41834499edb64965058dea33f1a3176810c52d88.tar.gz
scummvm-rg350-41834499edb64965058dea33f1a3176810c52d88.tar.bz2
scummvm-rg350-41834499edb64965058dea33f1a3176810c52d88.zip
PLUGINS: Cleanup.
- Unify ELF loader handling in configure - Rename ELF_LOADER_TARGET to USE_ELF_LOADER svn-id: r52728
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ds/arm9/makefile2
-rw-r--r--backends/platform/ps2/Makefile.ps22
-rw-r--r--backends/platform/psp/Makefile2
-rw-r--r--backends/plugins/elf/arm-loader.cpp7
-rw-r--r--backends/plugins/elf/arm-loader.h9
-rw-r--r--backends/plugins/elf/elf-loader.cpp6
-rw-r--r--backends/plugins/elf/elf-loader.h10
-rw-r--r--backends/plugins/elf/elf-provider.cpp7
-rw-r--r--backends/plugins/elf/elf-provider.h9
-rw-r--r--backends/plugins/elf/elf32.h4
-rw-r--r--backends/plugins/elf/mips-loader.cpp6
-rw-r--r--backends/plugins/elf/mips-loader.h10
-rw-r--r--backends/plugins/elf/ppc-loader.cpp6
-rw-r--r--backends/plugins/elf/ppc-loader.h10
-rw-r--r--backends/plugins/elf/shorts-segment-manager.cpp7
-rw-r--r--backends/plugins/elf/shorts-segment-manager.h10
16 files changed, 69 insertions, 38 deletions
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index b2512d788e..df7063c08a 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -237,7 +237,7 @@ CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-unknown-pragmas -Wno-reorder \
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
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2
index 7319fcb21d..8c81341253 100644
--- a/backends/platform/ps2/Makefile.ps2
+++ b/backends/platform/ps2/Makefile.ps2
@@ -78,7 +78,7 @@ DEPDIR = .deps
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
diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile
index 96816348fd..e564200897 100644
--- a/backends/platform/psp/Makefile
+++ b/backends/platform/psp/Makefile
@@ -67,7 +67,7 @@ endif
# 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
diff --git a/backends/plugins/elf/arm-loader.cpp b/backends/plugins/elf/arm-loader.cpp
index 5dbbe3ff04..93d3c60f84 100644
--- a/backends/plugins/elf/arm-loader.cpp
+++ b/backends/plugins/elf/arm-loader.cpp
@@ -23,9 +23,10 @@
*
*/
-#if defined(DYNAMIC_MODULES) && defined(ARM_TARGET)
+#include "common/scummsys.h"
+
+#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET)
-#include "backends/plugins/elf/elf-loader.h"
#include "backends/plugins/elf/arm-loader.h"
#include "common/debug.h"
@@ -128,5 +129,5 @@ bool ARMDLObject::relocateRels(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
return true;
}
-#endif /* defined(DYNAMIC_MODULES) && defined(ARM_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET) */
diff --git a/backends/plugins/elf/arm-loader.h b/backends/plugins/elf/arm-loader.h
index acc05cb143..e08f8cd0a5 100644
--- a/backends/plugins/elf/arm-loader.h
+++ b/backends/plugins/elf/arm-loader.h
@@ -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 @@ public:
}
};
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET) */
+
#endif /* BACKENDS_PLUGINS_ARM_LOADER_H */
-#endif /* defined(DYNAMIC_MODULES) && defined(ARM_TARGET) */
diff --git a/backends/plugins/elf/elf-loader.cpp b/backends/plugins/elf/elf-loader.cpp
index 32eae2cba8..f8f1987b13 100644
--- a/backends/plugins/elf/elf-loader.cpp
+++ b/backends/plugins/elf/elf-loader.cpp
@@ -23,7 +23,9 @@
*
*/
-#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"
@@ -423,5 +425,5 @@ void *DLObject::symbol(const char *name) {
return 0;
}
-#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
diff --git a/backends/plugins/elf/elf-loader.h b/backends/plugins/elf/elf-loader.h
index ac190327f7..87907d67c9 100644
--- a/backends/plugins/elf/elf-loader.h
+++ b/backends/plugins/elf/elf-loader.h
@@ -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 @@ public:
void discard_symtab();
};
-#endif /* BACKENDS_PLUGINS_ELF_LOADER_H */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
-#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */
+#endif /* BACKENDS_PLUGINS_ELF_LOADER_H */
diff --git a/backends/plugins/elf/elf-provider.cpp b/backends/plugins/elf/elf-provider.cpp
index ddffde3e38..8629de6c45 100644
--- a/backends/plugins/elf/elf-provider.cpp
+++ b/backends/plugins/elf/elf-provider.cpp
@@ -23,7 +23,9 @@
*
*/
-#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>
@@ -158,4 +160,5 @@ bool ELFPluginProvider::isPluginFilename(const Common::FSNode &node) const {
return true;
}
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
diff --git a/backends/plugins/elf/elf-provider.h b/backends/plugins/elf/elf-provider.h
index 6918183f1f..92fe5d63d1 100644
--- a/backends/plugins/elf/elf-provider.h
+++ b/backends/plugins/elf/elf-provider.h
@@ -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 @@ protected:
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)
diff --git a/backends/plugins/elf/elf32.h b/backends/plugins/elf/elf32.h
index c59f158d6e..d3a8d2e436 100644
--- a/backends/plugins/elf/elf32.h
+++ b/backends/plugins/elf/elf32.h
@@ -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 @@ typedef struct {
__valgp; \
}
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
+
#endif /* BACKENDS_ELF_H */
diff --git a/backends/plugins/elf/mips-loader.cpp b/backends/plugins/elf/mips-loader.cpp
index 9ec71fe4f3..75db067158 100644
--- a/backends/plugins/elf/mips-loader.cpp
+++ b/backends/plugins/elf/mips-loader.cpp
@@ -23,7 +23,9 @@
*
*/
-#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"
@@ -331,5 +333,5 @@ void MIPSDLObject::unload() {
}
}
-#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET) */
diff --git a/backends/plugins/elf/mips-loader.h b/backends/plugins/elf/mips-loader.h
index 1a0974d153..ef6efda21f 100644
--- a/backends/plugins/elf/mips-loader.h
+++ b/backends/plugins/elf/mips-loader.h
@@ -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 @@ public:
}
};
-#endif /* BACKENDS_PLUGINS_MIPS_LOADER_H */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET) */
-#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
+#endif /* BACKENDS_PLUGINS_MIPS_LOADER_H */
diff --git a/backends/plugins/elf/ppc-loader.cpp b/backends/plugins/elf/ppc-loader.cpp
index 4be27ac9fc..ec6d442876 100644
--- a/backends/plugins/elf/ppc-loader.cpp
+++ b/backends/plugins/elf/ppc-loader.cpp
@@ -23,7 +23,9 @@
*
*/
-#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 @@ bool PPCDLObject::relocateRels(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
return true;
}
-#endif /* defined(DYNAMIC_MODULES) && defined(PPC_TARGET) */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET) */
diff --git a/backends/plugins/elf/ppc-loader.h b/backends/plugins/elf/ppc-loader.h
index 5af9682457..f9340a6a7b 100644
--- a/backends/plugins/elf/ppc-loader.h
+++ b/backends/plugins/elf/ppc-loader.h
@@ -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 @@ public:
}
};
-#endif /* BACKENDS_PLUGINS_PPC_LOADER_H */
+#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET) */
-#endif /* defined(DYNAMIC_MODULES) && defined(PPC_TARGET) */
+#endif /* BACKENDS_PLUGINS_PPC_LOADER_H */
diff --git a/backends/plugins/elf/shorts-segment-manager.cpp b/backends/plugins/elf/shorts-segment-manager.cpp
index f444e9e717..17fe650c31 100644
--- a/backends/plugins/elf/shorts-segment-manager.cpp
+++ b/backends/plugins/elf/shorts-segment-manager.cpp
@@ -23,7 +23,9 @@
*
*/
-#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"
@@ -82,5 +84,6 @@ void ShortSegmentManager::deleteSegment(ShortSegmentManager::Segment *seg) {
delete seg;
}
-#endif /* DYNAMIC_MODULES && MIPS_TARGET */
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
+
diff --git a/backends/plugins/elf/shorts-segment-manager.h b/backends/plugins/elf/shorts-segment-manager.h
index c7cdcfe1f7..219648d91d 100644
--- a/backends/plugins/elf/shorts-segment-manager.h
+++ b/backends/plugins/elf/shorts-segment-manager.h
@@ -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 @@ private:
char *_highestAddress;
};
-#endif /* SHORTS_SEGMENT_MANAGER_H */
+#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
-#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
+#endif /* SHORTS_SEGMENT_MANAGER_H */