mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
add a plugin_ram_end symbol to plugin.lds and rewrite ovl_offset.pl to read plugin_ram_end and plugin_load_end_addr from the elf via nm. this removes all dependence on the linker map file format, which differs between gnu ld and lld. Change-Id: I66e623d9a2b44eb84ae7035155c84d8afe46df23
39 lines
1.3 KiB
Makefile
39 lines
1.3 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 APP_TYPE
|
|
### all targets
|
|
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
|
|
else
|
|
### simulator
|
|
ROCKS += $(GOBAN_BUILDDIR)/goban.rock
|
|
endif
|
|
|
|
$(GOBAN_BUILDDIR)/goban.rock: $(GOBAN_OBJ)
|
|
|
|
$(GOBAN_BUILDDIR)/goban.refmap: $(GOBAN_OBJ)
|
|
|
|
$(GOBAN_OUTLDS): $(PLUGIN_LDS) $(GOBAN_BUILDDIR)/goban.refmap
|
|
$(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \
|
|
$(TOOLSDIR)/ovl_offset.pl $(GOBAN_BUILDDIR)/goban.refelf))
|
|
|
|
$(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))$(call objcopy_plugin,$(basename $@).elf,$@)
|