Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: build/secondary/third_party/libsrtp/BUILD.gn

Issue 981593002: Roll src/third_party/libsrtp 6446144:f0957e8 (svn 292694:295151) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Roll to libsrtp 1.5.2 Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 declare_args() { 5 declare_args() {
6 use_system_libsrtp = false 6 use_system_libsrtp = false
7 use_srtp_boringssl = true
7 } 8 }
8 9
9 config("libsrtp_config") { 10 config("libsrtp_config") {
10 defines = [ 11 defines = [
12 "HAVE_CONFIG_H",
11 "HAVE_STDLIB_H", 13 "HAVE_STDLIB_H",
12 "HAVE_STRING_H", 14 "HAVE_STRING_H",
15 "TESTAPP_SOURCE",
13 ] 16 ]
14 17
15 include_dirs = [ 18 include_dirs = [
16 "config", 19 "config",
17 "srtp/include", 20 "srtp/include",
18 "srtp/crypto/include", 21 "srtp/crypto/include",
19 ] 22 ]
20 23
24 if (use_srtp_boringssl) {
25 defines += [ "OPENSSL" ]
26 }
27
21 if (is_posix) { 28 if (is_posix) {
22 defines += [ 29 defines += [
23 "HAVE_INT16_T", 30 "HAVE_INT16_T",
24 "HAVE_INT32_T", 31 "HAVE_INT32_T",
25 "HAVE_INT8_T", 32 "HAVE_INT8_T",
26 "HAVE_UINT16_T", 33 "HAVE_UINT16_T",
27 "HAVE_UINT32_T", 34 "HAVE_UINT32_T",
28 "HAVE_UINT64_T", 35 "HAVE_UINT64_T",
29 "HAVE_UINT8_T", 36 "HAVE_UINT8_T",
30 "HAVE_STDINT_H", 37 "HAVE_STDINT_H",
31 "HAVE_INTTYPES_H", 38 "HAVE_INTTYPES_H",
32 "HAVE_NETINET_IN_H", 39 "HAVE_NETINET_IN_H",
33 "INLINE=inline", 40 "HAVE_ARPA_INET_H",
41 "HAVE_UNISTD_H",
34 ] 42 ]
43 cflags = [ "-Wno-unused-variable" ]
35 } 44 }
36 45
37 if (is_win) { 46 if (is_win) {
38 defines += [ 47 defines += [
39 "INLINE=__inline",
40 "HAVE_BYTESWAP_METHODS_H", 48 "HAVE_BYTESWAP_METHODS_H",
41 49
42 # All Windows architectures are this way. 50 # All Windows architectures are this way.
43 "SIZEOF_UNSIGNED_LONG=4", 51 "SIZEOF_UNSIGNED_LONG=4",
44 "SIZEOF_UNSIGNED_LONG_LONG=8", 52 "SIZEOF_UNSIGNED_LONG_LONG=8",
45 ] 53 ]
46 } 54 }
47 55
48 if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm") { 56 if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm") {
49 defines += [ 57 defines += [
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 "srtp/crypto/rng/ctr_prng.c", 150 "srtp/crypto/rng/ctr_prng.c",
143 "srtp/crypto/rng/prng.c", 151 "srtp/crypto/rng/prng.c",
144 "srtp/crypto/rng/rand_source.c", 152 "srtp/crypto/rng/rand_source.c",
145 "srtp/srtp/ekt.c", 153 "srtp/srtp/ekt.c",
146 "srtp/srtp/srtp.c", 154 "srtp/srtp/srtp.c",
147 ] 155 ]
148 156
149 if (is_clang) { 157 if (is_clang) {
150 cflags = [ "-Wno-implicit-function-declaration" ] 158 cflags = [ "-Wno-implicit-function-declaration" ]
151 } 159 }
160
161 if (use_srtp_boringssl) {
162 deps = [
163 "//third_party/boringssl:boringssl",
164 ]
165 sources -= [
166 "srtp/crypto/cipher/aes_cbc.c",
167 "srtp/crypto/cipher/aes_icm.c",
168 "srtp/crypto/hash/hmac.c",
169 "srtp/crypto/hash/sha1.c",
170 "srtp/crypto/rng/ctr_prng.c",
171 "srtp/crypto/rng/prng.c",
172 ]
173 sources += [
174 "srtp/crypto/cipher/aes_gcm_ossl.c",
175 "srtp/crypto/cipher/aes_icm_ossl.c",
176 "srtp/crypto/hash/hmac_ossl.c",
177 "srtp/crypto/include/aes_gcm_ossl.h",
178 "srtp/crypto/include/aes_icm_ossl.h",
179 ]
180 }
152 } 181 }
153 182
154 # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're 183 # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're
155 # not very broken, so could probably be made to work if it's useful. 184 # not very broken, so could probably be made to work if it's useful.
156 if (!is_win) { 185 if (!is_win) {
157 executable("rdbx_driver") { 186 executable("rdbx_driver") {
158 configs -= [ "//build/config/compiler:chromium_code" ] 187 configs -= [ "//build/config/compiler:chromium_code" ]
159 configs += [ "//build/config/compiler:no_chromium_code" ] 188 configs += [ "//build/config/compiler:no_chromium_code" ]
160 deps = [ 189 deps = [
161 ":libsrtp", 190 ":libsrtp",
162 ] 191 ]
192 if (use_srtp_boringssl) {
193 deps += [ "//third_party/boringssl:boringssl" ]
194 }
163 sources = [ 195 sources = [
164 "srtp/include/getopt_s.h", 196 "srtp/include/getopt_s.h",
165 "srtp/test/getopt_s.c", 197 "srtp/test/getopt_s.c",
166 "srtp/test/rdbx_driver.c", 198 "srtp/test/rdbx_driver.c",
167 ] 199 ]
168 } 200 }
169 201
170 executable("srtp_driver") { 202 executable("srtp_driver") {
171 configs -= [ "//build/config/compiler:chromium_code" ] 203 configs -= [ "//build/config/compiler:chromium_code" ]
172 configs += [ "//build/config/compiler:no_chromium_code" ] 204 configs += [ "//build/config/compiler:no_chromium_code" ]
173 deps = [ 205 deps = [
174 ":libsrtp", 206 ":libsrtp",
175 ] 207 ]
208 if (use_srtp_boringssl) {
209 deps += [ "//third_party/boringssl:boringssl" ]
210 }
176 sources = [ 211 sources = [
177 "srtp/include/getopt_s.h", 212 "srtp/include/getopt_s.h",
178 "srtp/include/srtp_priv.h", 213 "srtp/include/srtp_priv.h",
179 "srtp/test/getopt_s.c", 214 "srtp/test/getopt_s.c",
180 "srtp/test/srtp_driver.c", 215 "srtp/test/srtp_driver.c",
181 ] 216 ]
182 } 217 }
183 218
184 executable("roc_driver") { 219 executable("roc_driver") {
185 configs -= [ "//build/config/compiler:chromium_code" ] 220 configs -= [ "//build/config/compiler:chromium_code" ]
186 configs += [ "//build/config/compiler:no_chromium_code" ] 221 configs += [ "//build/config/compiler:no_chromium_code" ]
187 deps = [ 222 deps = [
188 ":libsrtp", 223 ":libsrtp",
189 ] 224 ]
225 if (use_srtp_boringssl) {
226 deps += [ "//third_party/boringssl:boringssl" ]
227 }
190 sources = [ 228 sources = [
191 "srtp/crypto/include/rdbx.h", 229 "srtp/crypto/include/rdbx.h",
192 "srtp/include/ut_sim.h", 230 "srtp/include/ut_sim.h",
193 "srtp/test/roc_driver.c", 231 "srtp/test/roc_driver.c",
194 ] 232 ]
195 } 233 }
196 234
197 executable("replay_driver") { 235 executable("replay_driver") {
198 configs -= [ "//build/config/compiler:chromium_code" ] 236 configs -= [ "//build/config/compiler:chromium_code" ]
199 configs += [ "//build/config/compiler:no_chromium_code" ] 237 configs += [ "//build/config/compiler:no_chromium_code" ]
200 deps = [ 238 deps = [
201 ":libsrtp", 239 ":libsrtp",
202 ] 240 ]
241 if (use_srtp_boringssl) {
242 deps += [ "//third_party/boringssl:boringssl" ]
243 }
203 sources = [ 244 sources = [
204 "srtp/crypto/include/rdbx.h", 245 "srtp/crypto/include/rdbx.h",
205 "srtp/include/ut_sim.h", 246 "srtp/include/ut_sim.h",
206 "srtp/test/replay_driver.c", 247 "srtp/test/replay_driver.c",
207 ] 248 ]
208 } 249 }
209 250
210 executable("rtpw") { 251 executable("rtpw") {
211 configs -= [ "//build/config/compiler:chromium_code" ] 252 configs -= [ "//build/config/compiler:chromium_code" ]
212 configs += [ "//build/config/compiler:no_chromium_code" ] 253 configs += [ "//build/config/compiler:no_chromium_code" ]
213 deps = [ 254 deps = [
214 ":libsrtp", 255 ":libsrtp",
215 ] 256 ]
257 if (use_srtp_boringssl) {
258 deps += [ "//third_party/boringssl:boringssl" ]
259 }
216 sources = [ 260 sources = [
217 "srtp/crypto/include/datatypes.h", 261 "srtp/crypto/include/datatypes.h",
218 "srtp/include/getopt_s.h", 262 "srtp/include/getopt_s.h",
219 "srtp/include/rtp.h", 263 "srtp/include/rtp.h",
220 "srtp/include/srtp.h", 264 "srtp/include/srtp.h",
221 "srtp/test/getopt_s.c", 265 "srtp/test/getopt_s.c",
222 "srtp/test/rtp.c", 266 "srtp/test/rtp.c",
223 "srtp/test/rtpw.c", 267 "srtp/test/rtpw.c",
224 ] 268 ]
225 if (is_android) { 269 if (is_android) {
226 defines = [ "HAVE_SYS_SOCKET_H" ] 270 defines = [ "HAVE_SYS_SOCKET_H" ]
227 } 271 }
228 if (is_clang) { 272 if (is_clang) {
229 cflags = [ "-Wno-implicit-function-declaration" ] 273 cflags = [ "-Wno-implicit-function-declaration" ]
230 } 274 }
231 } 275 }
232 276
233 executable("srtp_test_cipher_driver") { 277 executable("srtp_test_cipher_driver") {
234 configs -= [ "//build/config/compiler:chromium_code" ] 278 configs -= [ "//build/config/compiler:chromium_code" ]
235 configs += [ "//build/config/compiler:no_chromium_code" ] 279 configs += [ "//build/config/compiler:no_chromium_code" ]
236 deps = [ 280 deps = [
237 ":libsrtp", 281 ":libsrtp",
238 ] 282 ]
283 if (use_srtp_boringssl) {
284 deps += [ "//third_party/boringssl:boringssl" ]
285 }
239 sources = [ 286 sources = [
240 "srtp/crypto/test/cipher_driver.c", 287 "srtp/crypto/test/cipher_driver.c",
288 "srtp/include/getopt_s.h",
289 "srtp/test/getopt_s.c",
241 ] 290 ]
242 } 291 }
243 292
244 executable("srtp_test_datatypes_driver") { 293 executable("srtp_test_datatypes_driver") {
245 configs -= [ "//build/config/compiler:chromium_code" ] 294 configs -= [ "//build/config/compiler:chromium_code" ]
246 configs += [ "//build/config/compiler:no_chromium_code" ] 295 configs += [ "//build/config/compiler:no_chromium_code" ]
247 deps = [ 296 deps = [
248 ":libsrtp", 297 ":libsrtp",
249 ] 298 ]
299 if (use_srtp_boringssl) {
300 deps += [ "//third_party/boringssl:boringssl" ]
301 }
250 sources = [ 302 sources = [
251 "srtp/crypto/test/datatypes_driver.c", 303 "srtp/crypto/test/datatypes_driver.c",
252 ] 304 ]
253 } 305 }
254 306
255 executable("srtp_test_stat_driver") { 307 executable("srtp_test_stat_driver") {
256 configs -= [ "//build/config/compiler:chromium_code" ] 308 configs -= [ "//build/config/compiler:chromium_code" ]
257 configs += [ "//build/config/compiler:no_chromium_code" ] 309 configs += [ "//build/config/compiler:no_chromium_code" ]
258 deps = [ 310 deps = [
259 ":libsrtp", 311 ":libsrtp",
260 ] 312 ]
313 if (use_srtp_boringssl) {
314 deps += [ "//third_party/boringssl:boringssl" ]
315 }
261 sources = [ 316 sources = [
262 "srtp/crypto/test/stat_driver.c", 317 "srtp/crypto/test/stat_driver.c",
263 ] 318 ]
264 } 319 }
265 320
266 executable("srtp_test_sha1_driver") { 321 executable("srtp_test_sha1_driver") {
267 configs -= [ "//build/config/compiler:chromium_code" ] 322 configs -= [ "//build/config/compiler:chromium_code" ]
268 configs += [ "//build/config/compiler:no_chromium_code" ] 323 configs += [ "//build/config/compiler:no_chromium_code" ]
269 deps = [ 324 deps = [
270 ":libsrtp", 325 ":libsrtp",
271 ] 326 ]
327 if (use_srtp_boringssl) {
328 deps += [ "//third_party/boringssl:boringssl" ]
329 }
272 sources = [ 330 sources = [
273 "srtp/crypto/test/sha1_driver.c", 331 "srtp/crypto/test/sha1_driver.c",
274 ] 332 ]
275 } 333 }
276 334
277 executable("srtp_test_kernel_driver") { 335 executable("srtp_test_kernel_driver") {
278 configs -= [ "//build/config/compiler:chromium_code" ] 336 configs -= [ "//build/config/compiler:chromium_code" ]
279 configs += [ "//build/config/compiler:no_chromium_code" ] 337 configs += [ "//build/config/compiler:no_chromium_code" ]
280 deps = [ 338 deps = [
281 ":libsrtp", 339 ":libsrtp",
282 ] 340 ]
341 if (use_srtp_boringssl) {
342 deps += [ "//third_party/boringssl:boringssl" ]
343 }
283 sources = [ 344 sources = [
284 "srtp/crypto/test/kernel_driver.c", 345 "srtp/crypto/test/kernel_driver.c",
346 "srtp/include/getopt_s.h",
347 "srtp/test/getopt_s.c",
285 ] 348 ]
286 } 349 }
287 350
288 executable("srtp_test_aes_calc") { 351 executable("srtp_test_aes_calc") {
289 configs -= [ "//build/config/compiler:chromium_code" ] 352 configs -= [ "//build/config/compiler:chromium_code" ]
290 configs += [ "//build/config/compiler:no_chromium_code" ] 353 configs += [ "//build/config/compiler:no_chromium_code" ]
291 deps = [ 354 deps = [
292 ":libsrtp", 355 ":libsrtp",
293 ] 356 ]
357 if (use_srtp_boringssl) {
358 deps += [ "//third_party/boringssl:boringssl" ]
359 }
294 sources = [ 360 sources = [
295 "srtp/crypto/test/aes_calc.c", 361 "srtp/crypto/test/aes_calc.c",
296 ] 362 ]
297 } 363 }
298 364
299 executable("srtp_test_rand_gen") { 365 executable("srtp_test_rand_gen") {
300 configs -= [ "//build/config/compiler:chromium_code" ] 366 configs -= [ "//build/config/compiler:chromium_code" ]
301 configs += [ "//build/config/compiler:no_chromium_code" ] 367 configs += [ "//build/config/compiler:no_chromium_code" ]
302 deps = [ 368 deps = [
303 ":libsrtp", 369 ":libsrtp",
304 ] 370 ]
371 if (use_srtp_boringssl) {
372 deps += [ "//third_party/boringssl:boringssl" ]
373 }
305 sources = [ 374 sources = [
306 "srtp/crypto/test/rand_gen.c", 375 "srtp/crypto/test/rand_gen.c",
376 "srtp/include/getopt_s.h",
377 "srtp/test/getopt_s.c",
307 ] 378 ]
308 } 379 }
309 380
381 executable("srtp_test_rand_gen_soak") {
382 configs -= [ "//build/config/compiler:chromium_code" ]
383 configs += [ "//build/config/compiler:no_chromium_code" ]
384 deps = [
385 ":libsrtp",
386 ]
387 if (use_srtp_boringssl) {
388 deps += [ "//third_party/boringssl:boringssl" ]
389 }
390 sources = [
391 "srtp/crypto/test/rand_gen_soak.c",
392 "srtp/include/getopt_s.h",
393 "srtp/test/getopt_s.c",
394 ]
395 }
396
310 executable("srtp_test_env") { 397 executable("srtp_test_env") {
311 configs -= [ "//build/config/compiler:chromium_code" ] 398 configs -= [ "//build/config/compiler:chromium_code" ]
312 configs += [ "//build/config/compiler:no_chromium_code" ] 399 configs += [ "//build/config/compiler:no_chromium_code" ]
313 deps = [ 400 deps = [
314 ":libsrtp", 401 ":libsrtp",
315 ] 402 ]
403 if (use_srtp_boringssl) {
404 deps += [ "//third_party/boringssl:boringssl" ]
405 }
316 sources = [ 406 sources = [
317 "srtp/crypto/test/env.c", 407 "srtp/crypto/test/env.c",
318 ] 408 ]
319 } 409 }
320 410
321 group("srtp_runtest") { 411 group("srtp_runtest") {
322 deps = [ 412 deps = [
323 ":rdbx_driver", 413 ":rdbx_driver",
324 ":srtp_driver", 414 ":srtp_driver",
325 ":roc_driver", 415 ":roc_driver",
326 ":replay_driver", 416 ":replay_driver",
327 ":rtpw", 417 ":rtpw",
328 ":srtp_test_cipher_driver", 418 ":srtp_test_cipher_driver",
329 ":srtp_test_datatypes_driver", 419 ":srtp_test_datatypes_driver",
330 ":srtp_test_stat_driver", 420 ":srtp_test_stat_driver",
331 ":srtp_test_sha1_driver", 421 ":srtp_test_sha1_driver",
332 ":srtp_test_kernel_driver", 422 ":srtp_test_kernel_driver",
333 ":srtp_test_aes_calc", 423 ":srtp_test_aes_calc",
334 ":srtp_test_rand_gen", 424 ":srtp_test_rand_gen",
425 ":srtp_test_rand_gen_soak",
335 ":srtp_test_env", 426 ":srtp_test_env",
336 ] 427 ]
337 } 428 }
338 } 429 }
339 } 430 }
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698