summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbcodec/codecs/codecs.make11
-rw-r--r--lib/rbcodec/codecs/lib/libcodec.make10
-rw-r--r--lib/rbcodec/codecs/libmad/libmad.make10
-rw-r--r--lib/rbcodec/codecs/libspeex/libspeex.make14
-rw-r--r--lib/rbcodec/codecs/libwmavoice/libwmavoice.make8
5 files changed, 14 insertions, 39 deletions
diff --git a/lib/rbcodec/codecs/codecs.make b/lib/rbcodec/codecs/codecs.make
index afb8396938..4602a56d2c 100644
--- a/lib/rbcodec/codecs/codecs.make
+++ b/lib/rbcodec/codecs/codecs.make
@@ -67,6 +67,7 @@ include $(RBCODECLIB_DIR)/codecs/libopus/libopus.make
# set CODECFLAGS per codec lib, since gcc takes the last -Ox and the last
# in a -ffoo -fno-foo pair, there is no need to filter them out
+$(CODECLIB) : CODECFLAGS += -O1
$(A52LIB) : CODECFLAGS += -O1
$(ALACLIB) : CODECFLAGS += -O1
$(ASAPLIB) : CODECFLAGS += -O1
@@ -81,6 +82,7 @@ $(GBSLIB) : CODECFLAGS += -O2
$(HESLIB) : CODECFLAGS += -O2
$(KSSLIB) : CODECFLAGS += -O2
$(M4ALIB) : CODECFLAGS += -O3
+$(MADLIB) : CODECFLAGS += -O2
$(MUSEPACKLIB) : CODECFLAGS += -O1
$(NSFLIB) : CODECFLAGS += -O2
$(OPUSLIB) : CODECFLAGS += -O2
@@ -88,6 +90,7 @@ $(PCMSLIB) : CODECFLAGS += -O1
$(RMLIB) : CODECFLAGS += -O3
$(SGCLIB) : CODECFLAGS += -O2
$(SPCLIB) : CODECFLAGS += -O1
+$(SPEEXLIB) : CODECFLAGS += -O2
$(TREMORLIB) : CODECFLAGS += -O2
$(TTALIB) : CODECFLAGS += -O2
$(VGMLIB) : CODECFLAGS += -O2
@@ -102,15 +105,18 @@ ifeq ($(ARCH),arch_arm)
# redo per arm generation
$(ALACLIB) : CODECFLAGS += -O2
$(AYLIB) : CODECFLAGS += -O1
+ $(EMU2413LIB) : CODECFLAGS += -O3
$(GBSLIB) : CODECFLAGS += -O1
$(HESLIB) : CODECFLAGS += -O1
$(KSSLIB) : CODECFLAGS += -O1
+ $(MADLIB) : CODECFLAGS += -O1
$(NSFLIB) : CODECFLAGS += -O1
+ $(SPEEXLIB) : CODECFLAGS += -O2
$(SGCLIB) : CODECFLAGS += -O1
$(VGMLIB) : CODECFLAGS += -O1
- $(EMU2413LIB) : CODECFLAGS += -O3
$(WAVPACKLIB) : CODECFLAGS += -O3
else ifeq ($(ARCH),arch_m68k)
+ $(CODECLIB) : CODECFLAGS += -O2
$(A52LIB) : CODECFLAGS += -O2
$(ASFLIB) : CODECFLAGS += -O3
$(ATRACLIB) : CODECFLAGS += -O2
@@ -124,6 +130,7 @@ else ifeq ($(ARCH),arch_mips)
endif
ifeq ($(MEMORYSIZE),2)
+ $(CODECLIB) : CODECFLAGS += -Os
$(ASFLIB) : CODECFLAGS += -Os
$(WMALIB) : CODECFLAGS += -Os
endif
@@ -152,7 +159,7 @@ $(CODECDIR)/vorbis.codec : $(CODECDIR)/libtremor.a $(TLSFLIB) $(SETJMPLIB)
$(CODECDIR)/speex.codec : $(CODECDIR)/libspeex.a
$(CODECDIR)/mpc.codec : $(CODECDIR)/libmusepack.a
$(CODECDIR)/wavpack.codec : $(CODECDIR)/libwavpack.a
-$(CODECDIR)/alac.codec : $(CODECDIR)/libalac.a $(CODECDIR)/libm4a.a
+$(CODECDIR)/alac.codec : $(CODECDIR)/libalac.a $(CODECDIR)/libm4a.a
$(CODECDIR)/aac.codec : $(CODECDIR)/libfaad.a $(CODECDIR)/libm4a.a
$(CODECDIR)/shorten.codec : $(CODECDIR)/libffmpegFLAC.a
$(CODECDIR)/ape-pre.map : $(CODECDIR)/libdemac-pre.a
diff --git a/lib/rbcodec/codecs/lib/libcodec.make b/lib/rbcodec/codecs/lib/libcodec.make
index 4931d36b74..0788dd6705 100644
--- a/lib/rbcodec/codecs/lib/libcodec.make
+++ b/lib/rbcodec/codecs/lib/libcodec.make
@@ -16,15 +16,7 @@ $(CODECLIB): $(CODECLIB_OBJ)
$(SILENT)$(shell rm -f $@)
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
-CODECLIBFLAGS = $(filter-out -O%,$(CODECFLAGS))
-
-ifeq ($(MEMORYSIZE),2)
- CODECLIBFLAGS += -Os
-else ifeq ($(ARCH),arch_m68k)
- CODECLIBFLAGS += -O2
-else
- CODECLIBFLAGS += -O1
-endif
+CODECLIBFLAGS = $(CODECFLAGS)
# Do not use '-ffunction-sections' when compiling sdl-sim
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
diff --git a/lib/rbcodec/codecs/libmad/libmad.make b/lib/rbcodec/codecs/libmad/libmad.make
index 16b2bd76a9..fa6040d29a 100644
--- a/lib/rbcodec/codecs/libmad/libmad.make
+++ b/lib/rbcodec/codecs/libmad/libmad.make
@@ -11,17 +11,9 @@
# (one for codec, one for mpegplayer)
# so a little trickery is necessary
-# Extract optimization level ('-O') from compile flags. Will be set later.
-MADFLAGS = $(filter-out -O%,$(CODECFLAGS)) -I$(RBCODECLIB_DIR)/codecs/libmad
+MADFLAGS = $(CODECFLAGS) -I$(RBCODECLIB_DIR)/codecs/libmad
MADFLAGS += -UDEBUG -DNDEBUG -DHAVE_LIMITS_H -DHAVE_ASSERT_H
-# libmad is faster on ARM-targets with -O1 than -O2
-ifeq ($(ARCH),arch_arm)
- MADFLAGS += -O1
-else
- MADFLAGS += -O2
-endif
-
# MPEGplayer
MPEGMADFLAGS = $(MADFLAGS) -DMPEGPLAYER
diff --git a/lib/rbcodec/codecs/libspeex/libspeex.make b/lib/rbcodec/codecs/libspeex/libspeex.make
index 6138dff4a9..c33fe1f9fa 100644
--- a/lib/rbcodec/codecs/libspeex/libspeex.make
+++ b/lib/rbcodec/codecs/libspeex/libspeex.make
@@ -13,21 +13,11 @@
# disable strict aliasing optimizations for now, it gives warnings due to
# some horrid typecasting
-_SPEEXFLAGS = $(filter-out -fstrict-aliasing, $(CODECFLAGS)) \
+SPEEXFLAGS = $(filter-out -fstrict-aliasing, $(CODECFLAGS)) \
-fno-strict-aliasing -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \
-I$(RBCODECLIB_DIR)/codecs/libspeex
-# build voice codec with core -O switch
-VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(_SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC
-
-# libspeex is faster on ARM-targets with -O1 instead of -O2
-SPEEXFLAGS = $(filter-out -O%,$(_SPEEXFLAGS))
-
-ifeq ($(ARCH),arch_arm)
- SPEEXFLAGS += -O1
-else
- SPEEXFLAGS += -O2
-endif
+VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC
# libspeex
SPEEXLIB := $(CODECDIR)/libspeex.a
diff --git a/lib/rbcodec/codecs/libwmavoice/libwmavoice.make b/lib/rbcodec/codecs/libwmavoice/libwmavoice.make
index 609e5612f8..6aabc53a92 100644
--- a/lib/rbcodec/codecs/libwmavoice/libwmavoice.make
+++ b/lib/rbcodec/codecs/libwmavoice/libwmavoice.make
@@ -17,13 +17,7 @@ $(WMAVOICELIB): $(WMAVOICELIB_OBJ)
$(SILENT)$(shell rm -f $@)
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
-WMAVOICEFLAGS = -I$(RBCODECLIB_DIR)/codecs/libwmavoice $(filter-out -O%,$(CODECFLAGS))
-
-ifeq ($(ARCH),arch_m68k)
- WMAVOICEFLAGS += -O2
-else
- WMAVOICEFLAGS += -O1
-endif
+WMAVOICEFLAGS = -I$(RBCODECLIB_DIR)/codecs/libwmavoice $(CODECFLAGS)
ifeq ($(APP_TYPE),sdl-sim)
# wmavoice needs libm in the simulator