diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-01-17 07:36:08 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-01-21 18:39:19 +0100 |
commit | cf333a61c7861361b4025cb0f67c8f75b0b07eef (patch) | |
tree | cecb037f3c38ecb035ff79de75dafa6b135bb595 | |
parent | 4343011955bffaf61b002a89b0137d48e873d9d0 (diff) | |
download | rockbox-cf333a61c7861361b4025cb0f67c8f75b0b07eef.tar.gz rockbox-cf333a61c7861361b4025cb0f67c8f75b0b07eef.zip |
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
-rw-r--r-- | apps/codecs/codecs.make | 2 | ||||
-rw-r--r-- | apps/codecs/lib/SOURCES | 4 | ||||
-rw-r--r-- | apps/plugins/imageviewer/imageviewer.make | 2 | ||||
-rw-r--r-- | apps/plugins/lib/SOURCES | 1 | ||||
-rw-r--r-- | apps/plugins/plugins.make | 4 | ||||
-rw-r--r-- | firmware/SOURCES | 1 | ||||
-rw-r--r-- | lib/arm_support/arm_support.make | 17 | ||||
-rw-r--r-- | lib/arm_support/support-arm.S (renamed from firmware/target/arm/support-arm.S) | 0 | ||||
-rw-r--r-- | tools/root.make | 26 |
9 files changed, 40 insertions, 17 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make index d3525791cd..e18b92c1f0 100644 --- a/apps/codecs/codecs.make +++ b/apps/codecs/codecs.make | |||
@@ -201,7 +201,7 @@ $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB | |||
201 | $(CODECLIB) \ | 201 | $(CODECLIB) \ |
202 | -lgcc $(subst .map,-pre.map,$(CODECLDFLAGS)) | 202 | -lgcc $(subst .map,-pre.map,$(CODECLDFLAGS)) |
203 | 203 | ||
204 | $(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP) | 204 | $(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP) $(LIBARMSUPPORT) |
205 | $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \ | 205 | $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \ |
206 | $(filter %.o, $^) \ | 206 | $(filter %.o, $^) \ |
207 | $(filter %.a, $+) \ | 207 | $(filter %.a, $+) \ |
diff --git a/apps/codecs/lib/SOURCES b/apps/codecs/lib/SOURCES index cd38dc1545..257dcb5838 100644 --- a/apps/codecs/lib/SOURCES +++ b/apps/codecs/lib/SOURCES | |||
@@ -7,10 +7,6 @@ mdct_lookup.c | |||
7 | fft-ffmpeg.c | 7 | fft-ffmpeg.c |
8 | mdct.c | 8 | mdct.c |
9 | 9 | ||
10 | #ifdef CPU_ARM | ||
11 | ../../../firmware/target/arm/support-arm.S | ||
12 | #endif | ||
13 | |||
14 | #elif (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) | 10 | #elif (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) |
15 | osx.dummy.c | 11 | osx.dummy.c |
16 | #endif | 12 | #endif |
diff --git a/apps/plugins/imageviewer/imageviewer.make b/apps/plugins/imageviewer/imageviewer.make index d06bbfd571..8f933e3046 100644 --- a/apps/plugins/imageviewer/imageviewer.make +++ b/apps/plugins/imageviewer/imageviewer.make | |||
@@ -47,7 +47,7 @@ else | |||
47 | endif | 47 | endif |
48 | 48 | ||
49 | # rule to create reference map for image decoder | 49 | # rule to create reference map for image decoder |
50 | $(IMGVBUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(IMGVSRCDIR)/imageviewer.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) | 50 | $(IMGVBUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(IMGVSRCDIR)/imageviewer.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(LIBARMSUPPORT) $(PLUGINBITMAPLIB) |
51 | $(call PRINTS,LD $(@F))$(CC) $(IMGDECFLAGS) -o /dev/null \ | 51 | $(call PRINTS,LD $(@F))$(CC) $(IMGDECFLAGS) -o /dev/null \ |
52 | $(filter %.o, $^) \ | 52 | $(filter %.o, $^) \ |
53 | $(filter %.a, $+) \ | 53 | $(filter %.a, $+) \ |
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 2c0fc2a611..4b33901088 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -41,7 +41,6 @@ playergfx.c | |||
41 | #ifdef HAVE_LCD_BITMAP | 41 | #ifdef HAVE_LCD_BITMAP |
42 | 42 | ||
43 | #ifdef CPU_ARM | 43 | #ifdef CPU_ARM |
44 | ../../../firmware/target/arm/support-arm.S | ||
45 | pluginlib_jpeg_idct_arm.S | 44 | pluginlib_jpeg_idct_arm.S |
46 | #endif | 45 | #endif |
47 | 46 | ||
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index fca37aa763..1bf78d82c1 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -65,7 +65,7 @@ PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS) | |||
65 | $(ROCKS1): $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o | 65 | $(ROCKS1): $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o |
66 | 66 | ||
67 | # dependency for all plugins | 67 | # dependency for all plugins |
68 | $(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(PLUGIN_CRT0) $(LIBSETJMP) | 68 | $(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(PLUGIN_CRT0) $(LIBSETJMP) $(LIBARMSUPPORT) |
69 | 69 | ||
70 | $(PLUGINLIB): $(PLUGINLIB_OBJ) | 70 | $(PLUGINLIB): $(PLUGINLIB_OBJ) |
71 | $(SILENT)$(shell rm -f $@) | 71 | $(SILENT)$(shell rm -f $@) |
@@ -129,7 +129,7 @@ endif | |||
129 | $(BUILDDIR)/apps/plugins/%.lua: $(ROOTDIR)/apps/plugins/%.lua | 129 | $(BUILDDIR)/apps/plugins/%.lua: $(ROOTDIR)/apps/plugins/%.lua |
130 | $(call PRINTS,CP $(subst $(ROOTDIR)/,,$<))cp $< $(BUILDDIR)/apps/plugins/ | 130 | $(call PRINTS,CP $(subst $(ROOTDIR)/,,$<))cp $< $(BUILDDIR)/apps/plugins/ |
131 | 131 | ||
132 | $(BUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(LIBSETJMP) $(PLUGIN_CRT0) | 132 | $(BUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) $(LIBSETJMP) $(LIBARMSUPPORT) $(PLUGIN_CRT0) |
133 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o /dev/null \ | 133 | $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o /dev/null \ |
134 | $(filter %.o, $^) \ | 134 | $(filter %.o, $^) \ |
135 | $(filter %.a, $+) \ | 135 | $(filter %.a, $+) \ |
diff --git a/firmware/SOURCES b/firmware/SOURCES index 438c9e6526..f2036734a5 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -454,7 +454,6 @@ target/coldfire/ata-as-coldfire.S | |||
454 | 454 | ||
455 | #elif defined(CPU_PP) || defined(CPU_ARM) | 455 | #elif defined(CPU_PP) || defined(CPU_ARM) |
456 | /* CPU_PP => CPU_ARM, CPU_ARM !=> CPU_PP */ | 456 | /* CPU_PP => CPU_ARM, CPU_ARM !=> CPU_PP */ |
457 | target/arm/support-arm.S | ||
458 | target/arm/memcpy-arm.S | 457 | target/arm/memcpy-arm.S |
459 | target/arm/memmove-arm.S | 458 | target/arm/memmove-arm.S |
460 | 459 | ||
diff --git a/lib/arm_support/arm_support.make b/lib/arm_support/arm_support.make new file mode 100644 index 0000000000..0f6f7683b4 --- /dev/null +++ b/lib/arm_support/arm_support.make | |||
@@ -0,0 +1,17 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # | ||
8 | |||
9 | ARMSUPPORT_DIR = $(ROOTDIR)/lib/arm_support | ||
10 | ARMSUPPORT_SRC = $(ARMSUPPORT_DIR)/support-arm.S | ||
11 | ARMSUPPORT_OBJ := $(call c2obj, $(ARMSUPPORT_SRC)) | ||
12 | |||
13 | OTHER_SRC += $(ARMSUPPORT_SRC) | ||
14 | |||
15 | $(LIBARMSUPPORT): $(ARMSUPPORT_OBJ) | ||
16 | $(SILENT)$(shell rm -f $@) | ||
17 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | ||
diff --git a/firmware/target/arm/support-arm.S b/lib/arm_support/support-arm.S index 6141a3f158..6141a3f158 100644 --- a/firmware/target/arm/support-arm.S +++ b/lib/arm_support/support-arm.S | |||
diff --git a/tools/root.make b/tools/root.make index dd827d6d3f..3cdee2caf7 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -70,9 +70,12 @@ ifeq (,$(findstring checkwps,$(APPSDIR))) | |||
70 | endif | 70 | endif |
71 | endif | 71 | endif |
72 | 72 | ||
73 | #included before codecs.make and plugins.make so they see $(LIBSETJMP) | 73 | #included before codecs.make and plugins.make so they see them) |
74 | ifndef APP_TYPE | 74 | ifndef APP_TYPE |
75 | include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make | 75 | include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make |
76 | ifeq (arm,$(ARCH)) | ||
77 | include $(ROOTDIR)/lib/arm_support/arm_support.make | ||
78 | endif | ||
76 | endif | 79 | endif |
77 | 80 | ||
78 | ifneq (,$(findstring bootloader,$(APPSDIR))) | 81 | ifneq (,$(findstring bootloader,$(APPSDIR))) |
@@ -176,6 +179,13 @@ LINKRAM := $(BUILDDIR)/ram.link | |||
176 | ROMLDS := $(FIRMDIR)/rom.lds | 179 | ROMLDS := $(FIRMDIR)/rom.lds |
177 | LINKROM := $(BUILDDIR)/rom.link | 180 | LINKROM := $(BUILDDIR)/rom.link |
178 | 181 | ||
182 | ifeq (arm,$(ARCH)) | ||
183 | LIBARMSUPPORT_LINK := -larm_support | ||
184 | else | ||
185 | LIBARMSUPPORT_LINK := | ||
186 | endif | ||
187 | |||
188 | |||
179 | 189 | ||
180 | $(LINKRAM): $(RAMLDS) $(CONFIGFILE) | 190 | $(LINKRAM): $(RAMLDS) $(CONFIGFILE) |
181 | $(call PRINTS,PP $(@F)) | 191 | $(call PRINTS,PP $(@F)) |
@@ -185,19 +195,21 @@ $(LINKROM): $(ROMLDS) | |||
185 | $(call PRINTS,PP $(@F)) | 195 | $(call PRINTS,PP $(@F)) |
186 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) | 196 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) |
187 | 197 | ||
188 | $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKRAM) | 198 | $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(LINKRAM) |
189 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ | 199 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ |
190 | -L$(BUILDDIR)/firmware -lfirmware \ | 200 | -L$(BUILDDIR)/firmware -lfirmware \ |
191 | -L$(BUILDDIR)/lib -lskin_parser \ | 201 | -L$(BUILDDIR)/lib -lskin_parser $(LIBARMSUPPORT_LINK) \ |
192 | -L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \ | 202 | -L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \ |
193 | -lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \ | 203 | -lgcc $(BOOTBOXLDOPTS) $(GLOBAL_LDOPTS) \ |
194 | -T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map | 204 | -T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map |
195 | 205 | ||
196 | $(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM) | 206 | $(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LIBARMSUPPORT) $$(LINKROM) |
197 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ | 207 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ |
198 | $(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \ | 208 | -L$(BUILDDIR)/firmware -lfirmware \ |
199 | -L$(BUILDDIR)/lib -lskin_parser \ | 209 | -L$(BUILDDIR)/lib -lskin_parser $(LIBARMSUPPORT_LINK) \ |
200 | -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map | 210 | -L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \ |
211 | -lgcc $(GLOBAL_LDOPTS) \ | ||
212 | -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map | ||
201 | 213 | ||
202 | $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf | 214 | $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf |
203 | $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ | 215 | $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ |