• 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/communication/netmanager_ext/netmanager_ext_config.gni")
16
17config("wearable_distributed_net_manager_config") {
18  include_dirs = [
19    "include",
20    "$EXT_INNERKITS_ROOT/include",
21    "$EXT_INNERKITS_ROOT/wearabledistributednetclient/include",
22    "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/include",
23    "$NETWORKSHAREMANAGER_UTILS_DIR/event_report/include",
24    "${target_gen_dir}",
25  ]
26
27  defines = [
28    "NETMGR_LOG_TAG = \"WearableDistributedNetManager\"",
29    "LOG_DOMAIN = 0xD0015B0",
30    "WEARABLE_DISTRIBUTED_NET_CONFIG_PATH = \"/system/etc/communication/netmanager_ext/wearable_distributed_net_link_info.json\"",
31  ]
32
33  if (enable_netmgr_ext_debug) {
34    defines += [ "NETMGR_DEBUG" ]
35  }
36}
37
38wearable_distributed_net_manager_sources = [
39  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_agent.cpp",
40  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_config_forward.cpp",
41  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_link_info.cpp",
42  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_management.cpp",
43  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_service.cpp",
44  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_static_configuration.cpp",
45  "$WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR/src/wearable_distributed_net_supplier_info.cpp",
46  "${target_gen_dir}/../../interfaces/innerkits/wearabledistributednetclient/wearable_distributed_net_stub.cpp",
47]
48
49wearable_distributed_net_manager_deps = [
50  "$EXT_INNERKITS_ROOT/wearabledistributednetclient:wearable_distributed_net_manager_if",
51  "$EXT_INNERKITS_ROOT/wearabledistributednetclient:wearable_distributed_net_service",
52  "$NETMANAGER_EXT_ROOT/utils:net_event_report",
53]
54
55wearable_distributed_net_manager_external_deps = [
56  "ability_base:want",
57  "ability_base:zuri",
58  "ability_runtime:app_manager",
59  "bundle_framework:appexecfwk_base",
60  "bundle_framework:appexecfwk_core",
61  "cJSON:cjson",
62  "c_utils:utils",
63  "common_event_service:cesfwk_innerkits",
64  "eventhandler:libeventhandler",
65  "ffrt:libffrt",
66  "hilog:libhilog",
67  "hisysevent:libhisysevent",
68  "hitrace:hitrace_meter",
69  "ipc:ipc_core",
70  "netmanager_base:net_conn_manager_if",
71  "netmanager_base:net_data_share",
72  "netmanager_base:net_manager_common",
73  "netmanager_base:net_native_manager_if",
74  "netmanager_base:net_service_common",
75  "netmanager_base:netsys_client",
76  "netmanager_base:netsys_controller",
77  "netmanager_base:socket_permission",
78  "safwk:system_ability_fwk",
79  "samgr:samgr_proxy",
80]
81
82ohos_shared_library("wearable_distributed_net_manager") {
83  sanitize = {
84    cfi = true
85    cfi_cross_dso = true
86    debug = false
87  }
88
89  branch_protector_ret = "pac_ret"
90
91  configs = [ ":wearable_distributed_net_manager_config" ]
92
93  sources = wearable_distributed_net_manager_sources
94  deps = wearable_distributed_net_manager_deps
95  external_deps = wearable_distributed_net_manager_external_deps
96
97  if (battery_manager_switch_enable) {
98    external_deps += [ "battery_manager:batterysrv_client" ]
99  }
100
101  cflags = common_cflags + memory_optimization_cflags
102
103  cflags_cc = common_cflags + memory_optimization_cflags_cc
104
105  ldflags = memory_optimization_ldflags
106
107  part_name = "netmanager_ext"
108  subsystem_name = "communication"
109}
110
111ohos_prebuilt_etc("wearable_distributed_net_link_info") {
112  source = "$NETMANAGER_EXT_ROOT/services/wearabledistributednetmanager/config/wearable_distributed_net_link_info.json"
113  install_enable = true
114  relative_install_dir = "communication/netmanager_ext"
115  part_name = "netmanager_ext"
116  subsystem_name = "communication"
117}
118