summaryrefslogtreecommitdiffstats
path: root/apps/codecs/codecs.make
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/codecs.make')
-rw-r--r--apps/codecs/codecs.make17
1 files changed, 8 insertions, 9 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make
index 55002b229b..37713015ad 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -21,6 +21,9 @@ include $(APPSDIR)/codecs/lib/tlsf/libtlsf.make
include $(APPSDIR)/codecs/lib/libcodec.make
OTHER_INC += -I$(APPSDIR)/codecs/lib
+# extra libraries
+CODEC_LIBS := $(EXTRA_LIBS) $(TLSFLIB) $(CODECLIB)
+
# the codec libraries
include $(APPSDIR)/codecs/demac/libdemac.make
include $(APPSDIR)/codecs/liba52/liba52.make
@@ -135,7 +138,7 @@ $(CODECDIR)/spc.codec : $(CODECDIR)/libspc.a
$(CODECDIR)/mpa.codec : $(CODECDIR)/libmad.a
$(CODECDIR)/a52.codec : $(CODECDIR)/liba52.a
$(CODECDIR)/flac.codec : $(CODECDIR)/libffmpegFLAC.a
-$(CODECDIR)/vorbis.codec : $(CODECDIR)/libtremor.a $(TLSFLIB)
+$(CODECDIR)/vorbis.codec : $(CODECDIR)/libtremor.a
$(CODECDIR)/speex.codec : $(CODECDIR)/libspeex.a
$(CODECDIR)/mpc.codec : $(CODECDIR)/libmusepack.a
$(CODECDIR)/wavpack.codec : $(CODECDIR)/libwavpack.a
@@ -168,10 +171,7 @@ $(CODECDIR)/sgc.codec : $(CODECDIR)/libsgc.a $(CODECDIR)/libemu2413.a
$(CODECDIR)/vgm.codec : $(CODECDIR)/libvgm.a $(CODECDIR)/libemu2413.a
$(CODECDIR)/kss.codec : $(CODECDIR)/libkss.a $(CODECDIR)/libemu2413.a
-$(CODECS): $(CODECLIB) # this must be last in codec dependency list
-
-# libfaad and libmusepack both contain a huffman.h file, with different
-# content. So we compile them with special command lines:
+$(CODECS): $(CODEC_LIBS) # this must be last in codec dependency list
# pattern rule for compiling codecs
$(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.c
@@ -194,14 +194,13 @@ else
endif
CODECLDFLAGS += $(GLOBAL_LDOPTS)
-$(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB)
+$(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECS_LIBS)
$(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*-pre.elf \
$(filter %.o, $^) \
- $(filter-out $(CODECLIB),$(filter %.a, $+)) \
- $(CODECLIB) \
+ $(filter-out $(CODECLIB),$(filter %.a, $+)) $(CODECLIB) \
-lgcc $(subst .map,-pre.map,$(CODECLDFLAGS))
-$(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP) $(LIBARMSUPPORT)
+$(CODECDIR)/%.codec: $(CODECDIR)/%.o
$(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \
$(filter %.o, $^) \
$(filter %.a, $+) \