Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 1 | # |
Jeenu Viswambharan | ec06c3b | 2018-06-07 15:14:42 +0100 | [diff] [blame] | 2 | # Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | ifneq (${MBEDTLS_COMMON_MK},1) |
| 8 | MBEDTLS_COMMON_MK := 1 |
| 9 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 10 | # MBEDTLS_DIR must be set to the mbed TLS main directory (it must contain |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 11 | # the 'include' and 'library' subdirectories). |
| 12 | ifeq (${MBEDTLS_DIR},) |
| 13 | $(error Error: MBEDTLS_DIR not set) |
| 14 | endif |
| 15 | |
| 16 | INCLUDES += -I${MBEDTLS_DIR}/include \ |
| 17 | -Iinclude/drivers/auth/mbedtls |
| 18 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 19 | # Specify mbed TLS configuration file |
| 20 | MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>" |
| 21 | $(eval $(call add_define,MBEDTLS_CONFIG_FILE)) |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 22 | |
| 23 | MBEDTLS_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 Viswambharan | ec06c3b | 2018-06-07 15:14:42 +0100 | [diff] [blame] | 30 | platform_util.c \ |
| 31 | rsa_internal.c \ |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 32 | ) |
| 33 | |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 34 | endif |