1 # Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 # 3 # Use of this source code is governed by a BSD-style license 4 # that can be found in the LICENSE file in the root of the source 5 # tree. An additional intellectual property rights grant can be found 6 # in the file PATENTS. All contributing project authors may 7 # be found in the AUTHORS file in the root of the source tree. 8 9 LOCAL_PATH := $(call my-dir) 10 11 include $(CLEAR_VARS) 12 13 include $(LOCAL_PATH)/../../../android-webrtc.mk 14 15 LOCAL_ARM_MODE := arm 16 LOCAL_MODULE := libwebrtc_apm 17 LOCAL_MODULE_TAGS := optional 18 LOCAL_CPP_EXTENSION := .cc 19 LOCAL_SRC_FILES := \ 20 $(call all-proto-files-under, .) \ 21 audio_buffer.cc \ 22 audio_processing_impl.cc \ 23 echo_cancellation_impl.cc \ 24 echo_control_mobile_impl.cc \ 25 gain_control_impl.cc \ 26 high_pass_filter_impl.cc \ 27 level_estimator_impl.cc \ 28 noise_suppression_impl.cc \ 29 splitting_filter.cc \ 30 processing_component.cc \ 31 voice_detection_impl.cc 32 33 # Flags passed to both C and C++ files. 34 LOCAL_CFLAGS := \ 35 $(MY_WEBRTC_COMMON_DEFS) \ 36 '-DWEBRTC_NS_FIXED' 37 # floating point 38 # -DWEBRTC_NS_FLOAT' 39 40 LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm) 41 LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86) 42 LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips) 43 LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64) 44 LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64) 45 LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64) 46 47 LOCAL_C_INCLUDES := \ 48 $(LOCAL_PATH)/interface \ 49 $(LOCAL_PATH)/aec/interface \ 50 $(LOCAL_PATH)/aecm/interface \ 51 $(LOCAL_PATH)/agc/interface \ 52 $(LOCAL_PATH)/ns/interface \ 53 $(LOCAL_PATH)/../interface \ 54 $(LOCAL_PATH)/../.. \ 55 $(LOCAL_PATH)/../../common_audio/signal_processing/include \ 56 $(LOCAL_PATH)/../../common_audio/vad/include \ 57 $(LOCAL_PATH)/../../system_wrappers/interface \ 58 external/protobuf/src 59 60 LOCAL_SHARED_LIBRARIES := \ 61 libcutils \ 62 libdl 63 64 ifdef WEBRTC_STL 65 LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL) 66 LOCAL_SDK_VERSION := 14 67 LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL) 68 endif 69 70 include $(BUILD_STATIC_LIBRARY) 71 72 # apm process test app 73 74 include $(CLEAR_VARS) 75 76 LOCAL_MODULE_TAGS := tests 77 LOCAL_CPP_EXTENSION := .cc 78 LOCAL_SRC_FILES:= \ 79 $(call all-proto-files-under, .) \ 80 test/process_test.cc 81 82 # Flags passed to both C and C++ files. 83 LOCAL_CFLAGS := \ 84 $(MY_WEBRTC_COMMON_DEFS) 85 86 LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm) 87 LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86) 88 LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips) 89 LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64) 90 LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64) 91 LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64) 92 93 LOCAL_C_INCLUDES := \ 94 $(LOCAL_PATH)/interface \ 95 $(LOCAL_PATH)/../interface \ 96 $(LOCAL_PATH)/../.. \ 97 $(LOCAL_PATH)/../../system_wrappers/interface \ 98 99 MY_LIB_SUFFIX := 100 ifdef WEBRTC_STL 101 MY_LIB_SUFFIX := _$(WEBRTC_STL) 102 endif 103 104 LOCAL_SHARED_LIBRARIES := \ 105 libutils \ 106 libwebrtc_audio_preprocessing$(MY_LIB_SUFFIX) 107 108 LOCAL_MODULE:= webrtc_apm_process_test 109 110 ifndef WEBRTC_STL 111 LOCAL_SHARED_LIBRARIES += libprotobuf-cpp-lite 112 else 113 LOCAL_STATIC_LIBRARIES := \ 114 libprotobuf-cpp-lite 115 LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL) 116 LOCAL_SDK_VERSION := 14 117 LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL) 118 endif 119 include $(BUILD_NATIVE_TEST) 120 121 # apm unit test app 122 123 include $(CLEAR_VARS) 124 125 LOCAL_MODULE_TAGS := tests 126 LOCAL_CPP_EXTENSION := .cc 127 LOCAL_SRC_FILES:= \ 128 $(call all-proto-files-under, test) \ 129 test/unit_test.cc \ 130 test/testsupport/fileutils.cc 131 132 # Flags passed to both C and C++ files. 133 LOCAL_CFLAGS := \ 134 $(MY_WEBRTC_COMMON_DEFS) \ 135 '-DWEBRTC_APM_UNIT_TEST_FIXED_PROFILE' 136 137 LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm) 138 LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86) 139 LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips) 140 LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64) 141 LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64) 142 LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64) 143 144 LOCAL_C_INCLUDES := \ 145 $(LOCAL_PATH)/interface \ 146 $(LOCAL_PATH)/../interface \ 147 $(LOCAL_PATH)/../.. \ 148 $(LOCAL_PATH)/test \ 149 $(LOCAL_PATH)/../../system_wrappers/interface \ 150 $(LOCAL_PATH)/../../common_audio/signal_processing/include \ 151 external/protobuf/src 152 153 MY_LIB_SUFFIX := 154 ifdef WEBRTC_STL 155 MY_LIB_SUFFIX := _$(WEBRTC_STL) 156 endif 157 158 LOCAL_SHARED_LIBRARIES := \ 159 libwebrtc_audio_preprocessing$(MY_LIB_SUFFIX) 160 161 LOCAL_MODULE:= webrtc_apm_unit_test 162 163 ifndef WEBRTC_STL 164 LOCAL_SHARED_LIBRARIES += libprotobuf-cpp-lite 165 else 166 LOCAL_STATIC_LIBRARIES := \ 167 libprotobuf-cpp-lite 168 LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL) 169 LOCAL_SDK_VERSION := 14 170 LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL) 171 endif 172 include $(BUILD_NATIVE_TEST) 173