• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//test/xts/device_attest/build/devattestconfig.gni")
16
17config("devattest_service_config") {
18  visibility = [ ":*" ]
19  cflags = [ "-Wall" ]
20  include_dirs = [
21    "include",
22    "${devattest_path}/services/core",
23    "${devattest_path}/services/core/include",
24    "${devattest_path}/common",
25    "${devattest_path}/common/log",
26    "${devattest_path}/common/permission/include",
27    "${devattest_innerkit_path}/native_cpp/include",
28  ]
29}
30
31ohos_shared_library("devattest_service") {
32  version_script = "libdevattest_service.map"
33
34  sanitize = {
35    cfi = true
36    cfi_cross_dso = true
37    debug = false
38  }
39
40  branch_protector_ret = "pac_ret"
41
42  sources = [
43    "${devattest_path}/common/permission/src/permission.cpp",
44    "src/attest_result_info.cpp",
45    "src/devattest_network_callback.cpp",
46    "src/devattest_network_manager.cpp",
47    "src/devattest_service.cpp",
48    "src/devattest_service_stub.cpp",
49    "src/devattest_system_ability_listener.cpp",
50    "src/devattest_task.cpp",
51  ]
52
53  configs = [ ":devattest_service_config" ]
54
55  deps = [ "${devattest_path}/services/core:devattest_core" ]
56
57  # service
58  external_deps = [
59    "c_utils:utils",
60    "eventhandler:libeventhandler",
61    "hilog:libhilog",
62    "ipc:ipc_core",
63    "safwk:system_ability_fwk",
64    "samgr:samgr_proxy",
65  ]
66
67  # for permission
68  external_deps += [
69    "access_token:libaccesstoken_sdk",
70    "access_token:libtokenid_sdk",
71  ]
72
73  # for network callback
74  external_deps += [ "netmanager_base:net_conn_manager_if" ]
75
76  subsystem_name = "xts"
77  part_name = "device_attest"
78}
79