• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("//foundation/distributedhardware/mechbody_controller/mechbody.gni")
16
17ohos_shared_library("mechanicmanager_napi") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    boundary_sanitize = true
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24    integer_overflow = true
25    ubsan = true
26  }
27
28  sources = [
29    "js_mech_manager_client.cpp",
30    "js_mech_manager_service.cpp",
31    "js_mech_manager_stub.cpp",
32    "js_mech_manager.cpp",
33  ]
34
35  include_dirs = [
36    "../../../services/include",
37    "../../../services/include/controller"
38  ]
39
40  cflags = []
41  if (target_cpu == "arm") {
42    cflags += [ "-DBINDER_IPC_32BIT" ]
43  }
44
45  ldflags = [
46    "-fpie",
47    "-Wl,-z,relro",
48    "-Wl,-z,now",
49  ]
50
51  deps = []
52
53  external_deps = [
54    "ability_runtime:ability_context_native",
55    "ability_runtime:abilitykit_native",
56    "ability_runtime:napi_base_context",
57    "access_token:libtokenid_sdk",
58    "c_utils:utils",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61    "napi:ace_napi",
62    "samgr:samgr_proxy",
63  ]
64  relative_install_dir = "module/distributedhardware"
65  part_name = "mechbody_controller"
66  subsystem_name = "distributedhardware"
67}