From b2e80edd1671833dc80eb0c5334cb6a2c58808e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Mon, 1 Jul 2013 21:59:44 +0200 Subject: Change CODECFLAGS to a "simply-expanded" var to give the individual codec makefiles larger freedom in what they can do to it. Use this in libopus to prepend the libopus searchpaths to CODECFLAGS so that its internal config.h will be picked up before our global one. This avoids having to do a s/config.h/opus_config.h/ when syncing which will be handy soon. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I018d729aa0c8300fa3149f22a5a8c5668b339dfa Reviewed-on: http://gerrit.rockbox.org/496 Reviewed-by: Nils Wallménius --- lib/rbcodec/codecs/codecs.make | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lib/rbcodec/codecs/codecs.make') diff --git a/lib/rbcodec/codecs/codecs.make b/lib/rbcodec/codecs/codecs.make index 08554d9..13ad28f 100644 --- a/lib/rbcodec/codecs/codecs.make +++ b/lib/rbcodec/codecs/codecs.make @@ -21,6 +21,19 @@ OTHER_INC += -I$(RBCODECLIB_DIR)/codecs/lib # extra libraries CODEC_LIBS := $(CODECLIB) $(FIXEDPOINTLIB) +# compile flags for codecs +CODECFLAGS := $(CFLAGS) $(RBCODEC_CFLAGS) -fstrict-aliasing \ + -I$(RBCODECLIB_DIR)/codecs -I$(RBCODECLIB_DIR)/codecs/lib -DCODEC + +ifdef APP_TYPE + CODECLDFLAGS = $(SHARED_LDFLAG) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map + CODECFLAGS += $(SHARED_CFLAGS) # <-- from Makefile +else + CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map + CODECFLAGS += -UDEBUG -DNDEBUG +endif +CODECLDFLAGS += $(GLOBAL_LDOPTS) + # the codec libraries include $(RBCODECLIB_DIR)/codecs/demac/libdemac.make include $(RBCODECLIB_DIR)/codecs/liba52/liba52.make @@ -53,10 +66,6 @@ include $(RBCODECLIB_DIR)/codecs/libgme/libkss.make include $(RBCODECLIB_DIR)/codecs/libgme/libemu2413.make include $(RBCODECLIB_DIR)/codecs/libopus/libopus.make -# compile flags for codecs -CODECFLAGS = $(CFLAGS) $(RBCODEC_CFLAGS) -fstrict-aliasing \ - -I$(RBCODECLIB_DIR)/codecs -I$(RBCODECLIB_DIR)/codecs/lib -DCODEC - # 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 $(A52LIB) : CODECFLAGS += -O1 @@ -188,15 +197,6 @@ $(CODECDIR)/%.o: $(RBCODECLIB_DIR)/codecs/%.S $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ -I$(dir $<) $(CODECFLAGS) $(ASMFLAGS) -c $< -o $@ -ifdef APP_TYPE - CODECLDFLAGS = $(SHARED_LDFLAG) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map - CODECFLAGS += $(SHARED_CFLAGS) # <-- from Makefile -else - CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map - CODECFLAGS += -UDEBUG -DNDEBUG -endif -CODECLDFLAGS += $(GLOBAL_LDOPTS) - $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECS_LIBS) $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*-pre.elf \ $(filter %.o, $^) \ -- cgit v1.1