1
2cur_dir := $(dir $(lastword $(MAKEFILE_LIST)))
3
4obj_s := $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)*.s))
5obj_c := $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)*.c))
6obj_cpp := $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)*.cpp))
7
8obj-y := $(obj_c:.c=.o) $(obj_s:.S=.o) $(obj_cpp:.cpp=.o)
9
10ccflags-y := \
11	-Iservices/multimedia/audio/process/filters/include \
12	-Iservices/multimedia/audio/process/common/include \
13	-Iservices/multimedia/audio/process/drc/include \
14	-Iservices/multimedia/audio/process/limiter/include \
15	-Iservices/multimedia/speech/inc \
16	-Iservices/nv_section/aud_section \
17	-Iservices/nv_section/include \
18	-Iutils/heap/
19
20ifeq ($(ALSA_AUDIO_PROCESS_MODE_CHECK), 1)
21ccflags-y += -Iservices/wifi_app/alsa_adapter/
22endif
23
24ifeq ($(EQ_DRC_IN_CP), 1)
25ccflags-y += -Iservices/cp_server/
26endif
27
28ifeq ($(HW_FIR_EQ_PROCESS),1)
29ccflags-y += -D__HW_FIR_EQ_PROCESS__
30endif
31
32ifeq ($(HW_IIR_EQ_PROCESS),1)
33ccflags-y += -D__HW_IIR_EQ_PROCESS__
34endif
35
36ifeq ($(SW_IIR_EQ_PROCESS),1)
37ccflags-y += -D__SW_IIR_EQ_PROCESS__
38endif
39
40ifeq ($(AUDIO_DRC),1)
41ccflags-y += -D__AUDIO_DRC__
42endif
43
44ifeq ($(AUDIO_DRC2),1)
45ccflags-y += -D__AUDIO_DRC2__
46endif
47
48ifeq ($(AUDIO_RESAMPLE),1)
49ccflags-y += -D__AUDIO_RESAMPLE__
50endif
51
52ifeq ($(HW_DAC_IIR_EQ_PROCESS),1)
53ccflags-y += -D__HW_DAC_IIR_EQ_PROCESS__
54ifneq ($(filter best2300p best1400 best3001 best2300 best2000 best1000,$(CHIP)),)
55ifneq ($(CHIP_SUBTYPE),best1402)
56ifeq ($(ANC_APP),1)
57$(error "error: ANC and Hardware codec iir can't be used in the same")
58endif
59endif
60endif
61endif
62
63ifeq ($(FIR_HIGHSPEED),1)
64ccflags-y += -DFIR_HIGHSPEED
65endif
66
67ifeq ($(PC_CMD_UART),1)
68CFLAGS_audio_process.o += -D__PC_CMD_UART__
69endif
70
71ifeq ($(USB_AUDIO_APP), 1)
72CFLAGS_audio_process.o += -DUSB_AUDIO_APP
73endif
74
75ifeq ($(SPEECH_LIB),1)
76CFLAGS_audio_spectrum.o += -DSPEECH_LIB
77endif
78
79ifeq ($(USB_EQ_TUNING), 1)
80ccflags-y += -DUSB_EQ_TUNING
81endif
82
83CFLAGS_audio_spectrum.o += -DUSE_MED_MALLOC
84