• 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/config/components/idl_tool/idl.gni")
15import("//build/ohos.gni")
16import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni")
17
18config("net_conn_manager_if_config") {
19  include_dirs = [
20    "include",
21    "$EXT_INNERKITS_ROOT/include",
22    "$EXT_INNERKITS_ROOT/wearabledistributednetclient/include",
23    "${target_gen_dir}",
24  ]
25
26  cflags = []
27  if (is_double_framework) {
28    cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ]
29  }
30  if (target_cpu == "arm") {
31    cflags += [ "-DBINDER_IPC_32BIT" ]
32  }
33  if (is_standard_system) {
34    cflags += [ "-DCONFIG_STANDARD_SYSTEM" ]
35  }
36  if (defined(build_public_version) && build_public_version) {
37    cflags += [ "-DBUILD_PUBLIC_VERSION" ]
38  }
39
40  cflags += common_cflags
41
42  cflags_cc = common_cflags
43  defines = [
44    "NETMGR_LOG_TAG = \"WearableDistributedNetManager\"",
45    "LOG_DOMAIN = 0xD0015B0",
46  ]
47
48  if (enable_netmgr_ext_debug) {
49    defines += [ "NETMGR_DEBUG" ]
50  }
51}
52
53idl_interface_sources = [
54  "${target_gen_dir}/wearable_distributed_net_proxy.cpp",
55  "${target_gen_dir}/wearable_distributed_net_stub.cpp",
56]
57
58idl_gen_interface("wearable_distributed_net_service") {
59  src_idl = rebase_path("IWearableDistributedNet.idl")
60  dst_file = string_join(",", idl_interface_sources)
61  hitrace = "HITRACE_TAG_ABILITY_MANAGER"
62  log_domainid = "0xD0015B0"
63  log_tag = "WearableDistributedNet"
64}
65
66ohos_shared_library("wearable_distributed_net_manager_if") {
67  sanitize = {
68    cfi = true
69    cfi_cross_dso = true
70    debug = false
71  }
72
73  branch_protector_ret = "pac_ret"
74
75  sources = [
76    "$WEARABLE_DISTRIBUTED_NET_INNERKITS_SOURCE_DIR/src/wearable_distributed_net_client.cpp",
77    "${target_gen_dir}/wearable_distributed_net_proxy.cpp",
78  ]
79
80  version_script = "libwearable_distributed_net_kits.map"
81
82  public_configs = [ ":net_conn_manager_if_config" ]
83  deps = [ ":wearable_distributed_net_service" ]
84  external_deps = [
85    "bounds_checking_function:libsec_shared",
86    "c_utils:utils",
87    "hilog:libhilog",
88    "hitrace:hitrace_meter",
89    "ipc:ipc_core",
90    "ipc:ipc_single",
91    "netmanager_base:net_manager_common",
92    "samgr:samgr_proxy",
93  ]
94
95  innerapi_tags = [ "platformsdk" ]
96  part_name = "netmanager_ext"
97  subsystem_name = "communication"
98}
99