1# Copyright (C) 2022 Huawei Technologies Co., Ltd. 2# Licensed under the Mulan PSL v2. 3# You can use this software according to the terms and conditions of the Mulan PSL v2. 4# You may obtain a copy of Mulan PSL v2 at: 5# http://license.coscl.org.cn/MulanPSL2 6# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR 7# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR 8# PURPOSE. 9# See the Mulan PSL v2 for more details. 10 11import("//build/ohos.gni") 12import("//build/ohos_var.gni") 13 14config("exported_header_files") { 15 include_dirs = [ "../../../interfaces/inner_api" ] 16} 17 18ohos_shared_library("libteec") { 19 part_name = "tee_client" 20 subsystem_name = "tee" 21 output_extension = "so" 22 23 branch_protector_ret = "pac_ret" 24 25 sources = [ "../../libteec_client/tee_client.cpp" ] 26 27 include_dirs = [ 28 "../../../interfaces/inner_api", 29 "../../include", 30 "../../include/standard/teec_system/", 31 "../../include/standard/", 32 "../../libteec_client/", 33 "../../libteec_vendor/", 34 "../../authentication", 35 ] 36 37 external_deps = [ 38 "bounds_checking_function:libsec_shared", 39 "c_utils:utils", 40 "hilog:libhilog", 41 "ipc:ipc_single", 42 "safwk:system_ability_fwk", 43 "samgr:samgr_proxy", 44 ] 45 46 ldflags = [ 47 "-Wl,-z,max-page-size=4096", 48 "-Wl,-z,separate-code", 49 ] 50 innerapi_tags = [ "ndk" ] 51 public_configs = [ ":exported_header_files" ] 52} 53 54ohos_shared_library("libteec_vendor") { 55 part_name = "tee_client" 56 subsystem_name = "tee" 57 output_extension = "so" 58 install_images = [ 59 "system", 60 "updater", 61 ] 62 63 innerapi_tags = [ "chipsetsdk_sp" ] 64 65 defines = [ 66 "LIB_TEEC_VENDOR", 67 "CONFIG_LOG_REPORT", 68 ] 69 70 sources = [ 71 "../../libteec_vendor/load_sec_file.c", 72 "../../libteec_vendor/tee_client_api.c", 73 "../../libteec_vendor/tee_client_app_load.c", 74 "../../libteec_vendor/tee_client_socket.c", 75 "../../../services/authentication/tee_auth_common.c", 76 ] 77 78 include_dirs = [ 79 "../../../interfaces/inner_api", 80 "../../include", 81 "../../include/standard/teec_vendor/", 82 "../../include/standard/", 83 "../../libteec_vendor/", 84 "../../../services/authentication", 85 ] 86 87 external_deps = [ 88 "bounds_checking_function:libsec_shared", 89 "c_utils:utils", 90 "hilog:libhilog", 91 "hisysevent:libhisysevent", 92 ] 93 94 ldflags = [ 95 "-Wl,-z,max-page-size=4096", 96 "-Wl,-z,separate-code", 97 ] 98 public_configs = [ ":exported_header_files" ] 99} 100