xref: /kernel/liteos_a/lib/libmbedtls/BUILD.gn (revision 0d163575)
10d163575Sopenharmony_ci# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
20d163575Sopenharmony_ci# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
30d163575Sopenharmony_ci#
40d163575Sopenharmony_ci# Redistribution and use in source and binary forms, with or without modification,
50d163575Sopenharmony_ci# are permitted provided that the following conditions are met:
60d163575Sopenharmony_ci#
70d163575Sopenharmony_ci# 1. Redistributions of source code must retain the above copyright notice, this list of
80d163575Sopenharmony_ci#    conditions and the following disclaimer.
90d163575Sopenharmony_ci#
100d163575Sopenharmony_ci# 2. Redistributions in binary form must reproduce the above copyright notice, this list
110d163575Sopenharmony_ci#    of conditions and the following disclaimer in the documentation and/or other materials
120d163575Sopenharmony_ci#    provided with the distribution.
130d163575Sopenharmony_ci#
140d163575Sopenharmony_ci# 3. Neither the name of the copyright holder nor the names of its contributors may be used
150d163575Sopenharmony_ci#    to endorse or promote products derived from this software without specific prior written
160d163575Sopenharmony_ci#    permission.
170d163575Sopenharmony_ci#
180d163575Sopenharmony_ci# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
190d163575Sopenharmony_ci# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
200d163575Sopenharmony_ci# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
210d163575Sopenharmony_ci# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
220d163575Sopenharmony_ci# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
230d163575Sopenharmony_ci# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
240d163575Sopenharmony_ci# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
250d163575Sopenharmony_ci# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
260d163575Sopenharmony_ci# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
270d163575Sopenharmony_ci# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
280d163575Sopenharmony_ci# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
290d163575Sopenharmony_ci
300d163575Sopenharmony_ciimport("//kernel/liteos_a/liteos.gni")
310d163575Sopenharmony_ci
320d163575Sopenharmony_cimodule_switch = defined(LOSCFG_DRIVERS_TZDRIVER)
330d163575Sopenharmony_cimodule_name = get_path_info(rebase_path("."), "name")
340d163575Sopenharmony_cikernel_module(module_name) {
350d163575Sopenharmony_ci  sources = [
360d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/aes.c",
370d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/aesni.c",
380d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/arc4.c",
390d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/aria.c",
400d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/asn1parse.c",
410d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/asn1write.c",
420d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/base64.c",
430d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/bignum.c",
440d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/blowfish.c",
450d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/camellia.c",
460d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ccm.c",
470d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/certs.c",
480d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/chacha20.c",
490d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/chachapoly.c",
500d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/cipher.c",
510d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/cipher_wrap.c",
520d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/cmac.c",
530d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ctr_drbg.c",
540d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/debug.c",
550d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/des.c",
560d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/dhm.c",
570d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ecdh.c",
580d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ecdsa.c",
590d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ecjpake.c",
600d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ecp.c",
610d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ecp_curves.c",
620d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/entropy.c",
630d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/entropy_poll.c",
640d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/error.c",
650d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/gcm.c",
660d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/havege.c",
670d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/hkdf.c",
680d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/hmac_drbg.c",
690d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/md.c",
700d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/md2.c",
710d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/md4.c",
720d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/md5.c",
730d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/md_wrap.c",
740d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/memory_buffer_alloc.c",
750d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/net_sockets.c",
760d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/nist_kw.c",
770d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/oid.c",
780d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/padlock.c",
790d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pem.c",
800d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pk.c",
810d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pk_wrap.c",
820d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pkcs11.c",
830d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pkcs12.c",
840d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pkcs5.c",
850d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pkparse.c",
860d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/pkwrite.c",
870d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/platform.c",
880d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/platform_util.c",
890d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/poly1305.c",
900d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ripemd160.c",
910d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/rsa.c",
920d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/rsa_internal.c",
930d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/sha1.c",
940d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/sha256.c",
950d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/sha512.c",
960d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_cache.c",
970d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_ciphersuites.c",
980d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_cli.c",
990d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_cookie.c",
1000d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_srv.c",
1010d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_ticket.c",
1020d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/ssl_tls.c",
1030d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/threading.c",
1040d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/timing.c",
1050d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/version.c",
1060d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/version_features.c",
1070d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509.c",
1080d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509_create.c",
1090d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509_crl.c",
1100d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509_crt.c",
1110d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509_csr.c",
1120d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509write_crt.c",
1130d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/x509write_csr.c",
1140d163575Sopenharmony_ci    "$LITEOSTHIRDPARTY/mbedtls/library/xtea.c",
1150d163575Sopenharmony_ci  ]
1160d163575Sopenharmony_ci
1170d163575Sopenharmony_ci  public_configs = [ ":public" ]
1180d163575Sopenharmony_ci}
1190d163575Sopenharmony_ci
1200d163575Sopenharmony_ciconfig("public") {
1210d163575Sopenharmony_ci  include_dirs = [ "$LITEOSTHIRDPARTY/mbedtls/include" ]
1220d163575Sopenharmony_ci}
123