| LOCAL_PATH := $(call my-dir) |
| |
| #build libacm.so |
| include $(CLEAR_VARS) |
| |
| LOCAL_SRC_FILES := src/acm_xml_parser.c \ |
| src/acm_aph.c \ |
| src/acm_api.c \ |
| src/acm_i2c_adaptor.c \ |
| src/acm_record_mode.c |
| |
| LOCAL_MODULE := libacm |
| LOCAL_MODULE_TAGS := optional |
| |
| LOCAL_C_INCLUDES := \ |
| external/libxml2/include \ |
| vendor/marvell/external/alsa-lib/include \ |
| external/icu4c/common \ |
| external/openssl/include \ |
| $(LOCAL_PATH)/inc |
| |
| LOCAL_SHARED_LIBRARIES := \ |
| libxml2 \ |
| libcutils \ |
| libasound |
| |
| ifeq ($(strip $(BOARD_USES_GPIO_SPKR_SWITCH)),true) |
| LOCAL_CFLAGS += -DWITH_GPIO_SPKR_SWITCH |
| LOCAL_SRC_FILES += src/acm_gpio.c |
| ifneq ($(BOARD_GPIO_SPKR_SWITCH_PATH),) |
| LOCAL_CFLAGS += -DGPIO_SPKR_SWITCH_PATH=\"$(BOARD_GPIO_SPKR_SWITCH_PATH)\" |
| endif |
| endif |
| |
| ifeq ($(strip $(BOARD_AUDIO_COMPONENT_CODEC)),ELBA) |
| LOCAL_CFLAGS += -DCODEC_ELBA |
| LOCAL_SRC_FILES += src/acm_elba.c |
| else ifeq ($(strip $(BOARD_AUDIO_COMPONENT_CODEC)),GELATO) |
| LOCAL_CFLAGS += -DCODEC_GELATO |
| LOCAL_SRC_FILES += src/acm_gelato.c |
| endif |
| ifeq ($(strip $(BOARD_AUDIO_COMPONENT_PMIC)),USTICA) |
| LOCAL_CFLAGS += -DPMIC_USTICA |
| LOCAL_SRC_FILES += src/acm_ustica.c |
| else ifeq ($(strip $(BOARD_AUDIO_COMPONENT_PMIC)),PIANOSA) |
| LOCAL_CFLAGS += -DPMIC_PIANOSA |
| LOCAL_SRC_FILES += src/acm_pianosa.c |
| endif |
| ifeq ($(BOARD_ENABLE_AUDIO_CALIBRATION),true) |
| ifneq ($(BOARD_AUDIO_CALIBRATION_DIR),) |
| LOCAL_CFLAGS += -DAUDIO_CALIBRATION_DIR=\"$(BOARD_AUDIO_CALIBRATION_DIR)\" |
| endif |
| LOCAL_CFLAGS += -DWITH_AUDIO_CALIBRATION |
| LOCAL_SRC_FILES += src/ac_thread.c |
| LOCAL_C_INCLUDES += $(LOCAL_PATH)/inc |
| ifeq ($(BOARD_ENABLE_BLUETOOTH_NREC),true) |
| LOCAL_CFLAGS += -DWITH_NREC |
| endif |
| ifeq ($(BOARD_ENABLE_LOOPBACK),true) |
| LOCAL_CFLAGS += -DWITH_LOOPBACK |
| endif |
| ifeq ($(BOARD_USES_DMIC),true) |
| LOCAL_CFLAGS += -DWITH_DMIC |
| endif |
| ifeq ($(BOARD_USES_MIC1),true) |
| LOCAL_CFLAGS += -DWITH_MIC1 |
| endif |
| ifeq ($(BOARD_USES_MIC2),true) |
| LOCAL_CFLAGS += -DWITH_MIC2 |
| endif |
| ifeq ($(BOARD_WITH_STEREO_SPKR),true) |
| LOCAL_CFLAGS += -DWITH_STEREO_SPKR |
| endif |
| ifeq ($(BOARD_CODEC_HIFI_SLAVE),true) |
| LOCAL_CFLAGS += -DCODEC_HIFI_SLAVE |
| endif |
| ifeq ($(BOARD_CODEC_VC_SLAVE),true) |
| LOCAL_CFLAGS += -DCODEC_VC_SLAVE |
| endif |
| ifeq ($(BOARD_CODEC_FM_SLAVE),true) |
| LOCAL_CFLAGS += -DCODEC_FM_SLAVE |
| endif |
| ifeq ($(BOARD_CODEC_WB_RATE),true) |
| LOCAL_CFLAGS += -DCODEC_WB_RATE |
| endif |
| ifeq ($(BOARD_ENABLE_SIDETONE),true) |
| LOCAL_CFLAGS += -DWITH_SIDETONE |
| endif |
| endif |
| |
| LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) -D_POSIX_SOURCE |
| |
| include $(BUILD_SHARED_LIBRARY) |