2008-11-20 11:27:31 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
2008-11-25 19:54:23 +00:00
|
|
|
# $Id$
|
2008-11-20 11:27:31 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy
|
|
|
|
ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy
|
|
|
|
|
|
|
|
ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES)
|
2010-05-06 21:04:40 +00:00
|
|
|
ROCKBOY_SRC += $(ROOTDIR)/firmware/libc/sscanf.c
|
2008-11-20 11:27:31 +00:00
|
|
|
ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC))
|
|
|
|
|
|
|
|
OTHER_SRC += $(ROCKBOY_SRC)
|
|
|
|
|
|
|
|
ifndef SIMVER
|
|
|
|
ifneq (,$(findstring RECORDER,$(TARGET)))
|
2009-03-02 00:16:44 +00:00
|
|
|
## lowmem targets
|
2008-11-20 11:27:31 +00:00
|
|
|
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl
|
2009-03-02 00:16:44 +00:00
|
|
|
ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.link
|
|
|
|
ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
|
2008-11-20 11:27:31 +00:00
|
|
|
else
|
|
|
|
### all other targets
|
|
|
|
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
### simulator
|
|
|
|
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
|
|
|
|
endif
|
|
|
|
|
2009-03-02 00:16:44 +00:00
|
|
|
$(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ)
|
|
|
|
|
|
|
|
$(ROCKBOY_OBJDIR)/rockboy.refmap: $(ROCKBOY_OBJ)
|
2008-11-20 11:27:31 +00:00
|
|
|
|
2009-03-02 00:16:44 +00:00
|
|
|
$(ROCKBOY_OUTLDS): $(PLUGIN_LDS) $(ROCKBOY_OBJDIR)/rockboy.refmap
|
|
|
|
$(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \
|
|
|
|
$(TOOLSDIR)/ovl_offset.pl $(ROCKBOY_OBJDIR)/rockboy.refmap))
|
2008-11-20 11:27:31 +00:00
|
|
|
|
2009-03-02 00:16:44 +00:00
|
|
|
$(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS)
|
2008-11-21 22:00:35 +00:00
|
|
|
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
|
2008-11-20 11:27:31 +00:00
|
|
|
$(filter %.o, $^) \
|
2009-03-02 00:16:44 +00:00
|
|
|
$(filter %.a, $+) \
|
2008-11-20 11:27:31 +00:00
|
|
|
-lgcc $(ROCKBOY_OVLFLAGS)
|
2008-11-21 22:00:35 +00:00
|
|
|
$(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@
|