mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Calculate the optimal memory location for overlay plugins, and use plugin.lds for linking them. This gets rid of hand-adjusted archos.lds, making it easy to use overlay plugins on other lowmem targets. * Fix some duplicate and incorrect dependencies. * Change the way libs are filtered, so that a lib can be specified more than once. This allows to get rid of explicitly linking gcc-support.o, fixing empty plugins on some simulator platforms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20163 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ce1c189d50
commit
c21e2e686f
11 changed files with 102 additions and 236 deletions
|
|
@ -18,30 +18,30 @@ OTHER_SRC += $(ROCKBOY_SRC)
|
|||
|
||||
ifndef SIMVER
|
||||
ifneq (,$(findstring RECORDER,$(TARGET)))
|
||||
## archos recorder targets
|
||||
ROCKBOY_INLDS := $(ROCKBOY_SRCDIR)/archos.lds
|
||||
## lowmem targets
|
||||
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl
|
||||
ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.link
|
||||
ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
|
||||
else
|
||||
### all other targets
|
||||
ROCKBOY_INLDS := $(APPSDIR)/plugins/plugin.lds
|
||||
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
|
||||
endif
|
||||
ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
|
||||
ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.lds
|
||||
else
|
||||
### simulator
|
||||
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
|
||||
ROCKBOY_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile
|
||||
endif
|
||||
|
||||
$(ROCKBOY_OUTLDS): $(ROCKBOY_INLDS) $(ROCKBOY_OBJ)
|
||||
$(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@)
|
||||
$(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ)
|
||||
|
||||
$(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB)
|
||||
$(ROCKBOY_OBJDIR)/rockboy.refmap: $(ROCKBOY_OBJ)
|
||||
|
||||
$(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB)
|
||||
$(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))
|
||||
|
||||
$(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS)
|
||||
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
|
||||
$(filter %.o, $^) \
|
||||
$(filter %.a, $^) \
|
||||
$(filter %.a, $+) \
|
||||
-lgcc $(ROCKBOY_OVLFLAGS)
|
||||
$(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue