aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/gph
diff options
context:
space:
mode:
authorDavid-John Willis2011-04-11 18:22:58 +0100
committerDavid-John Willis2011-04-11 18:22:58 +0100
commit6f1c7cf30ac3c36d6ececdadc77ff5cfac3dce66 (patch)
treeb9e2eb02ba30f9bb0eda77dc7618eb0c88049d29 /backends/platform/gph
parentbb6bc31813e77b5547b365dc401c0b239952d7c3 (diff)
downloadscummvm-rg350-6f1c7cf30ac3c36d6ececdadc77ff5cfac3dce66.tar.gz
scummvm-rg350-6f1c7cf30ac3c36d6ececdadc77ff5cfac3dce66.tar.bz2
scummvm-rg350-6f1c7cf30ac3c36d6ececdadc77ff5cfac3dce66.zip
GPH: Change backend to mask backend code to GPH_DEVICE.
* This is mainly to make it easy to drop the old GP2X into the same codebase (I really have no desire to manage 2 sets of 99.9% identical code ;)). * Code paths for just one of the supported devices can be runtime worked out or just defined for that device. mount.sh: Fixed some small errors# ../../../../scummvm.gph
Diffstat (limited to 'backends/platform/gph')
-rw-r--r--backends/platform/gph/gp2x-bundle.mk60
-rw-r--r--backends/platform/gph/gph-main.cpp2
-rw-r--r--backends/platform/gph/gph-sdl.h2
3 files changed, 62 insertions, 2 deletions
diff --git a/backends/platform/gph/gp2x-bundle.mk b/backends/platform/gph/gp2x-bundle.mk
new file mode 100644
index 0000000000..67d22d1889
--- /dev/null
+++ b/backends/platform/gph/gp2x-bundle.mk
@@ -0,0 +1,60 @@
+# Special target to create bundles for the GP2X.
+
+bundle_name = release/scummvm-gp2x
+
+gp2x-bundle: $(EXECUTABLE)
+ $(MKDIR) "$(bundle_name)"
+ $(MKDIR) "$(bundle_name)/saves"
+ $(MKDIR) "$(bundle_name)/engine-data"
+
+ echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
+
+ $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.png $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gp2x/build/README-GP2X $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gp2x/build/mmuhack.o $(bundle_name)/
+
+ $(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/
+ $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
+ $(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/engine-data
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/
+
+ $(STRIP) $(EXECUTABLE) -o $(bundle_name)/$(EXECUTABLE)
+
+ifdef DYNAMIC_MODULES
+ $(INSTALL) -d "$(bundle_name)/plugins"
+ $(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/plugins"
+ $(STRIP) $(bundle_name)/plugins/*
+endif
+
+ tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
+ rm -R ./$(bundle_name)
+
+gp2x-bundle-debug: $(EXECUTABLE)
+ $(MKDIR) "$(bundle_name)"
+ $(MKDIR) "$(bundle_name)/saves"
+ $(MKDIR) "$(bundle_name)/engine-data"
+
+ echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
+
+ $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.png $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gp2x/build/README-GP2X $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gp2x/build/mmuhack.o $(bundle_name)/
+
+ $(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/
+ $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
+ $(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/engine-data
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/
+
+ $(INSTALL) -c -m 777 $(srcdir)/$(EXECUTABLE) $(bundle_name)/$(EXECUTABLE)
+
+ifdef DYNAMIC_MODULES
+ $(INSTALL) -d "$(bundle_name)/scummvm/plugins"
+ $(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
+endif
+
+ tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
+ rm -R ./$(bundle_name)
+
+.PHONY: gp2x-bundle gp2x-bundle-debug
diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp
index c7d691fc66..f91ec8f478 100644
--- a/backends/platform/gph/gph-main.cpp
+++ b/backends/platform/gph/gph-main.cpp
@@ -24,7 +24,7 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
int main(int argc, char *argv[]) {
diff --git a/backends/platform/gph/gph-sdl.h b/backends/platform/gph/gph-sdl.h
index ef696bc3d8..51c609d29e 100644
--- a/backends/platform/gph/gph-sdl.h
+++ b/backends/platform/gph/gph-sdl.h
@@ -23,7 +23,7 @@
#ifndef GPH_H
#define GPH_H
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/base-backend.h"
#include "backends/platform/sdl/sdl.h"