Gyorgy Szing | 30fa987 | 2017-12-05 01:08:47 +0000 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Tamas Ban | b6b8056 | 2019-01-04 22:49:24 +0000 | [diff] [blame] | 2 | # Copyright (c) 2017-2019, Arm Limited. All rights reserved. |
Gyorgy Szing | 30fa987 | 2017-12-05 01:08:47 +0000 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #Definitions to compile the "NS Callable" module. |
| 9 | #This file assumes it will be included from a project specific cmakefile, and |
| 10 | #will not create a library or executable. |
| 11 | #Inputs: |
| 12 | # TFM_ROOT_DIR - directory where secure FW source is located. |
| 13 | # |
| 14 | #Outputs: |
| 15 | # Will modify include directories to make the source compile. |
| 16 | # ALL_SRC_C: C source files to be compiled will be added to this list. |
| 17 | # This shall be added to the add_executable or add_library command. |
| 18 | # Include directories will be modified by using the include_directories() commands as needed. |
| 19 | |
| 20 | #Get the current directory where this file is located. |
| 21 | set(SS_NS_CALLABLE_DIR ${CMAKE_CURRENT_LIST_DIR}) |
| 22 | if(NOT DEFINED TFM_ROOT_DIR) |
| 23 | message(FATAL_ERROR "Please set TFM_ROOT_DIR before including this file.") |
| 24 | endif() |
| 25 | |
Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 26 | set (SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_veneers.c" |
Tamas Ban | b6b8056 | 2019-01-04 22:49:24 +0000 | [diff] [blame] | 27 | "${CMAKE_CURRENT_LIST_DIR}/tfm_platform_veneers.c") |
Gyorgy Szing | 30fa987 | 2017-12-05 01:08:47 +0000 | [diff] [blame] | 28 | |
Jamie Fox | c78c62c | 2019-05-23 13:42:17 +0100 | [diff] [blame] | 29 | if (TFM_PARTITION_AUDIT_LOG) |
| 30 | list(APPEND SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_audit_veneers.c") |
| 31 | endif() |
| 32 | |
Edison Ai | 60fb6c1 | 2019-02-22 17:01:37 +0800 | [diff] [blame] | 33 | if (TFM_PSA_API) |
| 34 | list(APPEND SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_psa_api_veneers.c") |
| 35 | endif() |
| 36 | |
Gyorgy Szing | 30fa987 | 2017-12-05 01:08:47 +0000 | [diff] [blame] | 37 | #Append all our source files to global lists. |
| 38 | list(APPEND ALL_SRC_C ${SS_NS_CALLABLE_C_SRC}) |
| 39 | unset(SS_NS_CALLABLE_C_SRC) |
| 40 | |
| 41 | #Setting include directories |
| 42 | embedded_include_directories(PATH ${TFM_ROOT_DIR} ABSOLUTE) |
| 43 | embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE) |
| 44 | embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/spm ABSOLUTE) |