blob: a5d19e6a9677f5d59e39c8c8a7120b4ecf087d64 [file] [log] [blame]
Juan Castilloa57a4d52015-04-02 15:44:20 +01001#
Jeenu Viswambharanec06c3b2018-06-07 15:14:42 +01002# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
Juan Castilloa57a4d52015-04-02 15:44:20 +01003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Juan Castilloa57a4d52015-04-02 15:44:20 +01005#
6
7ifneq (${MBEDTLS_COMMON_MK},1)
8MBEDTLS_COMMON_MK := 1
9
Juan Castillobae6b2a2015-11-05 09:24:53 +000010# MBEDTLS_DIR must be set to the mbed TLS main directory (it must contain
Juan Castilloa57a4d52015-04-02 15:44:20 +010011# 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
Juan Castillobae6b2a2015-11-05 09:24:53 +000019# Specify mbed TLS configuration file
20MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>"
21$(eval $(call add_define,MBEDTLS_CONFIG_FILE))
Juan Castilloa57a4d52015-04-02 15:44:20 +010022
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 \
Jeenu Viswambharanec06c3b2018-06-07 15:14:42 +010030 platform_util.c \
31 rsa_internal.c \
Juan Castilloa57a4d52015-04-02 15:44:20 +010032 )
33
Juan Castilloa57a4d52015-04-02 15:44:20 +010034endif