• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2025 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("../../../distributedhardwarefwk.gni")
16
17ohos_shared_library("hardwaremanager") {
18  sanitize = {
19    boundary_sanitize = true
20    integer_overflow = true
21    ubsan = true
22  }
23  branch_protector_ret = "pac_ret"
24
25  include_dirs = [
26    "include",
27    "${common_path}/log/include",
28    "${common_path}/utils/include",
29    "${innerkits_path}/include",
30    "${innerkits_path}/include/ipc",
31    "${av_trans_path}/common/include",
32  ]
33
34  sources = [ "src/native_distributedhardwarefwk_js.cpp" ]
35
36  deps = [
37    "${distributedhardwarefwk_path}/interfaces/inner_kits:libdhfwk_sdk",
38  ]
39
40  defines = [
41    "HI_LOG_ENABLE",
42    "DH_LOG_TAG=\"distributedhardwaremanager_js\"",
43    "LOG_DOMAIN=0xD004100",
44  ]
45
46  cflags = [
47    "-fstack-protector-strong",
48    "-D_FORTIFY_SOURCE=2",
49    "-O2",
50  ]
51
52  cflags_cc = cflags
53
54  ldflags = [
55    "-fpie",
56    "-Wl,-z,relro",
57    "-Wl,-z,now",
58  ]
59
60  external_deps = [
61    "access_token:libtokenid_sdk",
62    "bundle_framework:appexecfwk_base",
63    "hilog:libhilog",
64    "ipc:ipc_core",
65    "napi:ace_napi",
66  ]
67
68  subsystem_name = "distributedhardware"
69  relative_install_dir = "module/distributedhardware"
70  part_name = "distributed_hardware_fwk"
71
72  public_configs = [ "${innerkits_path}:dhfwk_idl_hardware_config" ]
73}
74