summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-03 21:15:11 +0000
committerThomas Martitz <kugel@rockbox.org>2012-01-03 21:15:11 +0000
commit0bc64a6bb358ae2c5568ec4747d1cea06c42ab59 (patch)
tree6c0d37e84a89c59e82378ffe3ed1c11625533f64
parenta53d1c6dc509dd749cdf2d0767dccea9a3406e00 (diff)
downloadrockbox-0bc64a6bb358ae2c5568ec4747d1cea06c42ab59.tar.gz
rockbox-0bc64a6bb358ae2c5568ec4747d1cea06c42ab59.tar.bz2
rockbox-0bc64a6bb358ae2c5568ec4747d1cea06c42ab59.zip
Adjust a few makefiles to generate smaller (upto 80%) binaries on RaaA through
stripping. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31541 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--android/android.make1
-rw-r--r--apps/codecs/codecs.make8
-rw-r--r--apps/plugins/plugins.make8
3 files changed, 11 insertions, 6 deletions
diff --git a/android/android.make b/android/android.make
index 1a4c39ceb8..ec7ba32ea5 100644
--- a/android/android.make
+++ b/android/android.make
@@ -116,6 +116,7 @@ classes: $(R_OBJ) $(JAVA_OBJ)
$(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) $(CPUFEAT_BUILD)/cpu-features.o
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS)
+ $(call PRINTS,OC $(@F))$(OC) -S -x $@
$(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY)
$(call PRINTS,CP $(BINARY))cp $^ $@
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make
index 2f8d3acf74..d3525791cd 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -206,8 +206,10 @@ $(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP)
$(filter %.o, $^) \
$(filter %.a, $+) \
-lgcc $(CODECLDFLAGS)
-ifdef APP_TYPE
- $(SILENT)cp $(CODECDIR)/$*.elf $@
+ifndef APP_TYPE
+ $(SILENT)$(OC) -O binary $(CODECDIR)/$*.elf $@ # objcopy native
+else ifeq (,$(findstring sdl-sim,$(APP_TYPE)))
+ $(SILENT)$(OC) -S -x $(CODECDIR)/$*.elf $@ # objcopy hosted
else
- $(SILENT)$(OC) -O binary $(CODECDIR)/$*.elf $@
+ $(SILENT)cp $(CODECDIR)/$*.elf $@ # no objcopy, keep debug symbols
endif
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index 41d2307682..fca37aa763 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -118,10 +118,12 @@ $(BUILDDIR)/%.rock:
$(filter %.o, $^) \
$(filter %.a, $+) \
-lgcc $(PLUGINLDFLAGS)
-ifdef APP_TYPE
- $(SILENT)cp $(BUILDDIR)/$*.elf $@
+ifndef APP_TYPE
+ $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@ # objcopy native
+else ifeq (,$(findstring sdl-sim,$(APP_TYPE)))
+ $(SILENT)$(OC) -S -x $(BUILDDIR)/$*.elf $@ # objcopy hosted
else
- $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@
+ $(SILENT)cp $(BUILDDIR)/$*.elf $@ # no objcopy, keep debug symbols
endif
$(BUILDDIR)/apps/plugins/%.lua: $(ROOTDIR)/apps/plugins/%.lua