2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 DEMACLIB
:= $(CODECDIR
)/libdemac.a
12 DEMACLIB_SRC
:= $(call preprocess
, $(APPSDIR
)/codecs
/demac
/libdemac
/SOURCES
)
13 DEMACLIB_OBJ
:= $(call c2obj
, $(DEMACLIB_SRC
))
14 OTHER_SRC
+= $(DEMACLIB_SRC
)
16 OTHER_SRC
+= $(APPSDIR
)/codecs
/demac
/libdemac
/udiv32_arm-pre.S
18 DEMACLIB_PRE
:= $(subst .a
,-pre.a
,$(DEMACLIB
))
19 DEMACLIB_OBJ_PRE
:= $(subst udiv32_arm.o
,udiv32_arm-pre.o
,$(DEMACLIB_OBJ
))
21 $(DEMACLIB_PRE
): $(DEMACLIB_OBJ_PRE
)
22 $(SILENT
)$(shell rm -f
$@
)
23 $(call PRINTS
,AR
$(@F
))$(AR
) rcs
$@
$^
>/dev
/null
25 $(DEMACLIB
): $(DEMACLIB_OBJ
)
26 $(SILENT
)$(shell rm -f
$@
)
27 $(call PRINTS
,AR
$(@F
))$(AR
) rcs
$@
$^
>/dev
/null
29 DEMACFLAGS
= $(filter-out -O
%,$(CODECFLAGS
))
32 $(CODECDIR
)/ape_free_iram.h
: $(CODECDIR
)/ape-pre.map
33 $(call PRINTS
,GEN
$(@F
))perl
-an \
34 -e
'if(/^PLUGIN_IRAM/){$$istart=hex($$F[1]);$$ilen=hex($$F[2])}' \
35 -e
'if(/iend = /){$$iend=hex($$F[0]);}' \
36 -e
'}{if($$ilen){print"#define FREE_IRAM ".($$ilen+$$istart-$$iend)."\n";}' \
37 $(CODECDIR
)/ape-pre.map \
40 $(CODECDIR
)/demac
/%.o
: $(ROOTDIR
)/apps
/codecs
/demac
/%.c
41 $(SILENT
)mkdir
-p
$(dir $@
)
42 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(DEMACFLAGS
) -c
$< -o
$@