blob: 8c4123dbb7a5f00cb0a40a4ddc2f7936ab282e76 [file] [log] [blame]
Juan Castilloa57a4d52015-04-02 15:44:20 +01001#
2# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
3#
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 \
30 )
31
Juan Castilloa57a4d52015-04-02 15:44:20 +010032endif