1
0
Fork 0
forked from len0rd/rockbox
foxbox/apps/plugins/goban/goban.make
Mustapha Senhaji 37183be69c FS#9901 by Joshua Simmons for the Goban plugin: Goban overlay for the Archos targets.
This is a first try to enable this plugin for low memory targets like our old archoses :)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20069 a1c6a512-1295-4272-9138-f99709370657
2009-02-20 23:14:09 +00:00

48 lines
1.6 KiB
Makefile

# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
GOBAN_SRCDIR := $(APPSDIR)/plugins/goban
GOBAN_BUILDDIR := $(BUILDDIR)/apps/plugins/goban
GOBAN_SRC := $(call preprocess, $(GOBAN_SRCDIR)/SOURCES)
GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC))
OTHER_SRC += $(GOBAN_SRC)
ifndef SIMVER
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
### archos recorder targets
GOBAN_INLDS := $(GOBAN_SRCDIR)/archos.lds
ROCKS += $(GOBAN_BUILDDIR)/goban.ovl
else
### all other targets
GOBAN_INLDS := $(APPSDIR)/plugins/plugin.lds
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
endif
GOBAN_OVLFLAGS = -T$(GOBAN_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
GOBAN_OUTLDS = $(GOBAN_BUILDDIR)/goban.lds
else
### simulator
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
GOBAN_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile
endif
$(GOBAN_OUTLDS): $(GOBAN_INLDS) $(GOBAN_OBJ)
$(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@)
$(GOBAN_BUILDDIR)/goban.rock: $(GOBAN_OBJ) $(GOBAN_OUTLDS)
$(GOBAN_BUILDDIR)/goban.ovl: $(GOBAN_OBJ) $(GOBAN_OUTLDS)
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(GOBAN_OVLFLAGS)
$(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@