forked from len0rd/rockbox
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
This commit is contained in:
parent
ba4991cc19
commit
6e075ebc9e
3 changed files with 16 additions and 8 deletions
|
@ -69,6 +69,13 @@ ifneq (-DIRIVER_IFP7XX,$(TARGET))
|
||||||
endif
|
endif
|
||||||
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)
|
.PHONY: $(SUBDIRS)
|
||||||
all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
|
all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
|
||||||
|
@ -186,10 +193,11 @@ $(LINKFILE): $(LDS)
|
||||||
@echo "build $@"
|
@echo "build $@"
|
||||||
$(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
|
$(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
|
||||||
|
|
||||||
$(SUBDIRS):
|
$(SUBDIRS): $(BITMAPLIBS)
|
||||||
@echo "MAKE in $@"
|
@echo "MAKE in $@"
|
||||||
$(SILENT)mkdir -p $(OBJDIR)/$@
|
$(SILENT)mkdir -p $(OBJDIR)/$@
|
||||||
$(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@
|
$(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
|
||||||
|
LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "cleaning plugins"
|
@echo "cleaning plugins"
|
||||||
|
|
|
@ -30,10 +30,10 @@ OUTPUT = $(OUTDIR)/chessbox.rock
|
||||||
all: $(OUTPUT)
|
all: $(OUTPUT)
|
||||||
|
|
||||||
ifndef SIMVER
|
ifndef SIMVER
|
||||||
$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE)
|
$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
|
||||||
@echo "LD "`basename $@`
|
@echo "LD "`basename $@`
|
||||||
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
|
@$(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
|
$(OUTPUT): $(OBJDIR)/chessbox.elf
|
||||||
@echo "OBJCOPY "`basename $@`
|
@echo "OBJCOPY "`basename $@`
|
||||||
|
@ -46,7 +46,7 @@ ifeq ($(SIMVER), x11)
|
||||||
|
|
||||||
$(OUTPUT): $(OBJS)
|
$(OUTPUT): $(OBJS)
|
||||||
@echo "LD $<"
|
@echo "LD $<"
|
||||||
@$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
@$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
|
||||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||||
# 'x' must be kept or you'll have "Win32 error 5"
|
# 'x' must be kept or you'll have "Win32 error 5"
|
||||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||||
|
@ -62,7 +62,7 @@ ifeq ($(SIMVER), sdl)
|
||||||
|
|
||||||
$(OUTPUT): $(OBJS)
|
$(OUTPUT): $(OBJS)
|
||||||
@echo "LD $<"
|
@echo "LD $<"
|
||||||
@$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
@$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
|
||||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||||
# 'x' must be kept or you'll have "Win32 error 5"
|
# 'x' must be kept or you'll have "Win32 error 5"
|
||||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||||
|
@ -81,7 +81,7 @@ $(OUTPUT): $(OBJS)
|
||||||
@echo "DLL "`basename $@`
|
@echo "DLL "`basename $@`
|
||||||
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
|
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
|
||||||
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
|
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
|
||||||
$(BUILDDIR)/libplugin.a -o $@
|
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
|
||||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||||
# 'x' must be kept or you'll have "Win32 error 5"
|
# 'x' must be kept or you'll have "Win32 error 5"
|
||||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||||
|
|
|
@ -292,7 +292,7 @@ struct cb_command cb_getcommand (void) {
|
||||||
int button = BUTTON_NONE;
|
int button = BUTTON_NONE;
|
||||||
int marked = false , from_marked = false ;
|
int marked = false , from_marked = false ;
|
||||||
short marked_x = 0 , marked_y = 0 ;
|
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 );
|
cb_switch ( x , y );
|
||||||
/* main loop */
|
/* main loop */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue