1
2cur_dir := $(dir $(lastword $(MAKEFILE_LIST)))
3
4MULTIMEDIA_LIB_NAME := $(CHIP)_libmultimedia
5
6ifeq ($(ROM_UTILS_ON),1)
7MULTIMEDIA_LIB_NAME := $(MULTIMEDIA_LIB_NAME)_romaac
8endif
9
10ifeq ($(A2DP_CP_ACCEL),1)
11MULTIMEDIA_LIB_NAME := $(MULTIMEDIA_LIB_NAME)_cp
12endif
13
14ifeq ($(ANC_APP),1)
15MULTIMEDIA_LIB_NAME := $(MULTIMEDIA_LIB_NAME)_anc
16endif
17
18ifneq ($(SDK),1)
19mmlib_obj :=
20
21mmlib_obj += algorithm/fft/src/
22
23mmlib_obj += audio/process/adp/src/
24mmlib_obj += audio/process/anc/src/
25mmlib_obj += audio/process/fir2iir/src/
26ifeq ($(EQ_DRC_IN_CP), 0)
27mmlib_obj += audio/process/common/src/
28endif
29mmlib_obj += audio/process/drc/src/
30mmlib_obj += audio/process/filters/src/
31mmlib_obj += audio/process/limiter/src/
32mmlib_obj += audio/process/resample/src/
33mmlib_obj += audio/process/floatlimiter/src/
34
35ifeq ($(FM_ENABLE),1)
36mmlib_obj += fm/
37endif
38
39ifeq ($(A2DP_OPUS_ON),1)
40#mmlib_obj += opus121/src/
41endif
42
43ifeq ($(BT_APP),1)
44mmlib_obj += audio/codec/sbc/src/
45endif
46
47ifeq ($(A2DP_AAC_ON),1)
48aac_obj :=
49aac_obj += audio/codec/fdkaac_codec/libAACdec/src/
50aac_obj += audio/codec/fdkaac_codec/libAACenc/src/
51aac_obj += audio/codec/fdkaac_codec/libFDK/src/
52aac_obj += audio/codec/fdkaac_codec/libMpegTPDec/src/
53aac_obj += audio/codec/fdkaac_codec/libMpegTPEnc/src/
54aac_obj += audio/codec/fdkaac_codec/libPCMutils/src/
55aac_obj += audio/codec/fdkaac_codec/libSBRdec/src/
56aac_obj += audio/codec/fdkaac_codec/libSBRenc/src/
57aac_obj += audio/codec/fdkaac_codec/libSYS/src/
58ifeq ($(A2DP_CP_ACCEL),1)
59fdkaac_codec-y := $(aac_obj)
60mmlib_obj += fdkaac_codec.o
61else
62mmlib_obj += $(aac_obj)
63endif
64ifeq ($(ROM_UTILS_ON),1)
65subdir-ccflags-y += -DFDK_FUNC_ATTR=WEAK
66else
67subdir-ccflags-y += -DFDK_FUNC_ATTR=
68endif
69endif
70
71# for wifi app
72ifeq ($(OPUS_CODEC),1)
73mmlib_obj += audio/codec/opus/src/
74endif
75
76# for wifi app
77ifeq ($(PORTAUDIO),1)
78# mmlib_obj += portaudio/
79endif
80
81mmlib_obj += audio/codec/minimp3/
82
83#mmlib_obj += rbcodec/src/
84
85ifeq ($(SPEECH_LIB),1)
86mmlib_obj += speech/src/
87endif
88
89$(MULTIMEDIA_LIB_NAME)-y := $(mmlib_obj)
90endif
91
92rel_src_obj :=
93rel_src_obj += audio/process/anc/cfg/
94rel_src_obj += audio/process/filters/cfg/
95rel_src_obj += audio/process/resample/coef/
96
97obj-y := $(MULTIMEDIA_LIB_NAME).a $(rel_src_obj)
98
99subdir-ccflags-y += \
100	-Iutils/heap \
101	-Iinclude/cmsis_dsp \
102	-Iinclude/cmsis_nn \
103	-Iservices/cp_server
104
105