summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/demac/libdemac.make
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/demac/libdemac.make')
-rw-r--r--lib/rbcodec/codecs/demac/libdemac.make35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/demac/libdemac.make b/lib/rbcodec/codecs/demac/libdemac.make
new file mode 100644
index 0000000000..6f64b2ff10
--- /dev/null
+++ b/lib/rbcodec/codecs/demac/libdemac.make
@@ -0,0 +1,35 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10# libdemac
11DEMACLIB := $(CODECDIR)/libdemac.a
12DEMACLIB_SRC := $(call preprocess, $(RBCODECLIB_DIR)/codecs/demac/libdemac/SOURCES)
13DEMACLIB_OBJ := $(call c2obj, $(DEMACLIB_SRC))
14OTHER_SRC += $(DEMACLIB_SRC)
15ifeq ($(ARCH),arch_arm)
16OTHER_SRC += $(RBCODECLIB_DIR)/codecs/demac/libdemac/udiv32_arm-pre.S
17endif
18DEMACLIB_PRE := $(subst .a,-pre.a,$(DEMACLIB))
19DEMACLIB_OBJ_PRE := $(subst udiv32_arm.o,udiv32_arm-pre.o,$(DEMACLIB_OBJ))
20
21$(DEMACLIB_PRE): $(DEMACLIB_OBJ_PRE)
22 $(SILENT)$(shell rm -f $@)
23 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
24
25$(DEMACLIB): $(DEMACLIB_OBJ)
26 $(SILENT)$(shell rm -f $@)
27 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
28
29$(CODECDIR)/ape_free_iram.h: $(CODECDIR)/ape-pre.map
30 $(call PRINTS,GEN $(@F))perl -an \
31 -e 'if(/^PLUGIN_IRAM/){$$istart=hex($$F[1]);$$ilen=hex($$F[2])}' \
32 -e 'if(/iend = /){$$iend=hex($$F[0]);}' \
33 -e '}{if($$ilen){print"#define FREE_IRAM ".($$ilen+$$istart-$$iend)."\n";}' \
34 $(CODECDIR)/ape-pre.map \
35 > $@