Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 1 | #/** @file |
| 2 | # * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved. |
| 3 | # * SPDX-License-Identifier : Apache-2.0 |
| 4 | # * |
| 5 | # * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # * you may not use this file except in compliance with the License. |
| 7 | # * You may obtain a copy of the License at |
| 8 | # * |
| 9 | # * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # * |
| 11 | # * Unless required by applicable law or agreed to in writing, software |
| 12 | # * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # * See the License for the specific language governing permissions and |
| 15 | # * limitations under the License. |
| 16 | #**/ |
| 17 | |
| 18 | # Listing all the sources from val |
| 19 | list(APPEND VAL_SRC_C_NSPE |
| 20 | ${PSA_ROOT_DIR}/val/nspe/val_entry.c |
| 21 | ${PSA_ROOT_DIR}/val/nspe/val_dispatcher.c |
| 22 | ${PSA_ROOT_DIR}/val/nspe/val_framework.c |
| 23 | ${PSA_ROOT_DIR}/val/nspe/val_crypto.c |
| 24 | ${PSA_ROOT_DIR}/val/nspe/val_interfaces.c |
| 25 | ${PSA_ROOT_DIR}/val/nspe/val_peripherals.c |
| 26 | ${PSA_ROOT_DIR}/val/common/val_target.c |
| 27 | ${PSA_ROOT_DIR}/val/nspe/val_protected_storage.c |
| 28 | ${PSA_ROOT_DIR}/val/nspe/val_internal_trusted_storage.c |
| 29 | ${PSA_ROOT_DIR}/val/nspe/val_attestation.c |
| 30 | ) |
| 31 | |
| 32 | # Create VAL NSPE library |
| 33 | add_library(${PSA_TARGET_VAL_NSPE_LIB} STATIC ${VAL_SRC_C_NSPE}) |
| 34 | |
| 35 | |
| 36 | # PSA Include directories |
| 37 | foreach(psa_inc_path ${PSA_INCLUDE_PATHS}) |
| 38 | target_include_directories(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE ${psa_inc_path}) |
| 39 | endforeach() |
| 40 | |
Gowtham Siddarth | ff38d71 | 2019-11-29 10:30:47 +0530 | [diff] [blame^] | 41 | if(${SUITE} STREQUAL "INITIAL_ATTESTATION") |
| 42 | target_include_directories(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE |
| 43 | ${PSA_QCBOR_INCLUDE_PATH} |
| 44 | ) |
| 45 | endif() |
| 46 | |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 47 | target_include_directories(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE |
| 48 | ${CMAKE_CURRENT_BINARY_DIR} |
| 49 | ${PSA_ROOT_DIR}/val/common |
| 50 | ${PSA_ROOT_DIR}/val/nspe |
| 51 | ${PSA_ROOT_DIR}/val/spe |
| 52 | ${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe |
| 53 | ${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/common |
| 54 | ${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe/crypto |
| 55 | ) |
| 56 | |
| 57 | if(${WATCHDOG_AVAILABLE} EQUAL 1) |
| 58 | target_compile_definitions(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE WATCHDOG_AVAILABLE) |
| 59 | endif() |
| 60 | if(${TEST_COMBINE_ARCHIVE} EQUAL 1) |
| 61 | target_compile_definitions(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE TEST_COMBINE_ARCHIVE) |
| 62 | endif() |
| 63 | target_compile_definitions(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE VAL_NSPE_BUILD) |
| 64 | target_compile_definitions(${PSA_TARGET_VAL_NSPE_LIB} PRIVATE TEST_COMBINE_ARCHIVE) |