build: Put all codec optiomization definitions in one place

It was already mostly there.

Change-Id: I24ff278d9bf18a54be4b67c3075d5ebbe7947f65
This commit is contained in:
Solomon Peachy 2018-12-25 14:17:29 -05:00
parent 4c933a1d01
commit 6c2a7ddc74
5 changed files with 14 additions and 39 deletions

View file

@ -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