Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Change-Id: I018d729aa0c8300fa3149f22a5a8c5668b339dfa
Reviewed-on: http://gerrit.rockbox.org/496
Reviewed-by: Nils Wallménius <nils@rockbox.org>

+20 -17
+2 -1
apps/rbcodecconfig.h
··· 1 1 #ifndef RBCODECCONFIG_H_INCLUDED 2 2 #define RBCODECCONFIG_H_INCLUDED 3 3 4 - #include "config.h" 4 + /* Explicit path to avoid issues with name clashes (libopus) */ 5 + #include "../firmware/export/config.h" 5 6 6 7 #ifndef __ASSEMBLER__ 7 8
+13 -13
lib/rbcodec/codecs/codecs.make
··· 21 21 # extra libraries 22 22 CODEC_LIBS := $(CODECLIB) $(FIXEDPOINTLIB) 23 23 24 + # compile flags for codecs 25 + CODECFLAGS := $(CFLAGS) $(RBCODEC_CFLAGS) -fstrict-aliasing \ 26 + -I$(RBCODECLIB_DIR)/codecs -I$(RBCODECLIB_DIR)/codecs/lib -DCODEC 27 + 28 + ifdef APP_TYPE 29 + CODECLDFLAGS = $(SHARED_LDFLAG) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map 30 + CODECFLAGS += $(SHARED_CFLAGS) # <-- from Makefile 31 + else 32 + CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map 33 + CODECFLAGS += -UDEBUG -DNDEBUG 34 + endif 35 + CODECLDFLAGS += $(GLOBAL_LDOPTS) 36 + 24 37 # the codec libraries 25 38 include $(RBCODECLIB_DIR)/codecs/demac/libdemac.make 26 39 include $(RBCODECLIB_DIR)/codecs/liba52/liba52.make ··· 52 65 include $(RBCODECLIB_DIR)/codecs/libgme/libkss.make 53 66 include $(RBCODECLIB_DIR)/codecs/libgme/libemu2413.make 54 67 include $(RBCODECLIB_DIR)/codecs/libopus/libopus.make 55 - 56 - # compile flags for codecs 57 - CODECFLAGS = $(CFLAGS) $(RBCODEC_CFLAGS) -fstrict-aliasing \ 58 - -I$(RBCODECLIB_DIR)/codecs -I$(RBCODECLIB_DIR)/codecs/lib -DCODEC 59 68 60 69 # set CODECFLAGS per codec lib, since gcc takes the last -Ox and the last 61 70 # in a -ffoo -fno-foo pair, there is no need to filter them out ··· 187 196 $(SILENT)mkdir -p $(dir $@) 188 197 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 189 198 -I$(dir $<) $(CODECFLAGS) $(ASMFLAGS) -c $< -o $@ 190 - 191 - ifdef APP_TYPE 192 - CODECLDFLAGS = $(SHARED_LDFLAG) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map 193 - CODECFLAGS += $(SHARED_CFLAGS) # <-- from Makefile 194 - else 195 - CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map 196 - CODECFLAGS += -UDEBUG -DNDEBUG 197 - endif 198 - CODECLDFLAGS += $(GLOBAL_LDOPTS) 199 199 200 200 $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECS_LIBS) 201 201 $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*-pre.elf \
+4 -2
lib/rbcodec/codecs/libopus/libopus.make
··· 13 13 OPUSLIB_OBJ := $(call c2obj, $(OPUSLIB_SRC)) 14 14 15 15 # codec specific compilation flags 16 - $(OPUSLIB) : CODECFLAGS += -DHAVE_CONFIG_H \ 16 + # prepend paths to avoid name clash issues 17 + $(OPUSLIB) : CODECFLAGS := -DHAVE_CONFIG_H \ 17 18 -I$(RBCODECLIB_DIR)/codecs/libopus \ 18 19 -I$(RBCODECLIB_DIR)/codecs/libopus/celt \ 19 - -I$(RBCODECLIB_DIR)/codecs/libopus/silk 20 + -I$(RBCODECLIB_DIR)/codecs/libopus/silk \ 21 + $(CODECFLAGS) 20 22 21 23 $(OPUSLIB): $(OPUSLIB_OBJ) 22 24 $(SILENT)$(shell rm -f $@)
+1 -1
lib/rbcodec/codecs/libopus/opus_config.h
··· 1 1 #ifndef CONFIG_H 2 2 #define CONFIG_H 3 3 4 - #include "config.h" 4 + #include "rbcodecconfig.h" 5 5 #include "codeclib.h" 6 6 #include "ogg/ogg.h" 7 7