1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 'use_system_libsrtp%': 0,
17 'srtp/crypto/include',
38 'HAVE_BYTESWAP_METHODS_H',
39 # All Windows architectures are this way.
40 'SIZEOF_UNSIGNED_LONG=4',
41 'SIZEOF_UNSIGNED_LONG_LONG=8',
44 ['target_arch=="x64" or target_arch=="ia32"', {
49 ['target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64" \
50 or target_arch=="mipsel" or target_arch=="mips64el"', {
52 # TODO(leozwang): CPU_RISC doesn't work properly on android/arm and
53 # mips platforms for unknown reasons, need to investigate the root
54 # cause of it. CPU_RISC is used for optimization only, and CPU_CISC
55 # should just work just fine, it has been tested on android/arm with
56 # srtp test applications and libjingle.
60 ['target_arch=="mipsel" or target_arch=="arm" or target_arch=="armv7" or target_arch=="ia32"', {
62 # Define FORCE_64BIT_ALIGN to avoid alignment-related-crashes like
63 # crbug/414919. Without this, aes_cbc_alloc will allocate an
64 # aes_cbc_ctx_t not 64-bit aligned and the v128_t members of
65 # aes_cbc_ctx_t will not be 64-bit aligned, which breaks the
66 # compiler optimizations that assume 64-bit alignment of v128_t.
71 'direct_dependent_settings': {
75 'srtp/crypto/include',
96 'HAVE_BYTESWAP_METHODS_H',
97 # All Windows architectures are this way.
98 'SIZEOF_UNSIGNED_LONG=4',
99 'SIZEOF_UNSIGNED_LONG_LONG=8',
102 ['target_arch=="x64" or target_arch=="ia32"', {
111 ['use_system_libsrtp==0', {
114 'target_name': 'libsrtp',
115 'type': 'static_library',
118 'srtp/include/ekt.h',
119 'srtp/include/getopt_s.h',
120 'srtp/include/rtp.h',
121 'srtp/include/rtp_priv.h',
122 'srtp/include/srtp.h',
123 'srtp/include/srtp_priv.h',
124 'srtp/include/ut_sim.h',
127 'srtp/crypto/include/aes_cbc.h',
128 'srtp/crypto/include/aes.h',
129 'srtp/crypto/include/aes_icm.h',
130 'srtp/crypto/include/alloc.h',
131 'srtp/crypto/include/auth.h',
132 'srtp/crypto/include/cipher.h',
133 'srtp/crypto/include/cryptoalg.h',
134 'srtp/crypto/include/crypto.h',
135 'srtp/crypto/include/crypto_kernel.h',
136 'srtp/crypto/include/crypto_math.h',
137 'srtp/crypto/include/crypto_types.h',
138 'srtp/crypto/include/datatypes.h',
139 'srtp/crypto/include/err.h',
140 'srtp/crypto/include/gf2_8.h',
141 'srtp/crypto/include/hmac.h',
142 'srtp/crypto/include/integers.h',
143 'srtp/crypto/include/kernel_compat.h',
144 'srtp/crypto/include/key.h',
145 'srtp/crypto/include/null_auth.h',
146 'srtp/crypto/include/null_cipher.h',
147 'srtp/crypto/include/prng.h',
148 'srtp/crypto/include/rand_source.h',
149 'srtp/crypto/include/rdb.h',
150 'srtp/crypto/include/rdbx.h',
151 'srtp/crypto/include/sha1.h',
152 'srtp/crypto/include/stat.h',
153 'srtp/crypto/include/xfm.h',
159 'srtp/crypto/cipher/aes.c',
160 'srtp/crypto/cipher/aes_cbc.c',
161 'srtp/crypto/cipher/aes_icm.c',
162 'srtp/crypto/cipher/cipher.c',
163 'srtp/crypto/cipher/null_cipher.c',
164 'srtp/crypto/hash/auth.c',
165 'srtp/crypto/hash/hmac.c',
166 'srtp/crypto/hash/null_auth.c',
167 'srtp/crypto/hash/sha1.c',
168 'srtp/crypto/kernel/alloc.c',
169 'srtp/crypto/kernel/crypto_kernel.c',
170 'srtp/crypto/kernel/err.c',
171 'srtp/crypto/kernel/key.c',
172 'srtp/crypto/math/datatypes.c',
173 'srtp/crypto/math/gf2_8.c',
174 'srtp/crypto/math/stat.c',
175 'srtp/crypto/replay/rdb.c',
176 'srtp/crypto/replay/rdbx.c',
177 'srtp/crypto/replay/ut_sim.c',
178 'srtp/crypto/rng/ctr_prng.c',
179 'srtp/crypto/rng/prng.c',
180 'srtp/crypto/rng/rand_source.c',
184 'target_name': 'rdbx_driver',
185 'type': 'executable',
190 'srtp/include/getopt_s.h',
191 'srtp/test/getopt_s.c',
192 'srtp/test/rdbx_driver.c',
196 'target_name': 'srtp_driver',
197 'type': 'executable',
202 'srtp/include/getopt_s.h',
203 'srtp/include/srtp_priv.h',
204 'srtp/test/getopt_s.c',
205 'srtp/test/srtp_driver.c',
209 'target_name': 'roc_driver',
210 'type': 'executable',
215 'srtp/crypto/include/rdbx.h',
216 'srtp/include/ut_sim.h',
217 'srtp/test/roc_driver.c',
221 'target_name': 'replay_driver',
222 'type': 'executable',
227 'srtp/crypto/include/rdbx.h',
228 'srtp/include/ut_sim.h',
229 'srtp/test/replay_driver.c',
233 'target_name': 'rtpw',
234 'type': 'executable',
239 'srtp/include/getopt_s.h',
240 'srtp/include/rtp.h',
241 'srtp/include/srtp.h',
242 'srtp/crypto/include/datatypes.h',
243 'srtp/test/getopt_s.c',
256 'target_name': 'srtp_test_cipher_driver',
257 'type': 'executable',
262 'srtp/crypto/test/cipher_driver.c',
266 'target_name': 'srtp_test_datatypes_driver',
267 'type': 'executable',
272 'srtp/crypto/test/datatypes_driver.c',
276 'target_name': 'srtp_test_stat_driver',
277 'type': 'executable',
282 'srtp/crypto/test/stat_driver.c',
286 'target_name': 'srtp_test_sha1_driver',
287 'type': 'executable',
292 'srtp/crypto/test/sha1_driver.c',
296 'target_name': 'srtp_test_kernel_driver',
297 'type': 'executable',
302 'srtp/crypto/test/kernel_driver.c',
306 'target_name': 'srtp_test_aes_calc',
307 'type': 'executable',
312 'srtp/crypto/test/aes_calc.c',
316 'target_name': 'srtp_test_rand_gen',
317 'type': 'executable',
322 'srtp/crypto/test/rand_gen.c',
326 'target_name': 'srtp_test_env',
327 'type': 'executable',
332 'srtp/crypto/test/env.c',
336 'target_name': 'srtp_runtest',
344 'srtp_test_cipher_driver',
345 'srtp_test_datatypes_driver',
346 'srtp_test_stat_driver',
347 'srtp_test_sha1_driver',
348 'srtp_test_kernel_driver',
349 'srtp_test_aes_calc',
350 'srtp_test_rand_gen',
355 }, { # use_system_libsrtp==1
358 'target_name': 'libsrtp',
360 'direct_dependent_settings': {
362 'USE_SYSTEM_LIBSRTP',