diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/Makefile | 12 | ||||
-rw-r--r-- | apps/plugins/chessbox/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox.c | 2 |
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)) | |||
69 | endif | 69 | endif |
70 | endif | 70 | endif |
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 | ||
74 | ifneq (,$(strip $(foreach tgt,IRIVER IPOD,$(findstring $(tgt),$(TARGET))))) | ||
75 | ifneq (-DIRIVER_IFP7XX,$(TARGET)) | ||
76 | SUBDIRS += chessbox | ||
77 | endif | ||
78 | endif | ||
72 | 79 | ||
73 | .PHONY: $(SUBDIRS) | 80 | .PHONY: $(SUBDIRS) |
74 | all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) | 81 | all: $(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 | ||
194 | clean: | 202 | clean: |
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 | |||
30 | all: $(OUTPUT) | 30 | all: $(OUTPUT) |
31 | 31 | ||
32 | ifndef SIMVER | 32 | ifndef 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 $@ |
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 50 | ifeq ($(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 $@ |
66 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 66 | ifeq ($(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 $@ |
85 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 85 | ifeq ($(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 */ |