summaryrefslogtreecommitdiff
path: root/apps/codecs/libwma
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-07-18 19:05:53 +0000
committerNils Wallménius <nils@rockbox.org>2010-07-18 19:05:53 +0000
commitc45e1254c6852ba36fa3af1b9a096f5c3be0d8d1 (patch)
tree2ec08a6ae91d7032e5a563adc7bb5338f69b08fc /apps/codecs/libwma
parent45fc5e3aade9a47727b8caacf75958f9ee527167 (diff)
FS#11454 Tuning of codec compiler options
Tested with h300 and sansa c200v1 h300 speedups: a52: 2% cook: 9-17% aac: 0.5% vorbis: 0.5% wma: 6-12% c200v1 speedups: alac: 1.5% wma 3-4% wavpack 2% git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27486 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
-rw-r--r--apps/codecs/libwma/libwma.make15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/codecs/libwma/libwma.make b/apps/codecs/libwma/libwma.make
index 71c4cdc626..360245139d 100644
--- a/apps/codecs/libwma/libwma.make
+++ b/apps/codecs/libwma/libwma.make
@@ -16,3 +16,18 @@ OTHER_SRC += $(WMALIB_SRC)
$(WMALIB): $(WMALIB_OBJ)
$(SILENT)$(shell rm -f $@)
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
+
+WMAFLAGS = -I$(APPSDIR)/codecs/libwma $(filter-out -O%,$(CODECFLAGS))
+
+ifeq ($(MEMORYSIZE),2)
+ WMAFLAGS += -Os
+else ifeq ($(CPU),coldfire)
+ WMAFLAGS += -O3
+else
+ WMAFLAGS += -O2
+endif
+
+$(CODECDIR)/libwma/%.o: $(ROOTDIR)/apps/codecs/libwma/%.c
+ $(SILENT)mkdir -p $(dir $@)
+ $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(WMAFLAGS) -c $< -o $@
+