blob: 3bed4e4d80e37780b316635dc9d94ebc3f6be95c [file] [log] [blame]
xians@google.comd3185fe2011-09-12 12:24:39 +00001# 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{
10 'includes': [
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000011 '../build/common.gypi',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000012 ],
andrew@webrtc.org34235372013-04-30 23:43:26 +000013 'targets': [
14 {
15 'target_name': 'common_audio',
16 'type': 'static_library',
17 'dependencies': [
18 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
19 ],
20 'include_dirs': [
21 'resampler/include',
22 'signal_processing/include',
23 ],
24 'direct_dependent_settings': {
25 'include_dirs': [
26 'resampler/include',
27 'signal_processing/include',
28 'vad/include',
29 ],
30 },
31 'sources': [
32 'audio_util.cc',
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +000033 'fir_filter.cc',
34 'fir_filter.h',
35 'fir_filter_neon.h',
36 'fir_filter_sse.h',
andrew@webrtc.org34235372013-04-30 23:43:26 +000037 'include/audio_util.h',
38 'resampler/include/push_resampler.h',
39 'resampler/include/resampler.h',
40 'resampler/push_resampler.cc',
41 'resampler/push_sinc_resampler.cc',
42 'resampler/push_sinc_resampler.h',
43 'resampler/resampler.cc',
44 'resampler/sinc_resampler.cc',
45 'resampler/sinc_resampler.h',
46 'signal_processing/include/real_fft.h',
47 'signal_processing/include/signal_processing_library.h',
48 'signal_processing/include/spl_inl.h',
49 'signal_processing/auto_corr_to_refl_coef.c',
50 'signal_processing/auto_correlation.c',
51 'signal_processing/complex_fft.c',
andrew@webrtc.orgeed919d2013-05-30 16:38:36 +000052 'signal_processing/complex_fft_tables.h',
andrew@webrtc.org34235372013-04-30 23:43:26 +000053 'signal_processing/complex_bit_reverse.c',
54 'signal_processing/copy_set_operations.c',
55 'signal_processing/cross_correlation.c',
56 'signal_processing/division_operations.c',
57 'signal_processing/dot_product_with_scale.c',
58 'signal_processing/downsample_fast.c',
59 'signal_processing/energy.c',
60 'signal_processing/filter_ar.c',
61 'signal_processing/filter_ar_fast_q12.c',
62 'signal_processing/filter_ma_fast_q12.c',
63 'signal_processing/get_hanning_window.c',
64 'signal_processing/get_scaling_square.c',
65 'signal_processing/ilbc_specific_functions.c',
66 'signal_processing/levinson_durbin.c',
67 'signal_processing/lpc_to_refl_coef.c',
68 'signal_processing/min_max_operations.c',
69 'signal_processing/randomization_functions.c',
70 'signal_processing/refl_coef_to_lpc.c',
71 'signal_processing/real_fft.c',
72 'signal_processing/resample.c',
73 'signal_processing/resample_48khz.c',
74 'signal_processing/resample_by_2.c',
75 'signal_processing/resample_by_2_internal.c',
76 'signal_processing/resample_by_2_internal.h',
77 'signal_processing/resample_fractional.c',
78 'signal_processing/spl_init.c',
79 'signal_processing/spl_sqrt.c',
80 'signal_processing/spl_sqrt_floor.c',
81 'signal_processing/spl_version.c',
82 'signal_processing/splitting_filter.c',
83 'signal_processing/sqrt_of_one_minus_x_squared.c',
84 'signal_processing/vector_scaling_operations.c',
85 'vad/include/webrtc_vad.h',
86 'vad/webrtc_vad.c',
87 'vad/vad_core.c',
88 'vad/vad_core.h',
89 'vad/vad_filterbank.c',
90 'vad/vad_filterbank.h',
91 'vad/vad_gmm.c',
92 'vad/vad_gmm.h',
93 'vad/vad_sp.c',
94 'vad/vad_sp.h',
95 ],
96 'conditions': [
andrew@webrtc.orgc6a37552013-05-08 20:35:43 +000097 ['target_arch=="ia32" or target_arch=="x64"', {
98 'dependencies': ['common_audio_sse2',],
99 }],
fischman@webrtc.org31b4a5a2013-09-05 16:46:36 +0000100 ['target_arch=="arm" or target_arch=="armv7"', {
andrew@webrtc.org34235372013-04-30 23:43:26 +0000101 'sources': [
102 'signal_processing/complex_bit_reverse_arm.S',
103 'signal_processing/spl_sqrt_floor_arm.S',
104 ],
105 'sources!': [
106 'signal_processing/complex_bit_reverse.c',
107 'signal_processing/spl_sqrt_floor.c',
108 ],
109 'conditions': [
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000110 ['arm_version==7', {
andrew@webrtc.org34235372013-04-30 23:43:26 +0000111 'dependencies': ['common_audio_neon',],
112 'sources': [
113 'signal_processing/filter_ar_fast_q12_armv7.S',
114 ],
115 'sources!': [
116 'signal_processing/filter_ar_fast_q12.c',
117 ],
118 }],
119 ], # conditions
120 }],
121 ['target_arch=="mipsel"', {
122 'sources': [
andrew@webrtc.org8bf755d2013-09-18 17:40:46 +0000123 'signal_processing/include/spl_inl_mips.h',
andrew@webrtc.orgeed919d2013-05-30 16:38:36 +0000124 'signal_processing/complex_bit_reverse_mips.c',
125 'signal_processing/complex_fft_mips.c',
andrew@webrtc.org8bf755d2013-09-18 17:40:46 +0000126 'signal_processing/cross_correlation_mips.c',
andrew@webrtc.orgeed919d2013-05-30 16:38:36 +0000127 'signal_processing/downsample_fast_mips.c',
128 'signal_processing/filter_ar_fast_q12_mips.c',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000129 'signal_processing/min_max_operations_mips.c',
130 'signal_processing/resample_by_2_mips.c',
andrew@webrtc.org8bf755d2013-09-18 17:40:46 +0000131 'signal_processing/spl_sqrt_floor_mips.c',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000132 ],
andrew@webrtc.orgeed919d2013-05-30 16:38:36 +0000133 'sources!': [
134 'signal_processing/complex_bit_reverse.c',
135 'signal_processing/complex_fft.c',
136 'signal_processing/filter_ar_fast_q12.c',
andrew@webrtc.org8bf755d2013-09-18 17:40:46 +0000137 'signal_processing/spl_sqrt_floor.c',
138 ],
139 'conditions': [
140 ['mips_dsp_rev>0', {
141 'sources': [
142 'signal_processing/vector_scaling_operations_mips.c',
143 ],
144 }],
andrew@webrtc.orgeed919d2013-05-30 16:38:36 +0000145 ],
andrew@webrtc.org34235372013-04-30 23:43:26 +0000146 }],
147 ], # conditions
148 # Ignore warning on shift operator promotion.
149 'msvs_disabled_warnings': [ 4334, ],
150 },
151 ], # targets
152 'conditions': [
andrew@webrtc.orgc6a37552013-05-08 20:35:43 +0000153 ['target_arch=="ia32" or target_arch=="x64"', {
154 'targets': [
155 {
156 'target_name': 'common_audio_sse2',
157 'type': 'static_library',
158 'sources': [
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +0000159 'fir_filter_sse.cc',
andrew@webrtc.orgc6a37552013-05-08 20:35:43 +0000160 'resampler/sinc_resampler_sse.cc',
161 ],
162 'cflags': ['-msse2',],
163 'xcode_settings': {
164 'OTHER_CFLAGS': ['-msse2',],
165 },
166 },
167 ], # targets
168 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000169 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
andrew@webrtc.org34235372013-04-30 23:43:26 +0000170 'targets': [
171 {
172 'target_name': 'common_audio_neon',
173 'type': 'static_library',
174 'includes': ['../build/arm_neon.gypi',],
175 'sources': [
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +0000176 'fir_filter_neon.cc',
andrew@webrtc.orgc6a37552013-05-08 20:35:43 +0000177 'resampler/sinc_resampler_neon.cc',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000178 'signal_processing/cross_correlation_neon.S',
179 'signal_processing/downsample_fast_neon.S',
180 'signal_processing/min_max_operations_neon.S',
181 'signal_processing/vector_scaling_operations_neon.S',
182 ],
183 },
184 ], # targets
185 }],
186 ['include_tests==1', {
andrew@webrtc.org34235372013-04-30 23:43:26 +0000187 'targets' : [
188 {
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000189 'target_name': 'common_audio_unittests',
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000190 'type': '<(gtest_target_type)',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000191 'dependencies': [
192 'common_audio',
193 '<(webrtc_root)/test/test.gyp:test_support_main',
194 '<(DEPTH)/testing/gmock.gyp:gmock',
195 '<(DEPTH)/testing/gtest.gyp:gtest',
196 ],
197 'sources': [
198 'audio_util_unittest.cc',
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +0000199 'fir_filter_unittest.cc',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000200 'resampler/resampler_unittest.cc',
201 'resampler/push_resampler_unittest.cc',
202 'resampler/push_sinc_resampler_unittest.cc',
203 'resampler/sinc_resampler_unittest.cc',
204 'resampler/sinusoidal_linear_chirp_source.cc',
205 'resampler/sinusoidal_linear_chirp_source.h',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000206 'signal_processing/real_fft_unittest.cc',
207 'signal_processing/signal_processing_unittest.cc',
andrew@webrtc.org34235372013-04-30 23:43:26 +0000208 'vad/vad_core_unittest.cc',
209 'vad/vad_filterbank_unittest.cc',
210 'vad/vad_gmm_unittest.cc',
211 'vad/vad_sp_unittest.cc',
212 'vad/vad_unittest.cc',
213 'vad/vad_unittest.h',
214 ],
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000215 'conditions': [
216 # TODO(henrike): remove build_with_chromium==1 when the bots are
217 # using Chromium's buildbots.
henrike@webrtc.orge6e13912014-06-04 20:46:50 +0000218 ['build_with_chromium==1 and OS=="android"', {
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000219 'dependencies': [
220 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
221 ],
222 }],
223 ],
andrew@webrtc.org34235372013-04-30 23:43:26 +0000224 },
225 ], # targets
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000226 'conditions': [
227 # TODO(henrike): remove build_with_chromium==1 when the bots are using
228 # Chromium's buildbots.
henrike@webrtc.orge6e13912014-06-04 20:46:50 +0000229 ['build_with_chromium==1 and OS=="android"', {
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000230 'targets': [
231 {
232 'target_name': 'common_audio_unittests_apk_target',
233 'type': 'none',
234 'dependencies': [
235 '<(apk_tests_path):common_audio_unittests_apk',
236 ],
237 },
238 ],
239 }],
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000240 ['test_isolation_mode != "noop"', {
241 'targets': [
242 {
243 'target_name': 'common_audio_unittests_run',
244 'type': 'none',
245 'dependencies': [
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000246 'common_audio_unittests',
247 ],
248 'includes': [
kjellander@webrtc.org2a973172013-10-02 19:31:16 +0000249 '../build/isolate.gypi',
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000250 'common_audio_unittests.isolate',
251 ],
252 'sources': [
253 'common_audio_unittests.isolate',
254 ],
255 },
256 ],
257 }],
258 ],
andrew@webrtc.org34235372013-04-30 23:43:26 +0000259 }],
260 ], # conditions
xians@google.comd3185fe2011-09-12 12:24:39 +0000261}