summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-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))
69endif 69endif
70endif 70endif
71 71
72# chessbox is too big to fit in the 32KB Archos plugin buffer, so we only
73# build for IRIVER and IPOD targets
74ifneq (,$(strip $(foreach tgt,IRIVER IPOD,$(findstring $(tgt),$(TARGET)))))
75ifneq (-DIRIVER_IFP7XX,$(TARGET))
76 SUBDIRS += chessbox
77endif
78endif
72 79
73.PHONY: $(SUBDIRS) 80.PHONY: $(SUBDIRS)
74all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) 81all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
@@ -186,10 +193,11 @@ $(LINKFILE): $(LDS)
186 @echo "build $@" 193 @echo "build $@"
187 $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ 194 $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
188 195
189$(SUBDIRS): 196$(SUBDIRS): $(BITMAPLIBS)
190 @echo "MAKE in $@" 197 @echo "MAKE in $@"
191 $(SILENT)mkdir -p $(OBJDIR)/$@ 198 $(SILENT)mkdir -p $(OBJDIR)/$@
192 $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ 199 $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
200 LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)"
193 201
194clean: 202clean:
195 @echo "cleaning plugins" 203 @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
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32ifndef SIMVER 32ifndef SIMVER
33$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) 33$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
34 @echo "LD "`basename $@` 34 @echo "LD "`basename $@`
35 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 35 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
36 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map 36 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map
37 37
38$(OUTPUT): $(OBJDIR)/chessbox.elf 38$(OUTPUT): $(OBJDIR)/chessbox.elf
39 @echo "OBJCOPY "`basename $@` 39 @echo "OBJCOPY "`basename $@`
@@ -46,7 +46,7 @@ ifeq ($(SIMVER), x11)
46 46
47$(OUTPUT): $(OBJS) 47$(OUTPUT): $(OBJS)
48 @echo "LD $<" 48 @echo "LD $<"
49 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 49 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
51# 'x' must be kept or you'll have "Win32 error 5" 51# 'x' must be kept or you'll have "Win32 error 5"
52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -62,7 +62,7 @@ ifeq ($(SIMVER), sdl)
62 62
63$(OUTPUT): $(OBJS) 63$(OUTPUT): $(OBJS)
64 @echo "LD $<" 64 @echo "LD $<"
65 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 65 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
67# 'x' must be kept or you'll have "Win32 error 5" 67# 'x' must be kept or you'll have "Win32 error 5"
68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -81,7 +81,7 @@ $(OUTPUT): $(OBJS)
81 @echo "DLL "`basename $@` 81 @echo "DLL "`basename $@`
82 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 82 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
83 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 83 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
84 $(BUILDDIR)/libplugin.a -o $@ 84 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
85ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 85ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
86# 'x' must be kept or you'll have "Win32 error 5" 86# 'x' must be kept or you'll have "Win32 error 5"
87# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 87# $ 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) {
292 int button = BUTTON_NONE; 292 int button = BUTTON_NONE;
293 int marked = false , from_marked = false ; 293 int marked = false , from_marked = false ;
294 short marked_x = 0 , marked_y = 0 ; 294 short marked_x = 0 , marked_y = 0 ;
295 struct cb_command result; 295 struct cb_command result = { 0, {0,0,0,0,0}, 0 };
296 296
297 cb_switch ( x , y ); 297 cb_switch ( x , y );
298 /* main loop */ 298 /* main loop */