Index: libsrtp.gyp |
diff --git a/libsrtp.gyp b/libsrtp.gyp |
index 735810f3d18dcefc5b3cb6fb70793198ff24b7c0..5efc22f2821a6a7b7dd09a785fbc3bb898b0bd7a 100644 |
--- a/libsrtp.gyp |
+++ b/libsrtp.gyp |
@@ -5,11 +5,14 @@ |
{ |
'variables': { |
'use_system_libsrtp%': 0, |
+ 'use_openssl': 1, |
}, |
'target_defaults': { |
'defines': [ |
+ 'HAVE_CONFIG_H', |
'HAVE_STDLIB_H', |
'HAVE_STRING_H', |
+ 'TESTAPP_SOURCE', |
], |
'include_dirs': [ |
'./config', |
@@ -17,6 +20,11 @@ |
'srtp/crypto/include', |
], |
'conditions': [ |
+ ['use_openssl==1', { |
+ 'defines': [ |
+ 'OPENSSL', |
+ ], |
+ }], |
['os_posix==1', { |
'defines': [ |
'HAVE_INT16_T', |
@@ -29,12 +37,15 @@ |
'HAVE_STDINT_H', |
'HAVE_INTTYPES_H', |
'HAVE_NETINET_IN_H', |
- 'INLINE=inline', |
+ 'HAVE_ARPA_INET_H', |
+ 'HAVE_UNISTD_H', |
+ ], |
+ 'cflags': [ |
+ '-Wno-unused-variable', |
], |
}], |
['OS=="win"', { |
'defines': [ |
- 'INLINE=__inline', |
'HAVE_BYTESWAP_METHODS_H', |
# All Windows architectures are this way. |
'SIZEOF_UNSIGNED_LONG=4', |
@@ -87,12 +98,10 @@ |
'HAVE_STDINT_H', |
'HAVE_INTTYPES_H', |
'HAVE_NETINET_IN_H', |
- 'INLINE=inline', |
], |
}], |
['OS=="win"', { |
'defines': [ |
- 'INLINE=__inline', |
'HAVE_BYTESWAP_METHODS_H', |
# All Windows architectures are this way. |
'SIZEOF_UNSIGNED_LONG=4', |
@@ -179,6 +188,30 @@ |
'srtp/crypto/rng/prng.c', |
'srtp/crypto/rng/rand_source.c', |
], |
+ 'conditions': [ |
+ ['use_openssl==1', { |
+ 'dependencies': [ |
+ '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl', |
+ ], |
+ 'sources!': [ |
+ 'srtp/crypto/cipher/aes_cbc.c', |
+ 'srtp/crypto/cipher/aes_icm.c', |
+ 'srtp/crypto/hash/hmac.c', |
+ 'srtp/crypto/hash/sha1.c', |
+ 'srtp/crypto/rng/ctr_prng.c', |
+ 'srtp/crypto/rng/prng.c', |
+ 'srtp/crypto/rng/rand_source.c', |
+ ], |
+ 'sources': [ |
+ 'srtp/crypto/cipher/aes_gcm_ossl.c', |
+ 'srtp/crypto/cipher/aes_icm_ossl.c', |
+ 'srtp/crypto/hash/hmac_ossl.c', |
+ 'srtp/crypto/include/aes_gcm_ossl.h', |
+ 'srtp/crypto/include/aes_icm_ossl.h', |
+ 'srtp/crypto/rng/rand_source_ossl.c', |
+ ], |
+ }], |
+ ], |
}, # target libsrtp |
{ |
'target_name': 'rdbx_driver', |
@@ -261,6 +294,13 @@ |
'sources': [ |
'srtp/crypto/test/cipher_driver.c', |
], |
+ 'conditions': [ |
+ ['use_openssl==1', { |
+ 'dependencies': [ |
+ '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl', |
+ ], |
+ }], |
+ ], |
}, |
{ |
'target_name': 'srtp_test_datatypes_driver', |
@@ -323,6 +363,16 @@ |
], |
}, |
{ |
+ 'target_name': 'srtp_test_rand_gen_soak', |
+ 'type': 'executable', |
+ 'dependencies': [ |
+ 'libsrtp', |
+ ], |
+ 'sources': [ |
+ 'srtp/crypto/test/rand_gen_soak.c', |
+ ], |
+ }, |
+ { |
'target_name': 'srtp_test_env', |
'type': 'executable', |
'dependencies': [ |
@@ -348,6 +398,7 @@ |
'srtp_test_kernel_driver', |
'srtp_test_aes_calc', |
'srtp_test_rand_gen', |
+ 'srtp_test_rand_gen_soak', |
'srtp_test_env', |
], |
}, |