[Scummvm-cvs-logs] SF.net SVN: scummvm:[49368] scummvm/branches/gsoc2010-plugins/backends/ platform/ps2

toneman1138 at users.sourceforge.net toneman1138 at users.sourceforge.net
Tue Jun 1 03:05:09 CEST 2010


Revision: 49368
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49368&view=rev
Author:   toneman1138
Date:     2010-06-01 01:05:09 +0000 (Tue, 01 Jun 2010)

Log Message:
-----------
changed ps2 makefile and other files to use the ps2loader

Modified Paths:
--------------
    scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
    scummvm/branches/gsoc2010-plugins/backends/platform/ps2/module.mk
    scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2	2010-06-01 00:57:45 UTC (rev 49367)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2	2010-06-01 01:05:09 UTC (rev 49368)
@@ -2,11 +2,9 @@
  include $(PS2SDK)/Defs.make
 
 PS2_EXTRA = /home/tony/GSOC/ps2/sdk-extra
-PS2_EXTRA_INCS = /zlib/include /libmad/ee/include /isjpcm/ee/src /vorbis
-PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /isjpcm/ee/lib /vorbis /vorbis/tremor/.libs /vorbis/tremor
+PS2_EXTRA_INCS = /zlib/include /libmad/ee/include /SjPcm/ee/src /tremor
+PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /vorbis /tremor/tremor
 
-ENABLED=STATIC_PLUGIN
-
 ENABLE_SCUMM = $(ENABLED)
 ENABLE_SCUMM_7_8 = $(ENABLED)
 ENABLE_HE = $(ENABLED)
@@ -50,7 +48,6 @@
 
 DEFINES  = -DUSE_VORBIS -DUSE_MAD -DUSE_TREMOR -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar
 
-
 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
 
@@ -71,17 +68,37 @@
     backends/platform/ps2/systemps2.o \
     backends/platform/ps2/ps2mutex.o \
     backends/platform/ps2/ps2time.o \
-	backends/platform/ps2/ps2debug.o
+	backends/platform/ps2/ps2debug.o \
+	backends/platform/ps2/ps2loader.o
     
 MODULE_DIRS += .
 
 include $(srcdir)/Makefile.common
 
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile 
+# Set to 1 to enable, 0 to disable dynamic modules
+DYNAMIC_MODULES = 1
+
+# Variables for dynamic plugin building
+PLUGIN_PREFIX =
+PLUGIN_SUFFIX = .plg
+PLUGIN_EXTRA_DEPS = plugin.syms scummvm-ps2.elf
+PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols=scummvm-ps2.org.elf,-Tplugin.ld,--retain-symbols-file,plugin.syms -lstdc++ -lc
+
+# 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
+
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Tmain_prog.ld
 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++
-LDFLAGS += -s 
+LDFLAGS += -s
 
 all: $(TARGET)
 

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/module.mk
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/module.mk	2010-06-01 00:57:45 UTC (rev 49367)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/module.mk	2010-06-01 01:05:09 UTC (rev 49368)
@@ -16,7 +16,8 @@
     systemps2.o \
     ps2mutex.o \
     ps2time.o \
-	ps2debug.o
+	ps2debug.o \
+	ps2loader.o
 
 MODULE_DIRS += \
 	backends/platform/ps2/

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp	2010-06-01 00:57:45 UTC (rev 49367)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp	2010-06-01 01:05:09 UTC (rev 49368)
@@ -59,6 +59,8 @@
 #include "backends/platform/ps2/ps2debug.h"
 #include "backends/fs/ps2/ps2-fs-factory.h"
 
+#include "backends/plugins/ps2/ps2-provider.h"
+
 #include "backends/saves/default/default-saves.h"
 #include "common/config-manager.h"
 
@@ -132,6 +134,10 @@
 
 	g_systemPs2->init();
 
+#ifdef DYNAMIC_MODULES
+	PluginManager::instance().addPluginProvider(new PS2PluginProvider());
+#endif
+
 	sioprintf("init done. starting ScummVM.\n");
 	int res = scummvm_main(argc, argv);
 	sioprintf("scummvm_main terminated: %d\n", res);


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