1# 2# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7ifneq (${MBEDTLS_COMMON_MK},1) 8MBEDTLS_COMMON_MK := 1 9 10# MBEDTLS_DIR must be set to the mbed TLS main directory (it must contain 11# the 'include' and 'library' subdirectories). 12ifeq (${MBEDTLS_DIR},) 13 $(error Error: MBEDTLS_DIR not set) 14endif 15 16INCLUDES += -I${MBEDTLS_DIR}/include \ 17 -Iinclude/drivers/auth/mbedtls 18 19# Specify mbed TLS configuration file 20MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>" 21$(eval $(call add_define,MBEDTLS_CONFIG_FILE)) 22 23MBEDTLS_COMMON_SOURCES := drivers/auth/mbedtls/mbedtls_common.c \ 24 $(addprefix ${MBEDTLS_DIR}/library/, \ 25 asn1parse.c \ 26 asn1write.c \ 27 memory_buffer_alloc.c \ 28 oid.c \ 29 platform.c \ 30 ) 31 32BL1_SOURCES += ${MBEDTLS_COMMON_SOURCES} 33BL2_SOURCES += ${MBEDTLS_COMMON_SOURCES} 34 35endif 36