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
diff --git a/android/android.make b/android/android.make
index 1a4c39c..ec7ba32 100644
--- a/android/android.make
+++ b/android/android.make
@@ -116,6 +116,7 @@
$(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 2f8d3ac..d352579 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -206,8 +206,10 @@
$(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 41d2307..fca37aa 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -118,10 +118,12 @@
$(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