forked from len0rd/rockbox
Move supprt-arm.S to separate library.
Core, codecs and plugins link it separately so this gets rid of SOURCES trickery. Don't build it for hosted targets. Change-Id: If15ef90e93cd218a4352ae8e89eea95d3122452f
This commit is contained in:
parent
4343011955
commit
cf333a61c7
9 changed files with 40 additions and 17 deletions
|
@ -201,7 +201,7 @@ $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB
|
||||||
$(CODECLIB) \
|
$(CODECLIB) \
|
||||||
-lgcc $(subst .map,-pre.map,$(CODECLDFLAGS))
|
-lgcc $(subst .map,-pre.map,$(CODECLDFLAGS))
|
||||||
|
|
||||||
$(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP)
|
$(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP) $(LIBARMSUPPORT)
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \
|
$(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \
|
||||||
$(filter %.o, $^) \
|
$(filter %.o, $^) \
|
||||||
$(filter %.a, $+) \
|
$(filter %.a, $+) \
|
||||||
|
|
|
@ -7,10 +7,6 @@ mdct_lookup.c
|
||||||
fft-ffmpeg.c
|
fft-ffmpeg.c
|
||||||
mdct.c
|
mdct.c
|
||||||
|
|
||||||
#ifdef CPU_ARM
|
|
||||||
../../../firmware/target/arm/support-arm.S
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
|
#elif (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
|
||||||
osx.dummy.c
|
osx.dummy.c
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,7 +47,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# rule to create reference map for image decoder
|
# rule to create reference map for image decoder
|
||||||
$(IMGVBUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(IMGVSRCDIR)/imageviewer.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB)
|
$(IMGVBUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(IMGVSRCDIR)/imageviewer.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(LIBARMSUPPORT) $(PLUGINBITMAPLIB)
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(IMGDECFLAGS) -o /dev/null \
|
$(call PRINTS,LD $(@F))$(CC) $(IMGDECFLAGS) -o /dev/null \
|
||||||
$(filter %.o, $^) \
|
$(filter %.o, $^) \
|
||||||
$(filter %.a, $+) \
|
$(filter %.a, $+) \
|
||||||
|
|
|
@ -41,7 +41,6 @@ playergfx.c
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
||||||
#ifdef CPU_ARM
|
#ifdef CPU_ARM
|
||||||
../../../firmware/target/arm/support-arm.S
|
|
||||||
pluginlib_jpeg_idct_arm.S
|
pluginlib_jpeg_idct_arm.S
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS)
|
||||||
$(ROCKS1): $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o
|
$(ROCKS1): $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o
|
||||||
|
|
||||||
# dependency for all plugins
|
# dependency for all plugins
|
||||||
$(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(PLUGIN_CRT0) $(LIBSETJMP)
|
$(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(PLUGIN_CRT0) $(LIBSETJMP) $(LIBARMSUPPORT)
|
||||||
|
|
||||||
$(PLUGINLIB): $(PLUGINLIB_OBJ)
|
$(PLUGINLIB): $(PLUGINLIB_OBJ)
|
||||||
$(SILENT)$(shell rm -f $@)
|
$(SILENT)$(shell rm -f $@)
|
||||||
|
@ -129,7 +129,7 @@ endif
|
||||||
$(BUILDDIR)/apps/plugins/%.lua: $(ROOTDIR)/apps/plugins/%.lua
|
$(BUILDDIR)/apps/plugins/%.lua: $(ROOTDIR)/apps/plugins/%.lua
|
||||||
$(call PRINTS,CP $(subst $(ROOTDIR)/,,$<))cp $< $(BUILDDIR)/apps/plugins/
|
$(call PRINTS,CP $(subst $(ROOTDIR)/,,$<))cp $< $(BUILDDIR)/apps/plugins/
|
||||||
|
|
||||||
$(BUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(LIBSETJMP) $(PLUGIN_CRT0)
|
$(BUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(LIBSETJMP) $(LIBARMSUPPORT) $(PLUGIN_CRT0)
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o /dev/null \
|
$(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o /dev/null \
|
||||||
$(filter %.o, $^) \
|
$(filter %.o, $^) \
|
||||||
$(filter %.a, $+) \
|
$(filter %.a, $+) \
|
||||||
|
|
|
@ -454,7 +454,6 @@ target/coldfire/ata-as-coldfire.S
|
||||||
|
|
||||||
#elif defined(CPU_PP) || defined(CPU_ARM)
|
#elif defined(CPU_PP) || defined(CPU_ARM)
|
||||||
/* CPU_PP => CPU_ARM, CPU_ARM !=> CPU_PP */
|
/* CPU_PP => CPU_ARM, CPU_ARM !=> CPU_PP */
|
||||||
target/arm/support-arm.S
|
|
||||||
target/arm/memcpy-arm.S
|
target/arm/memcpy-arm.S
|
||||||
target/arm/memmove-arm.S
|
target/arm/memmove-arm.S
|
||||||
|
|
||||||
|
|
17
lib/arm_support/arm_support.make
Normal file
17
lib/arm_support/arm_support.make
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# __________ __ ___.
|
||||||
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
# \/ \/ \/ \/ \/
|
||||||
|
#
|
||||||
|
|
||||||
|
ARMSUPPORT_DIR = $(ROOTDIR)/lib/arm_support
|
||||||
|
ARMSUPPORT_SRC = $(ARMSUPPORT_DIR)/support-arm.S
|
||||||
|
ARMSUPPORT_OBJ := $(call c2obj, $(ARMSUPPORT_SRC))
|
||||||
|
|
||||||
|
OTHER_SRC += $(ARMSUPPORT_SRC)
|
||||||
|
|
||||||
|
$(LIBARMSUPPORT): $(ARMSUPPORT_OBJ)
|
||||||
|
$(SILENT)$(shell rm -f $@)
|
||||||
|
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
|
|
@ -70,9 +70,12 @@ ifeq (,$(findstring checkwps,$(APPSDIR)))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#included before codecs.make and plugins.make so they see $(LIBSETJMP)
|
#included before codecs.make and plugins.make so they see them)
|
||||||
ifndef APP_TYPE
|
ifndef APP_TYPE
|
||||||
include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make
|
include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make
|
||||||
|
ifeq (arm,$(ARCH))
|
||||||
|
include $(ROOTDIR)/lib/arm_support/arm_support.make
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring bootloader,$(APPSDIR)))
|
ifneq (,$(findstring bootloader,$(APPSDIR)))
|
||||||
|
@ -176,6 +179,13 @@ LINKRAM := $(BUILDDIR)/ram.link
|
||||||
ROMLDS := $(FIRMDIR)/rom.lds
|
ROMLDS := $(FIRMDIR)/rom.lds
|
||||||
LINKROM := $(BUILDDIR)/rom.link
|
LINKROM := $(BUILDDIR)/rom.link
|
||||||
|
|
||||||
|
ifeq (arm,$(ARCH))
|
||||||
|
LIBARMSUPPORT_LINK := -larm_support
|
||||||
|
else
|
||||||
|
LIBARMSUPPORT_LINK :=
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(LINKRAM): $(RAMLDS) $(CONFIGFILE)
|
$(LINKRAM): $(RAMLDS) $(CONFIGFILE)
|
||||||
$(call PRINTS,PP $(@F))
|
$(call PRINTS,PP $(@F))
|
||||||
|
@ -185,19 +195,21 @@ $(LINKROM): $(ROMLDS)
|
||||||
$(call PRINTS,PP $(@F))
|
$(call PRINTS,PP $(@F))
|
||||||
$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
|
$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
|
||||||
|
|
||||||
$(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKRAM)
|
$(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(LINKRAM)
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
|
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
|
||||||
-L$(BUILDDIR)/firmware -lfirmware \
|
-L$(BUILDDIR)/firmware -lfirmware \
|
||||||
-L$(BUILDDIR)/lib -lskin_parser \
|
-L$(BUILDDIR)/lib -lskin_parser $(LIBARMSUPPORT_LINK) \
|
||||||
-L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \
|
-L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \
|
||||||
-lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \
|
-lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \
|
||||||
-T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map
|
-T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map
|
||||||
|
|
||||||
$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM)
|
$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(LINKROM)
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
|
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
|
||||||
$(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \
|
-L$(BUILDDIR)/firmware -lfirmware \
|
||||||
-L$(BUILDDIR)/lib -lskin_parser \
|
-L$(BUILDDIR)/lib -lskin_parser $(LIBARMSUPPORT_LINK) \
|
||||||
-L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
|
-L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \
|
||||||
|
-lgcc $(GLOBAL_LDOPTS) \
|
||||||
|
-T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
|
||||||
|
|
||||||
$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
|
$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
|
||||||
$(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@
|
$(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue