mbedtls_common.mk 890 Bytes
Newer Older
1
2
3
#
# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
#
dp-arm's avatar
dp-arm committed
4
# SPDX-License-Identifier: BSD-3-Clause
5
6
7
8
9
#

ifneq (${MBEDTLS_COMMON_MK},1)
MBEDTLS_COMMON_MK	:=	1

Juan Castillo's avatar
Juan Castillo committed
10
# MBEDTLS_DIR must be set to the mbed TLS main directory (it must contain
11
12
13
14
15
16
17
18
# the 'include' and 'library' subdirectories).
ifeq (${MBEDTLS_DIR},)
  $(error Error: MBEDTLS_DIR not set)
endif

INCLUDES		+=	-I${MBEDTLS_DIR}/include		\
				-Iinclude/drivers/auth/mbedtls

Juan Castillo's avatar
Juan Castillo committed
19
20
21
# Specify mbed TLS configuration file
MBEDTLS_CONFIG_FILE	:=	"<mbedtls_config.h>"
$(eval $(call add_define,MBEDTLS_CONFIG_FILE))
22
23
24
25
26
27
28
29
30
31
32
33
34
35

MBEDTLS_COMMON_SOURCES	:=	drivers/auth/mbedtls/mbedtls_common.c	\
				$(addprefix ${MBEDTLS_DIR}/library/,	\
				asn1parse.c 				\
				asn1write.c 				\
				memory_buffer_alloc.c			\
				oid.c 					\
				platform.c 				\
				)

BL1_SOURCES		+=	${MBEDTLS_COMMON_SOURCES}
BL2_SOURCES		+=	${MBEDTLS_COMMON_SOURCES}

endif