michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'crypto/cipher/aes.c', michael@0: 'crypto/cipher/aes_cbc.c', michael@0: 'crypto/cipher/aes_icm.c', michael@0: 'crypto/cipher/cipher.c', michael@0: 'crypto/cipher/null_cipher.c', michael@0: 'crypto/hash/auth.c', michael@0: 'crypto/hash/hmac.c', michael@0: 'crypto/hash/null_auth.c', michael@0: 'crypto/hash/sha1.c', michael@0: 'crypto/kernel/alloc.c', michael@0: 'crypto/kernel/crypto_kernel.c', michael@0: 'crypto/kernel/err.c', michael@0: 'crypto/kernel/key.c', michael@0: 'crypto/math/datatypes.c', michael@0: 'crypto/math/gf2_8.c', michael@0: 'crypto/math/stat.c', michael@0: 'crypto/replay/rdb.c', michael@0: 'crypto/replay/rdbx.c', michael@0: 'crypto/replay/ut_sim.c', michael@0: 'crypto/rng/ctr_prng.c', michael@0: 'crypto/rng/prng.c', michael@0: 'crypto/rng/rand_source.c', michael@0: 'srtp/ekt.c', michael@0: 'srtp/srtp.c', michael@0: ] michael@0: michael@0: LIBRARY_NAME = 'nksrtp_s' michael@0: michael@0: include('/ipc/chromium/chromium-config.mozbuild') michael@0: michael@0: FINAL_LIBRARY = 'necko' michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: 'crypto/include', michael@0: 'include', michael@0: ] michael@0: michael@0: # We know stdint.h will define uint8/16/32/64_t, so we don't need michael@0: # to define SIZEOF_UNSIGNED_LONG/SIZEOF_UNSIGNED_LONG_LONG michael@0: for var in ('HAVE_STDLIB_H', 'HAVE_UINT8_T', 'HAVE_UINT16_T', michael@0: 'HAVE_UINT32_T', 'HAVE_UINT64_T'): michael@0: DEFINES[var] = 1 michael@0: michael@0: # XXX while arm is not a CISC architecture, the code guarded by CPU_RISC makes michael@0: # (at least) the AES ciphers fail their self-tests on ARM, so for now we're michael@0: # falling back to the (presumably) slower-on-this-architecture but working michael@0: # code path. https://bugzilla.mozilla.org/show_bug.cgi?id=822380 has been filed michael@0: # to make the right and more performant fix and push it back upstream. michael@0: if CONFIG['CPU_ARCH'] in ('arm', 'x86', 'x86_64'): michael@0: DEFINES['CPU_CISC'] = 1 michael@0: else: michael@0: # best guess michael@0: DEFINES['CPU_RISC'] = 1 michael@0: michael@0: if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'): michael@0: DEFINES['HAVE_X86'] = True michael@0: michael@0: if CONFIG['OS_TARGET'] == 'WINNT': michael@0: DEFINES['HAVE_WINSOCK2_H'] = True michael@0: DEFINES['inline'] = '__inline'