Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. |
| 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 \ |
| 30 | ) |
| 31 | |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 32 | endif |