aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2
diff options
context:
space:
mode:
authorYotam Barnoy2010-10-31 11:08:43 +0000
committerYotam Barnoy2010-10-31 11:08:43 +0000
commit94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1 (patch)
tree3df2a4ae7967c56d464729669fc06ce4e93dff36 /backends/platform/ps2
parent8df4278ba8cfbf71228e1927f9db635a9a30a57f (diff)
parentdca3c8d8bfc6c4db38cf8e8291818dd472041d4e (diff)
downloadscummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.tar.gz
scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.tar.bz2
scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.zip
Updated with latest from trunk
svn-id: r53976
Diffstat (limited to 'backends/platform/ps2')
-rw-r--r--backends/platform/ps2/Makefile.gdb8
-rw-r--r--backends/platform/ps2/Makefile.ps2102
-rw-r--r--backends/platform/ps2/fileio.cpp3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst10
-rw-r--r--backends/platform/ps2/systemps2.cpp3
5 files changed, 49 insertions, 77 deletions
diff --git a/backends/platform/ps2/Makefile.gdb b/backends/platform/ps2/Makefile.gdb
index 53646a9546..48dcebc1d4 100644
--- a/backends/platform/ps2/Makefile.gdb
+++ b/backends/platform/ps2/Makefile.gdb
@@ -51,7 +51,7 @@ INCDIR = ../../../
DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -D__PS2_DEBUG__ -g -Wall -Wno-multichar
-INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
+INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
INCLUDES += -I $(PS2GDB)/ee -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
TARGET = elf/scummvm.elf
@@ -72,16 +72,16 @@ OBJS := backends/platform/ps2/DmaPipe.o \
backends/platform/ps2/ps2mutex.o \
backends/platform/ps2/ps2time.o \
backends/platform/ps2/ps2debug.o
-
+
MODULE_DIRS += .
BACKEND := ps2
include $(srcdir)/Makefile.common
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
LDFLAGS += -L $(PS2GDB)/lib -L $(PS2SDK)/ee/lib -L .
-LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
+LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lps2gdbStub -lps2ip -ldebug -lkernel -lstdc++
all: $(TARGET)
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2
index 8c81341253..472ba5ec3a 100644
--- a/backends/platform/ps2/Makefile.ps2
+++ b/backends/platform/ps2/Makefile.ps2
@@ -1,45 +1,22 @@
# $Header: Exp $
include $(PS2SDK)/Defs.make
-PS2_EXTRA = /home/tony/GSOC/ps2/sdk-extra
+PS2_EXTRA = /works/devel/ps2/sdk-extra
PS2_EXTRA_INCS = /zlib/include /libmad/ee/include /SjPcm/ee/src /tremor
PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /tremor/tremor
-# Set to 1 to enable, 0 to disable dynamic modules
-DYNAMIC_MODULES = 1
-# Set to 1 to enable, 0 to disable more detailed printing of gcc commands
-VERBOSE_BUILD=0
-
-# Test for dynamic plugins
-ifeq ($(DYNAMIC_MODULES),1)
-ENABLED = DYNAMIC_PLUGIN
-DEFINES = -DDYNAMIC_MODULES
-PRE_OBJS_FLAGS = -Wl,--whole-archive
-POST_OBJS_FLAGS = -Wl,--no-whole-archive
-else
-ENABLED = STATIC_PLUGIN
-endif
-
-#control build
-DISABLE_SCALERS = true
-DISABLE_HQ_SCALERS = true
+ENABLED=STATIC_PLUGIN
ENABLE_SCUMM = $(ENABLED)
ENABLE_SCUMM_7_8 = $(ENABLED)
ENABLE_HE = $(ENABLED)
ENABLE_AGI = $(ENABLED)
ENABLE_AGOS = $(ENABLED)
-ENABLE_AGOS2 = $(ENABLED)
ENABLE_CINE = $(ENABLED)
ENABLE_CRUISE = $(ENABLED)
-ENABLE_DRACI = $(ENABLED)
ENABLE_DRASCULA = $(ENABLED)
ENABLE_GOB = $(ENABLED)
-ENABLE_GROOVIE = $(ENABLED)
-# ENABLE_GROOVIE2 = $(ENABLED)
-ENABLE_IHNM = $(ENABLED)
ENABLE_KYRA = $(ENABLED)
-# ENABLE_LOL = $(ENABLED)
ENABLE_LURE = $(ENABLED)
# ENABLE_M4 = $(ENABLED)
ENABLE_MADE = $(ENABLED)
@@ -47,18 +24,16 @@ ENABLE_PARALLACTION = $(ENABLED)
ENABLE_QUEEN = $(ENABLED)
ENABLE_SAGA = $(ENABLED)
ENABLE_SAGA2 = $(ENABLED)
-ENABLE_SCI = $(ENABLED)
-# ENABLE_SCI32 = $(ENABLED)
+ENABLE_IHNM = $(ENABLED)
ENABLE_SKY = $(ENABLED)
ENABLE_SWORD1 = $(ENABLED)
ENABLE_SWORD2 = $(ENABLED)
-ENABLE_TEENAGENT = $(ENABLED)
-ENABLE_TINSEL = $(ENABLED)
+# ENABLE_TINSEL = $(ENABLED)
ENABLE_TOUCHE = $(ENABLED)
-ENABLE_TUCKER = $(ENABLED)
HAVE_GCC3 = true
-CC = ee-gcc
+
+CC = ee-gcc
CXX = ee-g++
AS = ee-gcc
LD = ee-gcc
@@ -67,60 +42,51 @@ RANLIB = ee-ranlib
STRIP = ee-strip
MKDIR = mkdir -p
RM = rm -f
-RM_REC = rm -rf
-MODULE_DIRS = ./
srcdir = ../../..
VPATH = $(srcdir)
INCDIR = ../../../
-DEPDIR = .deps
+# DEPDIR = .deps
-TARGET = elf/scummvm.elf
+DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar
-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 += -DUSE_ELF_LOADER -DMIPS_TARGET -DONE_PLUGIN_AT_A_TIME
-INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
+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
-CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP
-
-# Variables for dynamic plugin building
-PLUGIN_PREFIX =
-PLUGIN_SUFFIX = .plg
-PLUGIN_EXTRA_DEPS = $(srcdir)/backends/plugins/elf/plugin.syms elf/scummvm.elf
-PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o
-PLUGIN_LDFLAGS += -nostartfiles -Wl,-q,--just-symbols,elf/scummvm.elf,-T$(srcdir)/backends/plugins/ps2/plugin.ld,--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms -lstdc++ -lc
+TARGET = elf/scummvm.elf
+OBJS := backends/platform/ps2/DmaPipe.o \
+ backends/platform/ps2/Gs2dScreen.o \
+ backends/platform/ps2/irxboot.o \
+ backends/platform/ps2/ps2input.o \
+ backends/platform/ps2/ps2pad.o \
+ backends/platform/ps2/savefilemgr.o \
+ backends/platform/ps2/fileio.o \
+ backends/platform/ps2/asyncfio.o \
+ backends/platform/ps2/icon.o \
+ backends/platform/ps2/cd.o \
+ backends/platform/ps2/eecodyvdfs.o \
+ backends/platform/ps2/rpckbd.o \
+ backends/platform/ps2/systemps2.o \
+ backends/platform/ps2/ps2mutex.o \
+ backends/platform/ps2/ps2time.o \
+ backends/platform/ps2/ps2debug.o
+
+MODULE_DIRS += .
BACKEND := ps2
-LDFLAGS = -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(srcdir)/backends/plugins/ps2/main_prog.ld
+include $(srcdir)/Makefile.common
+
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
LDFLAGS += -L $(PS2SDK)/ee/lib -L .
LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
-LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
-
-OBJS := $(srcdir)/backends/platform/ps2/DmaPipe.o \
- $(srcdir)/backends/platform/ps2/Gs2dScreen.o \
- $(srcdir)/backends/platform/ps2/irxboot.o \
- $(srcdir)/backends/platform/ps2/ps2input.o \
- $(srcdir)/backends/platform/ps2/ps2pad.o \
- $(srcdir)/backends/platform/ps2/savefilemgr.o \
- $(srcdir)/backends/platform/ps2/fileio.o \
- $(srcdir)/backends/platform/ps2/asyncfio.o \
- $(srcdir)/backends/platform/ps2/icon.o \
- $(srcdir)/backends/platform/ps2/cd.o \
- $(srcdir)/backends/platform/ps2/eecodyvdfs.o \
- $(srcdir)/backends/platform/ps2/rpckbd.o \
- $(srcdir)/backends/platform/ps2/systemps2.o \
- $(srcdir)/backends/platform/ps2/ps2mutex.o \
- $(srcdir)/backends/platform/ps2/ps2time.o \
- $(srcdir)/backends/platform/ps2/ps2debug.o
-
-include $(srcdir)/Makefile.common
+LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
+LDFLAGS += -s
all: $(TARGET)
$(TARGET): $(OBJS)
- $(LD) $(PRE_OBJS_FLAGS) $(OBJS) $(POST_OBJS_FLAGS) $(LDFLAGS) -o $@
+ $(LD) $^ $(LDFLAGS) -o $@
diff --git a/backends/platform/ps2/fileio.cpp b/backends/platform/ps2/fileio.cpp
index 8c10156aaf..826a2578e4 100644
--- a/backends/platform/ps2/fileio.cpp
+++ b/backends/platform/ps2/fileio.cpp
@@ -23,6 +23,9 @@
*
*/
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "backends/platform/ps2/fileio.h"
#include <tamtypes.h>
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
index d3ed3b0442..eb85e04462 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
@@ -24,10 +24,10 @@ I_DelDrv
iomanX_IMPORTS_end
sifcmd_IMPORTS_start
-I_sceSifInitRpc
-I_sceSifSetRpcQueue
-I_sceSifRegisterRpc
-I_sceSifRpcLoop
+I_sceSifInitRpc
+I_sceSifSetRpcQueue
+I_sceSifRegisterRpc
+I_sceSifRpcLoop
sifcmd_IMPORTS_end
stdio_IMPORTS_start
@@ -59,7 +59,7 @@ thbase_IMPORTS_start
I_CreateThread
I_StartThread
I_GetThreadId
-I_DelayThread
+I_DelayThread
thbase_IMPORTS_end
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 357404c5c4..d525a35b7d 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -23,6 +23,9 @@
*
*/
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include <kernel.h>
#include <stdio.h>
#include <stdlib.h>