|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 UNIFIED_SOURCES += [ |
|
8 'crypto/cipher/aes.c', |
|
9 'crypto/cipher/aes_cbc.c', |
|
10 'crypto/cipher/aes_icm.c', |
|
11 'crypto/cipher/cipher.c', |
|
12 'crypto/cipher/null_cipher.c', |
|
13 'crypto/hash/auth.c', |
|
14 'crypto/hash/hmac.c', |
|
15 'crypto/hash/null_auth.c', |
|
16 'crypto/hash/sha1.c', |
|
17 'crypto/kernel/alloc.c', |
|
18 'crypto/kernel/crypto_kernel.c', |
|
19 'crypto/kernel/err.c', |
|
20 'crypto/kernel/key.c', |
|
21 'crypto/math/datatypes.c', |
|
22 'crypto/math/gf2_8.c', |
|
23 'crypto/math/stat.c', |
|
24 'crypto/replay/rdb.c', |
|
25 'crypto/replay/rdbx.c', |
|
26 'crypto/replay/ut_sim.c', |
|
27 'crypto/rng/ctr_prng.c', |
|
28 'crypto/rng/prng.c', |
|
29 'crypto/rng/rand_source.c', |
|
30 'srtp/ekt.c', |
|
31 'srtp/srtp.c', |
|
32 ] |
|
33 |
|
34 LIBRARY_NAME = 'nksrtp_s' |
|
35 |
|
36 include('/ipc/chromium/chromium-config.mozbuild') |
|
37 |
|
38 FINAL_LIBRARY = 'necko' |
|
39 |
|
40 LOCAL_INCLUDES += [ |
|
41 'crypto/include', |
|
42 'include', |
|
43 ] |
|
44 |
|
45 # We know stdint.h will define uint8/16/32/64_t, so we don't need |
|
46 # to define SIZEOF_UNSIGNED_LONG/SIZEOF_UNSIGNED_LONG_LONG |
|
47 for var in ('HAVE_STDLIB_H', 'HAVE_UINT8_T', 'HAVE_UINT16_T', |
|
48 'HAVE_UINT32_T', 'HAVE_UINT64_T'): |
|
49 DEFINES[var] = 1 |
|
50 |
|
51 # XXX while arm is not a CISC architecture, the code guarded by CPU_RISC makes |
|
52 # (at least) the AES ciphers fail their self-tests on ARM, so for now we're |
|
53 # falling back to the (presumably) slower-on-this-architecture but working |
|
54 # code path. https://bugzilla.mozilla.org/show_bug.cgi?id=822380 has been filed |
|
55 # to make the right and more performant fix and push it back upstream. |
|
56 if CONFIG['CPU_ARCH'] in ('arm', 'x86', 'x86_64'): |
|
57 DEFINES['CPU_CISC'] = 1 |
|
58 else: |
|
59 # best guess |
|
60 DEFINES['CPU_RISC'] = 1 |
|
61 |
|
62 if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'): |
|
63 DEFINES['HAVE_X86'] = True |
|
64 |
|
65 if CONFIG['OS_TARGET'] == 'WINNT': |
|
66 DEFINES['HAVE_WINSOCK2_H'] = True |
|
67 DEFINES['inline'] = '__inline' |