From 681cedb4d8e55647fd3a125cdd2966c7d2ccd200 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Tue, 18 May 2010 14:14:53 +0000 Subject: Build overlay plugins for all targets with PLUGIN_BUFFER <= 0x10000 bytes Bring Clipv1 & m200v4 plugin buffer down to this limit zxbox, chessbox and rockboy build on the clip rockboy doesn't build on m200v4 due to not enough buttons to make a keymap Some gameboy roms won't run on Clipv1: tetris does but not pokemon for example git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26144 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/BUILD_OVERLAY | 9 +++++++++ apps/plugins/SOURCES | 3 ++- apps/plugins/SUBDIRS | 1 + apps/plugins/chessbox.c | 3 --- apps/plugins/chessbox/chessbox.make | 8 +------- apps/plugins/rockboy.c | 3 --- apps/plugins/rockboy/rockboy.make | 8 +------- apps/plugins/zxbox.c | 3 --- apps/plugins/zxbox/zxbox.make | 2 +- 9 files changed, 15 insertions(+), 25 deletions(-) create mode 100644 apps/plugins/BUILD_OVERLAY (limited to 'apps') diff --git a/apps/plugins/BUILD_OVERLAY b/apps/plugins/BUILD_OVERLAY new file mode 100644 index 0000000000..f792b0e9a4 --- /dev/null +++ b/apps/plugins/BUILD_OVERLAY @@ -0,0 +1,9 @@ +#include "config.h" + +/* this file is processed by makefiles + * they will grep for "YES" to see if overlay plugins must be built + */ + +#if PLUGIN_BUFFER_SIZE <= 0x10000 && !defined(SIMULATOR) +YES +#endif diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 4e6079ac59..6a126f3f14 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -70,7 +70,8 @@ iriverify.c /* Overlays loaders */ #if PLUGIN_BUFFER_SIZE <= 0x10000 && defined(HAVE_LCD_BITMAP) -#if CONFIG_KEYPAD != ONDIO_PAD /* not enough buttons for rockboy */ +#if CONFIG_KEYPAD != ONDIO_PAD && CONFIG_KEYPAD != SANSA_M200_PAD +/* not enough buttons for rockboy */ rockboy.c #endif diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 18d9db8ef2..b74d3fad30 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -12,6 +12,7 @@ clock #ifdef HAVE_LCD_BITMAP #if (CONFIG_KEYPAD != ONDIO_PAD) /* not enough buttons */ \ + && (CONFIG_KEYPAD != SANSA_M200_PAD) /* not enough buttons */ \ && (LCD_PIXELFORMAT != HORIZONTAL_PACKING) /* TODO */ \ && (LCD_PIXELFORMAT != VERTICAL_INTERLEAVED) /* TODO */ \ && (defined(HAVE_LCD_COLOR) || (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) || \ diff --git a/apps/plugins/chessbox.c b/apps/plugins/chessbox.c index 3eace4ca22..a6db7ba949 100644 --- a/apps/plugins/chessbox.c +++ b/apps/plugins/chessbox.c @@ -22,8 +22,6 @@ ****************************************************************************/ #include "plugin.h" -#if MEM <= 8 && !defined(SIMULATOR) - #include "lib/overlay.h" PLUGIN_HEADER @@ -33,4 +31,3 @@ enum plugin_status plugin_start(const void* parameter) { return run_overlay(parameter, PLUGIN_GAMES_DIR "/chessbox.ovl", "ChessBox"); } -#endif diff --git a/apps/plugins/chessbox/chessbox.make b/apps/plugins/chessbox/chessbox.make index 7611b5bb1a..357130cb74 100644 --- a/apps/plugins/chessbox/chessbox.make +++ b/apps/plugins/chessbox/chessbox.make @@ -15,18 +15,12 @@ CHESSBOX_OBJ := $(call c2obj, $(CHESSBOX_SRC)) OTHER_SRC += $(CHESSBOX_SRC) -ifndef SIMVER -ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) +ifeq ($(findstring YES, $(call preprocess, $(APPSDIR)/plugins/BUILD_OVERLAY)), YES) ### lowmem targets ROCKS += $(CHESSBOX_OBJDIR)/chessbox.ovl CHESSBOX_OUTLDS = $(CHESSBOX_OBJDIR)/chessbox.link CHESSBOX_OVLFLAGS = -T$(CHESSBOX_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map else - ### all other targets - ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock -endif -else - ### simulator ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock endif diff --git a/apps/plugins/rockboy.c b/apps/plugins/rockboy.c index 5d67ed0840..bd72dea1f8 100644 --- a/apps/plugins/rockboy.c +++ b/apps/plugins/rockboy.c @@ -22,8 +22,6 @@ ****************************************************************************/ #include "plugin.h" -#if MEM <= 8 && !defined(SIMULATOR) - #include "lib/overlay.h" PLUGIN_HEADER @@ -33,4 +31,3 @@ enum plugin_status plugin_start(const void* parameter) { return run_overlay(parameter, VIEWERS_DIR "/rockboy.ovl", "RockBoy"); } -#endif diff --git a/apps/plugins/rockboy/rockboy.make b/apps/plugins/rockboy/rockboy.make index 81e9a1f798..d7ae68c0c4 100644 --- a/apps/plugins/rockboy/rockboy.make +++ b/apps/plugins/rockboy/rockboy.make @@ -16,18 +16,12 @@ ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) OTHER_SRC += $(ROCKBOY_SRC) -ifndef SIMVER -ifneq (,$(findstring RECORDER,$(TARGET))) +ifeq ($(findstring YES, $(call preprocess, $(APPSDIR)/plugins/BUILD_OVERLAY)), YES) ## lowmem targets ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.link ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map else - ### all other targets - ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock -endif -else - ### simulator ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock endif diff --git a/apps/plugins/zxbox.c b/apps/plugins/zxbox.c index 3edff78554..94f7807bad 100644 --- a/apps/plugins/zxbox.c +++ b/apps/plugins/zxbox.c @@ -19,8 +19,6 @@ ****************************************************************************/ #include "plugin.h" -#if MEM <= 8 && !defined(SIMULATOR) - #include "lib/overlay.h" PLUGIN_HEADER @@ -30,4 +28,3 @@ enum plugin_status plugin_start(const void* parameter) { return run_overlay(parameter, VIEWERS_DIR "/zxbox.ovl", "ZXBox"); } -#endif diff --git a/apps/plugins/zxbox/zxbox.make b/apps/plugins/zxbox/zxbox.make index c209d20ca1..de7312e009 100644 --- a/apps/plugins/zxbox/zxbox.make +++ b/apps/plugins/zxbox/zxbox.make @@ -16,7 +16,7 @@ ZXBOX_OBJ := $(call c2obj, $(ZXBOX_SRC)) OTHER_SRC += $(ZXBOX_SRC) ifndef SIMVER -ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) +ifeq ($(findstring YES, $(call preprocess, $(APPSDIR)/plugins/BUILD_OVERLAY)), YES) ## lowmem targets ROCKS += $(ZXBOX_OBJDIR)/zxbox.ovl ZXBOX_OUTLDS = $(ZXBOX_OBJDIR)/zxbox.link -- cgit v1.2.3