Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 1 | #/** @file |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 2 | # * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved. |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 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_SPE |
| 20 | ${PSA_ROOT_DIR}/val/spe/val_driver_service_apis.c |
| 21 | ) |
| 22 | |
| 23 | # Listing common sources from partition |
| 24 | list(APPEND PARTITION_COMMON_SRC_C_SPE |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 25 | ${PSA_ROOT_DIR}/ff/partition/driver_partition.c |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 26 | ) |
| 27 | |
| 28 | # Listing sources from partition for client |
| 29 | list(APPEND PARTITION_IPC_CLIENT_SRC_C_SPE |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 30 | ${PSA_ROOT_DIR}/ff/partition/client_partition.c |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 31 | ) |
| 32 | # Listing sources from partition for server |
| 33 | list(APPEND PARTITION_IPC_SERVER_SRC_C_SPE |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 34 | ${PSA_ROOT_DIR}/ff/partition/server_partition.c |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 35 | ) |
| 36 | |
| 37 | foreach(src_file ${SUITE_CC_SOURCE_SPE}) |
| 38 | get_filename_component(FILE_NAME ${src_file} NAME) |
| 39 | string(SUBSTRING ${FILE_NAME} 0 9 TEST_STR) |
| 40 | if(${TEST_STR} STREQUAL "test_supp") |
| 41 | list(APPEND SUITE_SERVER_CC_SRC_SPE ${src_file}) |
| 42 | else() |
| 43 | list(APPEND SUITE_CLIENT_CC_SRC_SPE ${src_file}) |
| 44 | endif() |
| 45 | endforeach() |
| 46 | |
| 47 | # Create Driver partition library |
| 48 | add_library(${PSA_TARGET_DRIVER_PARTITION_LIB} STATIC ${VAL_SRC_C_SPE} ${PARTITION_COMMON_SRC_C_SPE} ${PAL_SRC_C_DRIVER_SP}) |
| 49 | |
| 50 | # Create Client partition library |
| 51 | add_library(${PSA_TARGET_CLIENT_PARTITION_LIB} STATIC ${PARTITION_IPC_CLIENT_SRC_C_SPE} ${SUITE_CLIENT_CC_SRC_SPE}) |
| 52 | |
| 53 | # Create Server partition library |
| 54 | add_library(${PSA_TARGET_SERVER_PARTITION_LIB} STATIC ${PARTITION_IPC_SERVER_SRC_C_SPE} ${SUITE_SERVER_CC_SRC_SPE}) |
| 55 | |
| 56 | target_include_directories(${PSA_TARGET_DRIVER_PARTITION_LIB} PRIVATE |
| 57 | ${CMAKE_CURRENT_BINARY_DIR} |
| 58 | ${PSA_ROOT_DIR}/val/common |
| 59 | ${PSA_ROOT_DIR}/val/spe |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 60 | ${PSA_ROOT_DIR}/ff/partition |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 61 | ${PSA_ROOT_DIR}/platform/targets/common/nspe |
| 62 | ${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 63 | ) |
| 64 | |
| 65 | # Include paths from platform for driver partition build |
| 66 | foreach(inc_path ${PAL_DRIVER_INCLUDE_PATHS}) |
| 67 | target_include_directories(${PSA_TARGET_DRIVER_PARTITION_LIB} PRIVATE ${inc_path}) |
| 68 | endforeach() |
| 69 | |
| 70 | target_include_directories(${PSA_TARGET_CLIENT_PARTITION_LIB} PRIVATE |
| 71 | ${CMAKE_CURRENT_BINARY_DIR} |
| 72 | ${PSA_ROOT_DIR}/val/common |
| 73 | ${PSA_ROOT_DIR}/val/nspe |
| 74 | ${PSA_ROOT_DIR}/val/spe |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 75 | ${PSA_ROOT_DIR}/platform/targets/common/nspe |
| 76 | ${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 77 | ${PSA_ROOT_DIR}/ff/partition |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 78 | ) |
| 79 | target_include_directories(${PSA_TARGET_SERVER_PARTITION_LIB} PRIVATE |
| 80 | ${CMAKE_CURRENT_BINARY_DIR} |
| 81 | ${PSA_ROOT_DIR}/val/common |
| 82 | ${PSA_ROOT_DIR}/val/spe |
Vinay Kumar Kotegowder | 18fcd40 | 2020-04-27 17:38:41 +0530 | [diff] [blame] | 83 | ${PSA_ROOT_DIR}/platform/targets/common/nspe |
| 84 | ${PSA_ROOT_DIR}/platform/targets/${TARGET}/nspe |
Jaykumar Pitambarbhai Patel | 03e358e | 2020-01-09 19:27:20 +0530 | [diff] [blame] | 85 | ${PSA_ROOT_DIR}/ff/partition |
Vinay Kumar Kotegowder | 9982f90 | 2019-07-15 09:13:54 +0530 | [diff] [blame] | 86 | ) |
| 87 | |
| 88 | # PSA Include directories |
| 89 | foreach(psa_inc_path ${PSA_INCLUDE_PATHS}) |
| 90 | target_include_directories(${PSA_TARGET_DRIVER_PARTITION_LIB} PRIVATE ${psa_inc_path}) |
| 91 | target_include_directories(${PSA_TARGET_CLIENT_PARTITION_LIB} PRIVATE ${psa_inc_path}) |
| 92 | target_include_directories(${PSA_TARGET_SERVER_PARTITION_LIB} PRIVATE ${psa_inc_path}) |
| 93 | endforeach() |