summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-23 10:02:48 +0000
committerDave Chapman <dave@dchapman.com>2006-02-23 10:02:48 +0000
commit6e075ebc9e7ad907e79a42096d816a7a94cf5596 (patch)
tree9ae92bd45b0b18a72f431c884727d4ddb3ebcde2
parentba4991cc194dafd867a000fe410b7fce29b3b64d (diff)
downloadrockbox-6e075ebc9e7ad907e79a42096d816a7a94cf5596.tar.gz
rockbox-6e075ebc9e7ad907e79a42096d816a7a94cf5596.zip
Add chessbox to the build system (currently only for iRiver H1x0/H3x0 and iPods - it is too large for the Archos plugin buffer)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8798 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/Makefile12
-rw-r--r--apps/plugins/chessbox/Makefile10
-rw-r--r--apps/plugins/chessbox/chessbox.c2
3 files changed, 16 insertions, 8 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
index 404f1662e2..3da2d46895 100644
--- a/apps/plugins/Makefile
+++ b/apps/plugins/Makefile
@@ -69,6 +69,13 @@ ifneq (-DIRIVER_IFP7XX,$(TARGET))
endif
endif
+# chessbox is too big to fit in the 32KB Archos plugin buffer, so we only
+# build for IRIVER and IPOD targets
+ifneq (,$(strip $(foreach tgt,IRIVER IPOD,$(findstring $(tgt),$(TARGET)))))
+ifneq (-DIRIVER_IFP7XX,$(TARGET))
+ SUBDIRS += chessbox
+endif
+endif
.PHONY: $(SUBDIRS)
all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
@@ -186,10 +193,11 @@ $(LINKFILE): $(LDS)
@echo "build $@"
$(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
-$(SUBDIRS):
+$(SUBDIRS): $(BITMAPLIBS)
@echo "MAKE in $@"
$(SILENT)mkdir -p $(OBJDIR)/$@
- $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@
+ $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
+ LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)"
clean:
@echo "cleaning plugins"
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile
index 3d9f024ba3..be75b2c5e1 100644
--- a/apps/plugins/chessbox/Makefile
+++ b/apps/plugins/chessbox/Makefile
@@ -30,10 +30,10 @@ OUTPUT = $(OUTDIR)/chessbox.rock
all: $(OUTPUT)
ifndef SIMVER
-$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE)
+$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
@echo "LD "`basename $@`
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
- -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map
+ $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map
$(OUTPUT): $(OBJDIR)/chessbox.elf
@echo "OBJCOPY "`basename $@`
@@ -46,7 +46,7 @@ ifeq ($(SIMVER), x11)
$(OUTPUT): $(OBJS)
@echo "LD $<"
- @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@
+ @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -62,7 +62,7 @@ ifeq ($(SIMVER), sdl)
$(OUTPUT): $(OBJS)
@echo "LD $<"
- @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@
+ @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -81,7 +81,7 @@ $(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
- $(BUILDDIR)/libplugin.a -o $@
+ $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c
index 6cf77b4347..d16497dc6a 100644
--- a/apps/plugins/chessbox/chessbox.c
+++ b/apps/plugins/chessbox/chessbox.c
@@ -292,7 +292,7 @@ struct cb_command cb_getcommand (void) {
int button = BUTTON_NONE;
int marked = false , from_marked = false ;
short marked_x = 0 , marked_y = 0 ;
- struct cb_command result;
+ struct cb_command result = { 0, {0,0,0,0,0}, 0 };
cb_switch ( x , y );
/* main loop */