| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 { | |
| 6 'variables': { | |
| 7 'use_openssl%': 1, | |
| 8 }, | |
| 9 'target_defaults': { | |
| 10 'defines': [ | |
| 11 'HAVE_CONFIG_H', | |
| 12 'HAVE_STDLIB_H', | |
| 13 'HAVE_STRING_H', | |
| 14 'TESTAPP_SOURCE', | |
| 15 ], | |
| 16 'include_dirs': [ | |
| 17 './config', | |
| 18 'srtp/include', | |
| 19 'srtp/crypto/include', | |
| 20 ], | |
| 21 'conditions': [ | |
| 22 ['use_openssl==1', { | |
| 23 'defines': [ | |
| 24 'OPENSSL', | |
| 25 ], | |
| 26 }], | |
| 27 ['os_posix==1', { | |
| 28 'defines': [ | |
| 29 'HAVE_INT16_T', | |
| 30 'HAVE_INT32_T', | |
| 31 'HAVE_INT8_T', | |
| 32 'HAVE_UINT16_T', | |
| 33 'HAVE_UINT32_T', | |
| 34 'HAVE_UINT64_T', | |
| 35 'HAVE_UINT8_T', | |
| 36 'HAVE_STDINT_H', | |
| 37 'HAVE_INTTYPES_H', | |
| 38 'HAVE_NETINET_IN_H', | |
| 39 'HAVE_ARPA_INET_H', | |
| 40 'HAVE_UNISTD_H', | |
| 41 ], | |
| 42 'cflags': [ | |
| 43 '-Wno-unused-variable', | |
| 44 ], | |
| 45 }], | |
| 46 ['OS=="win"', { | |
| 47 'defines': [ | |
| 48 'HAVE_BYTESWAP_METHODS_H', | |
| 49 # All Windows architectures are this way. | |
| 50 'SIZEOF_UNSIGNED_LONG=4', | |
| 51 'SIZEOF_UNSIGNED_LONG_LONG=8', | |
| 52 ], | |
| 53 }], | |
| 54 ['target_arch=="x64" or target_arch=="ia32"', { | |
| 55 'defines': [ | |
| 56 'CPU_CISC', | |
| 57 ], | |
| 58 }], | |
| 59 ['target_arch=="arm" or target_arch=="arm64" \ | |
| 60 or target_arch=="mipsel" or target_arch=="mips64el"', { | |
| 61 'defines': [ | |
| 62 # TODO(leozwang): CPU_RISC doesn't work properly on android/arm and | |
| 63 # mips platforms for unknown reasons, need to investigate the root | |
| 64 # cause of it. CPU_RISC is used for optimization only, and CPU_CISC | |
| 65 # should just work just fine, it has been tested on android/arm with | |
| 66 # srtp test applications and libjingle. | |
| 67 'CPU_CISC', | |
| 68 ], | |
| 69 }], | |
| 70 ['target_arch=="mipsel" or target_arch=="arm" or target_arch=="ia32"', { | |
| 71 'defines': [ | |
| 72 # Define FORCE_64BIT_ALIGN to avoid alignment-related-crashes like | |
| 73 # crbug/414919. Without this, aes_cbc_alloc will allocate an | |
| 74 # aes_cbc_ctx_t not 64-bit aligned and the v128_t members of | |
| 75 # aes_cbc_ctx_t will not be 64-bit aligned, which breaks the | |
| 76 # compiler optimizations that assume 64-bit alignment of v128_t. | |
| 77 'FORCE_64BIT_ALIGN', | |
| 78 ], | |
| 79 }], | |
| 80 ], | |
| 81 'direct_dependent_settings': { | |
| 82 'include_dirs': [ | |
| 83 './config', | |
| 84 'srtp/include', | |
| 85 'srtp/crypto/include', | |
| 86 ], | |
| 87 'conditions': [ | |
| 88 ['os_posix==1', { | |
| 89 'defines': [ | |
| 90 'HAVE_INT16_T', | |
| 91 'HAVE_INT32_T', | |
| 92 'HAVE_INT8_T', | |
| 93 'HAVE_UINT16_T', | |
| 94 'HAVE_UINT32_T', | |
| 95 'HAVE_UINT64_T', | |
| 96 'HAVE_UINT8_T', | |
| 97 'HAVE_STDINT_H', | |
| 98 'HAVE_INTTYPES_H', | |
| 99 'HAVE_NETINET_IN_H', | |
| 100 ], | |
| 101 }], | |
| 102 ['OS=="win"', { | |
| 103 'defines': [ | |
| 104 'HAVE_BYTESWAP_METHODS_H', | |
| 105 # All Windows architectures are this way. | |
| 106 'SIZEOF_UNSIGNED_LONG=4', | |
| 107 'SIZEOF_UNSIGNED_LONG_LONG=8', | |
| 108 ], | |
| 109 }], | |
| 110 ['target_arch=="x64" or target_arch=="ia32"', { | |
| 111 'defines': [ | |
| 112 'CPU_CISC', | |
| 113 ], | |
| 114 }], | |
| 115 ], | |
| 116 }, | |
| 117 }, | |
| 118 'targets': [ | |
| 119 { | |
| 120 'target_name': 'libsrtp', | |
| 121 'type': 'static_library', | |
| 122 'sources': [ | |
| 123 # includes | |
| 124 'srtp/include/ekt.h', | |
| 125 'srtp/include/getopt_s.h', | |
| 126 'srtp/include/rtp.h', | |
| 127 'srtp/include/rtp_priv.h', | |
| 128 'srtp/include/srtp.h', | |
| 129 'srtp/include/srtp_priv.h', | |
| 130 'srtp/include/ut_sim.h', | |
| 131 | |
| 132 # headers | |
| 133 'srtp/crypto/include/aes_cbc.h', | |
| 134 'srtp/crypto/include/aes.h', | |
| 135 'srtp/crypto/include/aes_icm.h', | |
| 136 'srtp/crypto/include/alloc.h', | |
| 137 'srtp/crypto/include/auth.h', | |
| 138 'srtp/crypto/include/cipher.h', | |
| 139 'srtp/crypto/include/cryptoalg.h', | |
| 140 'srtp/crypto/include/crypto.h', | |
| 141 'srtp/crypto/include/crypto_kernel.h', | |
| 142 'srtp/crypto/include/crypto_math.h', | |
| 143 'srtp/crypto/include/crypto_types.h', | |
| 144 'srtp/crypto/include/datatypes.h', | |
| 145 'srtp/crypto/include/err.h', | |
| 146 'srtp/crypto/include/gf2_8.h', | |
| 147 'srtp/crypto/include/hmac.h', | |
| 148 'srtp/crypto/include/integers.h', | |
| 149 'srtp/crypto/include/kernel_compat.h', | |
| 150 'srtp/crypto/include/key.h', | |
| 151 'srtp/crypto/include/null_auth.h', | |
| 152 'srtp/crypto/include/null_cipher.h', | |
| 153 'srtp/crypto/include/prng.h', | |
| 154 'srtp/crypto/include/rand_source.h', | |
| 155 'srtp/crypto/include/rdb.h', | |
| 156 'srtp/crypto/include/rdbx.h', | |
| 157 'srtp/crypto/include/sha1.h', | |
| 158 'srtp/crypto/include/stat.h', | |
| 159 'srtp/crypto/include/xfm.h', | |
| 160 | |
| 161 # sources | |
| 162 'srtp/srtp/ekt.c', | |
| 163 'srtp/srtp/srtp.c', | |
| 164 | |
| 165 'srtp/crypto/cipher/aes.c', | |
| 166 'srtp/crypto/cipher/aes_cbc.c', | |
| 167 'srtp/crypto/cipher/aes_icm.c', | |
| 168 'srtp/crypto/cipher/cipher.c', | |
| 169 'srtp/crypto/cipher/null_cipher.c', | |
| 170 'srtp/crypto/hash/auth.c', | |
| 171 'srtp/crypto/hash/hmac.c', | |
| 172 'srtp/crypto/hash/null_auth.c', | |
| 173 'srtp/crypto/hash/sha1.c', | |
| 174 'srtp/crypto/kernel/alloc.c', | |
| 175 'srtp/crypto/kernel/crypto_kernel.c', | |
| 176 'srtp/crypto/kernel/err.c', | |
| 177 'srtp/crypto/kernel/key.c', | |
| 178 'srtp/crypto/math/datatypes.c', | |
| 179 'srtp/crypto/math/gf2_8.c', | |
| 180 'srtp/crypto/math/stat.c', | |
| 181 'srtp/crypto/replay/rdb.c', | |
| 182 'srtp/crypto/replay/rdbx.c', | |
| 183 'srtp/crypto/replay/ut_sim.c', | |
| 184 'srtp/crypto/rng/ctr_prng.c', | |
| 185 'srtp/crypto/rng/prng.c', | |
| 186 'srtp/crypto/rng/rand_source.c', | |
| 187 ], | |
| 188 'conditions': [ | |
| 189 ['use_openssl==1', { | |
| 190 'dependencies': [ | |
| 191 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl', | |
| 192 ], | |
| 193 'sources!': [ | |
| 194 'srtp/crypto/cipher/aes_cbc.c', | |
| 195 'srtp/crypto/cipher/aes_icm.c', | |
| 196 'srtp/crypto/hash/hmac.c', | |
| 197 'srtp/crypto/hash/sha1.c', | |
| 198 'srtp/crypto/rng/ctr_prng.c', | |
| 199 'srtp/crypto/rng/prng.c', | |
| 200 'srtp/crypto/rng/rand_source.c', | |
| 201 ], | |
| 202 'sources': [ | |
| 203 'srtp/crypto/cipher/aes_gcm_ossl.c', | |
| 204 'srtp/crypto/cipher/aes_icm_ossl.c', | |
| 205 'srtp/crypto/hash/hmac_ossl.c', | |
| 206 'srtp/crypto/include/aes_gcm_ossl.h', | |
| 207 'srtp/crypto/include/aes_icm_ossl.h', | |
| 208 'srtp/crypto/rng/rand_source_ossl.c', | |
| 209 ], | |
| 210 }], | |
| 211 ], | |
| 212 }, # target libsrtp | |
| 213 { | |
| 214 'target_name': 'rdbx_driver', | |
| 215 'type': 'executable', | |
| 216 'dependencies': [ | |
| 217 'libsrtp', | |
| 218 ], | |
| 219 'sources': [ | |
| 220 'srtp/include/getopt_s.h', | |
| 221 'srtp/test/getopt_s.c', | |
| 222 'srtp/test/rdbx_driver.c', | |
| 223 ], | |
| 224 }, | |
| 225 { | |
| 226 'target_name': 'srtp_driver', | |
| 227 'type': 'executable', | |
| 228 'dependencies': [ | |
| 229 'libsrtp', | |
| 230 ], | |
| 231 'sources': [ | |
| 232 'srtp/include/getopt_s.h', | |
| 233 'srtp/include/srtp_priv.h', | |
| 234 'srtp/test/getopt_s.c', | |
| 235 'srtp/test/srtp_driver.c', | |
| 236 ], | |
| 237 }, | |
| 238 { | |
| 239 'target_name': 'roc_driver', | |
| 240 'type': 'executable', | |
| 241 'dependencies': [ | |
| 242 'libsrtp', | |
| 243 ], | |
| 244 'sources': [ | |
| 245 'srtp/crypto/include/rdbx.h', | |
| 246 'srtp/include/ut_sim.h', | |
| 247 'srtp/test/roc_driver.c', | |
| 248 ], | |
| 249 }, | |
| 250 { | |
| 251 'target_name': 'replay_driver', | |
| 252 'type': 'executable', | |
| 253 'dependencies': [ | |
| 254 'libsrtp', | |
| 255 ], | |
| 256 'sources': [ | |
| 257 'srtp/crypto/include/rdbx.h', | |
| 258 'srtp/include/ut_sim.h', | |
| 259 'srtp/test/replay_driver.c', | |
| 260 ], | |
| 261 }, | |
| 262 { | |
| 263 'target_name': 'rtpw', | |
| 264 'type': 'executable', | |
| 265 'dependencies': [ | |
| 266 'libsrtp', | |
| 267 ], | |
| 268 'sources': [ | |
| 269 'srtp/include/getopt_s.h', | |
| 270 'srtp/include/rtp.h', | |
| 271 'srtp/include/srtp.h', | |
| 272 'srtp/crypto/include/datatypes.h', | |
| 273 'srtp/test/getopt_s.c', | |
| 274 'srtp/test/rtp.c', | |
| 275 'srtp/test/rtpw.c', | |
| 276 ], | |
| 277 'conditions': [ | |
| 278 ['OS=="android"', { | |
| 279 'defines': [ | |
| 280 'HAVE_SYS_SOCKET_H', | |
| 281 ], | |
| 282 }], | |
| 283 ], | |
| 284 }, | |
| 285 { | |
| 286 'target_name': 'srtp_test_cipher_driver', | |
| 287 'type': 'executable', | |
| 288 'dependencies': [ | |
| 289 'libsrtp', | |
| 290 ], | |
| 291 'sources': [ | |
| 292 'srtp/crypto/test/cipher_driver.c', | |
| 293 'srtp/include/getopt_s.h', | |
| 294 'srtp/test/getopt_s.c', | |
| 295 ], | |
| 296 'conditions': [ | |
| 297 ['use_openssl==1', { | |
| 298 'dependencies': [ | |
| 299 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl', | |
| 300 ], | |
| 301 }], | |
| 302 ], | |
| 303 }, | |
| 304 { | |
| 305 'target_name': 'srtp_test_datatypes_driver', | |
| 306 'type': 'executable', | |
| 307 'dependencies': [ | |
| 308 'libsrtp', | |
| 309 ], | |
| 310 'sources': [ | |
| 311 'srtp/crypto/test/datatypes_driver.c', | |
| 312 ], | |
| 313 }, | |
| 314 { | |
| 315 'target_name': 'srtp_test_stat_driver', | |
| 316 'type': 'executable', | |
| 317 'dependencies': [ | |
| 318 'libsrtp', | |
| 319 ], | |
| 320 'sources': [ | |
| 321 'srtp/crypto/test/stat_driver.c', | |
| 322 ], | |
| 323 }, | |
| 324 { | |
| 325 'target_name': 'srtp_test_sha1_driver', | |
| 326 'type': 'executable', | |
| 327 'dependencies': [ | |
| 328 'libsrtp', | |
| 329 ], | |
| 330 'sources': [ | |
| 331 'srtp/crypto/test/sha1_driver.c', | |
| 332 ], | |
| 333 }, | |
| 334 { | |
| 335 'target_name': 'srtp_test_kernel_driver', | |
| 336 'type': 'executable', | |
| 337 'dependencies': [ | |
| 338 'libsrtp', | |
| 339 ], | |
| 340 'sources': [ | |
| 341 'srtp/crypto/test/kernel_driver.c', | |
| 342 'srtp/include/getopt_s.h', | |
| 343 'srtp/test/getopt_s.c', | |
| 344 ], | |
| 345 }, | |
| 346 { | |
| 347 'target_name': 'srtp_test_aes_calc', | |
| 348 'type': 'executable', | |
| 349 'dependencies': [ | |
| 350 'libsrtp', | |
| 351 ], | |
| 352 'sources': [ | |
| 353 'srtp/crypto/test/aes_calc.c', | |
| 354 ], | |
| 355 }, | |
| 356 { | |
| 357 'target_name': 'srtp_test_rand_gen', | |
| 358 'type': 'executable', | |
| 359 'dependencies': [ | |
| 360 'libsrtp', | |
| 361 ], | |
| 362 'sources': [ | |
| 363 'srtp/crypto/test/rand_gen.c', | |
| 364 'srtp/include/getopt_s.h', | |
| 365 'srtp/test/getopt_s.c', | |
| 366 ], | |
| 367 }, | |
| 368 { | |
| 369 'target_name': 'srtp_test_rand_gen_soak', | |
| 370 'type': 'executable', | |
| 371 'dependencies': [ | |
| 372 'libsrtp', | |
| 373 ], | |
| 374 'sources': [ | |
| 375 'srtp/crypto/test/rand_gen_soak.c', | |
| 376 'srtp/include/getopt_s.h', | |
| 377 'srtp/test/getopt_s.c', | |
| 378 ], | |
| 379 }, | |
| 380 { | |
| 381 'target_name': 'srtp_test_env', | |
| 382 'type': 'executable', | |
| 383 'dependencies': [ | |
| 384 'libsrtp', | |
| 385 ], | |
| 386 'sources': [ | |
| 387 'srtp/crypto/test/env.c', | |
| 388 ], | |
| 389 }, | |
| 390 { | |
| 391 'target_name': 'srtp_runtest', | |
| 392 'type': 'none', | |
| 393 'dependencies': [ | |
| 394 'rdbx_driver', | |
| 395 'srtp_driver', | |
| 396 'roc_driver', | |
| 397 'replay_driver', | |
| 398 'rtpw', | |
| 399 'srtp_test_cipher_driver', | |
| 400 'srtp_test_datatypes_driver', | |
| 401 'srtp_test_stat_driver', | |
| 402 'srtp_test_sha1_driver', | |
| 403 'srtp_test_kernel_driver', | |
| 404 'srtp_test_aes_calc', | |
| 405 'srtp_test_rand_gen', | |
| 406 'srtp_test_rand_gen_soak', | |
| 407 'srtp_test_env', | |
| 408 ], | |
| 409 }, | |
| 410 ], # targets | |
| 411 } | |
| OLD | NEW |