• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        "//base/tee/tee_client/interfaces/kits/c/include",
17    ]
18}
19
20ohos_ndk_library("libteec") {
21    output_name = "teec"
22    output_extension = "so"
23    ndk_description_file = "./libteec.ndk.json"
24    #min_compact_version = "1"
25    #system_capability = "SystemCapability.Tee.TeeClient"
26}
27
28ohos_ndk_headers("tee_client_header") {
29    dest_dir = "$ndk_headers_out_dir/tee_client"
30    sources = [
31        "./include/tee_client_api.h",
32        "./include/tee_client_type.h",
33        "./include/tee_client_constants.h",
34    ]
35}
36
37ohos_shared_library("teec") {
38    part_name = "tee_client"
39    subsystem_name = "tee"
40    output_extension = "so"
41
42    sources = [
43        "src/tee_client.cpp",
44    ]
45
46    include_dirs = [
47        "src/",
48        "//base/tee/tee_client/interfaces/kits/c/include",
49        "//base/tee/tee_client/interfaces/inner_api/libteec_vendor",
50        "//base/tee/tee_client/framework/include",
51        "//base/tee/tee_client/framework/include/standard/teec_system/",
52        "//base/tee/tee_client/framework/include/standard/",
53        "//base/tee/tee_client/framework/libteec_vendor/",
54        "//base/tee/tee_client/framework/authentication",
55    ]
56
57    deps = [
58        "//third_party/bounds_checking_function:libsec_shared",
59    ]
60
61    external_deps = [
62        "c_utils:utils",
63        "hilog:libhilog",
64        "ipc:ipc_core",
65        "safwk:system_ability_fwk",
66        "samgr:samgr_proxy",
67    ]
68
69    ldflags = [
70        "-Wl,-z,max-page-size=4096",
71        "-Wl,-z,separate-code",
72    ]
73    public_configs = [ ":exported_header_files" ]
74}
75