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 = [ 16 "../../../interfaces/inner_api/libteec_vendor", 17 "../../../interfaces/kits/c/include", 18 ] 19} 20 21ohos_shared_library("libteec_vendor") { 22 part_name = "tee_client" 23 subsystem_name = "tee" 24 output_extension = "so" 25 install_images = [ 26 "vendor", 27 "updater_vendor", 28 ] 29 30 if (target_cpu == "arm64") { 31 module_install_dir = "lib64" 32 } else { 33 module_install_dir = "lib" 34 } 35 36 defines = [ "LIB_TEEC_VENDOR" ] 37 38 sources = [ 39 "../../libteec_vendor/load_sec_file.c", 40 "../../libteec_vendor/tee_client_api.c", 41 "../../libteec_vendor/tee_client_app_load.c", 42 "../../libteec_vendor/tee_client_socket.c", 43 ] 44 45 include_dirs = [ 46 "../../../interfaces/kits/c/include", 47 "../../../interfaces/inner_api/libteec_vendor", 48 "../../include", 49 "../../include/standard/teec_vendor/", 50 "../../include/standard/", 51 "../../libteec_vendor/", 52 "../../../services/authentication", 53 ] 54 55 external_deps = [ 56 "bounds_checking_function:libsec_shared", 57 "c_utils:utils", 58 "hilog:libhilog", 59 ] 60 61 ldflags = [ 62 "-Wl,-z,max-page-size=4096", 63 "-Wl,-z,separate-code", 64 ] 65 public_configs = [ ":exported_header_files" ] 66} 67