blob: 3abee3312e3688bdd0968123ccf027e16b89feca [file] [log] [blame]
Gyorgy Szing30fa9872017-12-05 01:08:47 +00001#-------------------------------------------------------------------------------
Tamas Banb6b80562019-01-04 22:49:24 +00002# Copyright (c) 2017-2019, Arm Limited. All rights reserved.
Gyorgy Szing30fa9872017-12-05 01:08:47 +00003#
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.
21set(SS_NS_CALLABLE_DIR ${CMAKE_CURRENT_LIST_DIR})
22if(NOT DEFINED TFM_ROOT_DIR)
23 message(FATAL_ERROR "Please set TFM_ROOT_DIR before including this file.")
24endif()
25
Edison Aid8e81d12019-05-27 17:37:18 +080026if (TFM_PSA_API)
27 set (SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_psa_api_veneers.c")
28else()
29 set (SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_veneers.c")
30endif()
Mingyang Sun9511e5e2019-05-29 18:18:44 +080031
32if (TFM_PARTITION_PLATFORM)
33 list(APPEND SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_platform_veneers.c")
34endif()
Gyorgy Szing30fa9872017-12-05 01:08:47 +000035
Jamie Foxc78c62c2019-05-23 13:42:17 +010036if (TFM_PARTITION_AUDIT_LOG)
37 list(APPEND SS_NS_CALLABLE_C_SRC "${CMAKE_CURRENT_LIST_DIR}/tfm_audit_veneers.c")
38endif()
39
Gyorgy Szing30fa9872017-12-05 01:08:47 +000040#Append all our source files to global lists.
41list(APPEND ALL_SRC_C ${SS_NS_CALLABLE_C_SRC})
42unset(SS_NS_CALLABLE_C_SRC)
43
44#Setting include directories
45embedded_include_directories(PATH ${TFM_ROOT_DIR} ABSOLUTE)
46embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE)
47embedded_include_directories(PATH ${TFM_ROOT_DIR}/secure_fw/spm ABSOLUTE)