• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2020 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16import("//build/lite/config/component/lite_component.gni")
17
18source_set("teecd_public_src") {
19  sources = [ "src/secfile_load_agent.c" ]
20  if (ohos_kernel_type == "liteos_a") {
21    defines = [ "TEE_LITEOS_A" ]
22  }
23  include_dirs = [
24    "include",
25    "//device/hisilicon/itrustee/itrustee_ree_lite/frameworks/libteec/include",
26    "//device/hisilicon/itrustee/itrustee_ree_lite/interfaces/innerkits/libteec",
27    "//third_party/bounds_checking_function/include",
28  ]
29  cflags = [ "-fPIC" ]
30}
31
32static_library("teecd_bin") {
33  sources = [
34    "src/tcu_authentication.c",
35    "src/tee_agent.c",
36  ]
37
38  if (ohos_kernel_type == "liteos_a") {
39    defines = [ "TEE_LITEOS_A" ]
40  }
41  deps = [
42    ":teecd_public_src",
43    "//third_party/bounds_checking_function:libsec_shared",
44  ]
45
46  include_dirs = [
47    "include",
48    "//device/hisilicon/itrustee/itrustee_ree_lite/frameworks/libteec/include",
49    "//device/hisilicon/itrustee/itrustee_ree_lite/interfaces/innerkits/libteec",
50    "//third_party/bounds_checking_function/include",
51  ]
52}
53
54lite_component("teecd") {
55  target_type = "executable"
56  output_dir = "$root_out_dir/vendor"
57
58  features = [ ":teecd_bin" ]
59}
60