1#-------------------------------------------------------------------------------
2# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8########################## LIB #################################################
9
10target_include_directories(${CC312_LIB_TARGET}
11    PUBLIC
12        cc3x_sym/driver
13    INTERFACE
14        common
15        cc3x_sym/api
16        pki/poly
17        pki/ec_wrst
18        ec_wrst
19        ec_wrst/ecc_domains
20        rsa
21        pki/srp
22        pki/ec_edw
23        pki/ec_mont
24        pki/common
25        pki/rsa
26        rnd_dma/local
27        rnd_dma
28)
29
30target_sources(${CC312_LIB_TARGET}
31    PRIVATE
32        cc3x_sym/api/mbedtls_cc_chacha.c
33        cc3x_sym/api/mbedtls_cc_chacha_poly.c
34        cc3x_sym/api/mbedtls_cc_chacha_poly.c
35        cc3x_sym/api/mbedtls_cc_ecies.c
36        cc3x_sym/api/mbedtls_ccm_internal.c
37        cc3x_sym/api/mbedtls_cc_poly.c
38        cc3x_sym/api/mbedtls_cc_poly.c
39        cc3x_sym/api/mbedtls_cc_sha512_t.c
40        cc3x_sym/api/mbedtls_cc_srp.c
41        cc3x_sym/api/mbedtls_cc_srp.c
42        cc3x_sym/driver/aesccm_driver.c
43        cc3x_sym/driver/aes_driver.c
44        cc3x_sym/driver/aesgcm_driver.c
45        cc3x_sym/driver/bypass_driver.c
46        cc3x_sym/driver/chacha_driver.c
47        cc3x_sym/driver/driver_common.c
48        cc3x_sym/driver/hash_driver.c
49        cc3x_sym/driver/srp_driver.c
50        common/cc_common_conv_endian.c
51        common/cc_common_math.c
52        ec_edw/cc_ec_edw.c
53        ec_edw/cc_ec_edw.c
54        ec_mont/cc_ec_mont.c
55        ec_mont/cc_ec_mont.c
56        ec_wrst/cc_ecdh.c
57        ec_wrst/cc_ecdsa_sign.c
58        ec_wrst/cc_ecdsa_verify.c
59        ec_wrst/cc_ecpki_build_priv.c
60        ec_wrst/cc_ecpki_build_publ.c
61        ec_wrst/cc_ecpki_domain.c
62        ec_wrst/cc_ecpki_kg.c
63        ec_wrst/ecc_domains/cc_ecpki_domain_secp192k1.c
64        ec_wrst/ecc_domains/cc_ecpki_domain_secp192r1.c
65        ec_wrst/ecc_domains/cc_ecpki_domain_secp224k1.c
66        ec_wrst/ecc_domains/cc_ecpki_domain_secp224r1.c
67        ec_wrst/ecc_domains/cc_ecpki_domain_secp256k1.c
68        ec_wrst/ecc_domains/cc_ecpki_domain_secp256r1.c
69        ec_wrst/ecc_domains/cc_ecpki_domain_secp384r1.c
70        ec_wrst/ecc_domains/cc_ecpki_domain_secp521r1.c
71        ffc_domain/cc_ffc_domain.c
72        kdf/cc_kdf.c
73        pki/common/pka.c
74        pki/common/pki.c
75        pki/common/pki_modular_arithmetic.c
76        pki/ec_edw/ec_edw.c
77        pki/ec_edw/ec_edw_domain_25519.c
78        pki/ec_edw/pka_ec_edw.c
79        pki/ec_edw/pka_ec_edw.c
80        pki/ec_mont/ec_mont.c
81        pki/ec_mont/ec_mont_domain_curve25519.c
82        pki/ec_mont/pka_ec_mont.c
83        pki/ec_mont/pka_ec_mont.c
84        pki/ec_wrst/ec_wrst.c
85        pki/ec_wrst/ec_wrst_dsa.c
86        pki/ec_wrst/ec_wrst_genkey.c
87        pki/ec_wrst/pka_ec_wrst.c
88        pki/ec_wrst/pka_ec_wrst.c
89        pki/ec_wrst/pka_ec_wrst_dsa_verify.c
90        pki/ec_wrst/pka_ec_wrst_smul_no_scap.c
91        pki/poly/poly.c
92        pki/rsa/rsa_genkey.c
93        pki/rsa/rsa_private.c
94        pki/rsa/rsa_public.c
95        pki/srp/srp.c
96        rnd_dma/cc_rnd_common.c
97        rnd_dma/llf_rnd.c
98        rnd_dma/llf_rnd_fetrng.c
99        rsa/cc_rsa_build.c
100        rsa/cc_rsa_kg.c
101        rsa/cc_rsa_oaep.c
102        rsa/cc_rsa_pkcs_ver15_util.c
103        rsa/cc_rsa_prim.c
104        rsa/cc_rsa_pss21_util.c
105        rsa/cc_rsa_schemes.c
106        rsa/cc_rsa_sign.c
107        rsa/cc_rsa_verify.c
108        rsa/cc_rsa_verify.c
109)
110
111########################## CDMPU ###############################################
112
113target_include_directories(${CC312_CDMPU_TARGET}
114    INTERFACE
115        common
116        cc3x_sym/driver
117        cc3x_sym/api
118        rnd_dma
119        rnd_dma/local
120)
121
122target_sources(${CC312_CDMPU_TARGET}
123    INTERFACE
124        cc3x_sym/api/mbedtls_ccm_internal.c
125        cc3x_sym/driver/aesccm_driver.c
126        cc3x_sym/driver/aes_driver.c
127        cc3x_sym/driver/driver_common.c
128        common/cc_common_conv_endian.c
129        rnd_dma/llf_rnd.c
130        rnd_dma/llf_rnd_fetrng.c
131)
132