2009-02-11 16:03:17 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2009-02-20 23:14:09 +00:00
|
|
|
GOBAN_SRCDIR := $(APPSDIR)/plugins/goban
|
|
|
|
GOBAN_BUILDDIR := $(BUILDDIR)/apps/plugins/goban
|
2009-02-11 16:03:17 +00:00
|
|
|
|
2009-02-20 23:14:09 +00:00
|
|
|
GOBAN_SRC := $(call preprocess, $(GOBAN_SRCDIR)/SOURCES)
|
2009-02-11 16:03:17 +00:00
|
|
|
GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC))
|
|
|
|
|
|
|
|
OTHER_SRC += $(GOBAN_SRC)
|
|
|
|
|
2010-07-10 13:49:49 +00:00
|
|
|
ifndef APP_TYPE
|
2009-02-20 23:14:09 +00:00
|
|
|
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
|
2009-03-02 00:16:44 +00:00
|
|
|
### lowmem targets
|
2009-02-20 23:14:09 +00:00
|
|
|
ROCKS += $(GOBAN_BUILDDIR)/goban.ovl
|
2009-03-02 00:16:44 +00:00
|
|
|
GOBAN_OUTLDS = $(GOBAN_BUILDDIR)/goban.link
|
|
|
|
GOBAN_OVLFLAGS = -T$(GOBAN_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
|
2009-02-20 23:14:09 +00:00
|
|
|
else
|
|
|
|
### all other targets
|
|
|
|
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
### simulator
|
|
|
|
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
|
|
|
|
endif
|
|
|
|
|
2009-03-02 00:16:44 +00:00
|
|
|
$(GOBAN_BUILDDIR)/goban.rock: $(GOBAN_OBJ)
|
2009-02-20 23:14:09 +00:00
|
|
|
|
2009-03-02 00:16:44 +00:00
|
|
|
$(GOBAN_BUILDDIR)/goban.refmap: $(GOBAN_OBJ)
|
|
|
|
|
|
|
|
$(GOBAN_OUTLDS): $(PLUGIN_LDS) $(GOBAN_BUILDDIR)/goban.refmap
|
|
|
|
$(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \
|
|
|
|
$(TOOLSDIR)/ovl_offset.pl $(GOBAN_BUILDDIR)/goban.refmap))
|
2009-02-20 23:14:09 +00:00
|
|
|
|
|
|
|
$(GOBAN_BUILDDIR)/goban.ovl: $(GOBAN_OBJ) $(GOBAN_OUTLDS)
|
|
|
|
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
|
|
|
|
$(filter %.o, $^) \
|
2009-03-02 00:16:44 +00:00
|
|
|
$(filter %.a, $+) \
|
2009-02-20 23:14:09 +00:00
|
|
|
-lgcc $(GOBAN_OVLFLAGS)
|
2012-04-04 19:43:22 +00:00
|
|
|
$(call PRINTS,LD $(@F))$(call objcopy,$(basename $@).elf,$@)
|