• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9LOCAL_PATH := $(call my-dir)
10
11include $(CLEAR_VARS)
12
13include $(LOCAL_PATH)/../../../android-webrtc.mk
14
15LOCAL_ARM_MODE := arm
16LOCAL_MODULE := libwebrtc_apm
17LOCAL_MODULE_TAGS := optional
18LOCAL_CPP_EXTENSION := .cc
19LOCAL_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    rms_level.cc \
30    splitting_filter.cc \
31    three_band_filter_bank.cc \
32    processing_component.cc \
33    voice_detection_impl.cc
34
35# Flags passed to both C and C++ files.
36LOCAL_CFLAGS := \
37    $(MY_WEBRTC_COMMON_DEFS) \
38    '-DWEBRTC_NS_FIXED' \
39    '-DWEBRTC_ANDROID_PLATFORM_BUILD' \
40    '-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
41#   floating point
42#   -DWEBRTC_NS_FLOAT'
43
44LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm)
45LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86)
46LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips)
47LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64)
48LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64)
49LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64)
50
51LOCAL_C_INCLUDES := \
52    $(LOCAL_PATH)/include \
53    $(LOCAL_PATH)/aec/include \
54    $(LOCAL_PATH)/aecm/include \
55    $(LOCAL_PATH)/agc/include \
56    $(LOCAL_PATH)/ns/include \
57    $(LOCAL_PATH)/../interface \
58    $(LOCAL_PATH)/../../.. \
59    $(LOCAL_PATH)/../../common_audio/signal_processing/include \
60    $(LOCAL_PATH)/../../common_audio/vad/include \
61    $(LOCAL_PATH)/../../system_wrappers/include \
62    external/protobuf/src
63
64ifdef WEBRTC_STL
65LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL)
66LOCAL_SDK_VERSION := 14
67LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL)
68endif
69
70include $(BUILD_STATIC_LIBRARY)
71
72# apm process test app
73
74include $(CLEAR_VARS)
75
76LOCAL_MODULE_TAGS := tests
77LOCAL_CPP_EXTENSION := .cc
78LOCAL_SRC_FILES:= \
79    $(call all-proto-files-under, .) \
80    test/process_test.cc \
81    test/test_utils.cc \
82    test/protobuf_utils.cc \
83    ../../common_audio/wav_file.cc \
84    ../../common_audio/wav_header.cc \
85    ../../system_wrappers/source/tick_util.cc \
86    ../../test/testsupport/fileutils.cc \
87    ../../test/testsupport/perf_test.cc \
88
89# Flags passed to both C and C++ files.
90LOCAL_CFLAGS := \
91    $(MY_WEBRTC_COMMON_DEFS) \
92    '-DWEBRTC_ANDROID_PLATFORM_BUILD' \
93    '-DWEBRTC_AUDIOPROC_DEBUG_DUMP'
94
95LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm)
96LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86)
97LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips)
98LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64)
99LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64)
100LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64)
101
102LOCAL_C_INCLUDES := \
103    $(LOCAL_PATH)/include \
104    $(LOCAL_PATH)/../interface \
105    $(LOCAL_PATH)/../../.. \
106    $(LOCAL_PATH)/../../system_wrappers/include \
107
108MY_LIB_SUFFIX :=
109ifdef WEBRTC_STL
110MY_LIB_SUFFIX := _$(WEBRTC_STL)
111endif
112
113LOCAL_SHARED_LIBRARIES := \
114    libutils \
115    libwebrtc_audio_preprocessing$(MY_LIB_SUFFIX) \
116
117LOCAL_MODULE:= webrtc_apm_process_test
118
119ifndef WEBRTC_STL
120LOCAL_SHARED_LIBRARIES += libprotobuf-cpp-lite
121else
122LOCAL_STATIC_LIBRARIES := \
123    libprotobuf-cpp-lite-ndk
124LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL)
125LOCAL_SDK_VERSION := 14
126LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL)
127endif
128
129include $(BUILD_NATIVE_TEST)
130
131# apm unit test app
132
133include $(CLEAR_VARS)
134
135LOCAL_MODULE_TAGS := tests
136LOCAL_CPP_EXTENSION := .cc
137LOCAL_SRC_FILES:= \
138    $(call all-proto-files-under, .) \
139    test/audio_processing_unittest.cc \
140    test/protobuf_utils.cc \
141    test/test_utils.cc \
142    ../../common_audio/resampler/push_resampler.cc \
143    ../../test/testsupport/fileutils.cc
144
145LOCAL_C_INCLUDES := \
146    $(LOCAL_PATH)/../../.. \
147
148# Flags passed to both C and C++ files.
149LOCAL_CFLAGS := \
150    $(MY_WEBRTC_COMMON_DEFS) \
151    '-DWEBRTC_AUDIOPROC_FIXED_PROFILE' \
152    '-DWEBRTC_ANDROID_PLATFORM_BUILD' \
153    '-DWEBRTC_AUDIOPROC_DEBUG_DUMP' \
154
155LOCAL_CFLAGS_arm := $(MY_WEBRTC_COMMON_DEFS_arm)
156LOCAL_CFLAGS_x86 := $(MY_WEBRTC_COMMON_DEFS_x86)
157LOCAL_CFLAGS_mips := $(MY_WEBRTC_COMMON_DEFS_mips)
158LOCAL_CFLAGS_arm64 := $(MY_WEBRTC_COMMON_DEFS_arm64)
159LOCAL_CFLAGS_x86_64 := $(MY_WEBRTC_COMMON_DEFS_x86_64)
160LOCAL_CFLAGS_mips64 := $(MY_WEBRTC_COMMON_DEFS_mips64)
161
162LOCAL_C_INCLUDES := \
163    $(LOCAL_PATH)/include \
164    $(LOCAL_PATH)/../interface \
165    $(LOCAL_PATH)/../.. \
166    $(LOCAL_PATH)/../../.. \
167    $(LOCAL_PATH)/../../../test \
168    $(LOCAL_PATH)/../../system_wrappers/include \
169    $(LOCAL_PATH)/../../../webrtc/base \
170    $(LOCAL_PATH)/../../common_audio/signal_processing/include \
171    external/protobuf/src
172
173MY_LIB_SUFFIX :=
174ifdef WEBRTC_STL
175MY_LIB_SUFFIX := _$(WEBRTC_STL)
176endif
177
178LOCAL_SHARED_LIBRARIES := \
179    libwebrtc_audio_preprocessing$(MY_LIB_SUFFIX)
180
181LOCAL_MODULE:= webrtc_apm_unit_test
182
183ifndef WEBRTC_STL
184LOCAL_SHARED_LIBRARIES += libprotobuf-cpp-lite
185else
186LOCAL_STATIC_LIBRARIES := \
187    libprotobuf-cpp-lite
188LOCAL_NDK_STL_VARIANT := $(WEBRTC_STL)
189LOCAL_SDK_VERSION := 14
190LOCAL_MODULE := $(LOCAL_MODULE)_$(WEBRTC_STL)
191endif
192
193include $(BUILD_NATIVE_TEST)
194