• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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
14# args of this module
15SUBSYSTEM_DIR = "//foundation/communication"
16NETMANAGER_EXT_ROOT = "$SUBSYSTEM_DIR/netmanager_ext"
17
18# args of frameworks
19FRAMEWORKS_SRC = "$NETMANAGER_EXT_ROOT/frameworks/native/externalvpnclient/src"
20ETHERNETMANAGER_INNERKITS_SOURCE_DIR =
21    "$NETMANAGER_EXT_ROOT/frameworks/native/ethernetclient"
22NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR =
23    "$NETMANAGER_EXT_ROOT/frameworks/native/netshareclient"
24VPN_INNERKITS_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/frameworks/native/netvpnclient"
25VPN_EXTENSION_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/frameworks/native/vpnextension"
26
27# args of interfaces
28INTERFACES_INCLUDE =
29    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/externalvpnclient/include"
30INTERFACES_DIR = "$NETMANAGER_EXT_ROOT/interfaces/innerkits/externalvpnclient"
31EXT_INNERKITS_ROOT = "$NETMANAGER_EXT_ROOT/interfaces/innerkits"
32MDNSINTERFACE_INCLUDE = "$NETMANAGER_EXT_ROOT/interfaces/innerkits/mdnsclient"
33
34# args of services
35SERVICES_EXTERNALVPNMANAGER = "$NETMANAGER_EXT_ROOT/services/externalvpnmanager"
36ETHERNETMANAGER_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/ethernetmanager"
37NETWORKSHAREMANAGER_SOURCE_DIR =
38    "$NETMANAGER_EXT_ROOT/services/networksharemanager"
39MDNSMANAGER_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/mdnsmanager"
40VPNMANAGER_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/vpnmanager"
41
42# args of uitls
43NETWORKSHAREMANAGER_UTILS_DIR = "$NETMANAGER_EXT_ROOT/utils"
44
45# args of base module
46NETMANAGER_BASE_ROOT = "$SUBSYSTEM_DIR/netmanager_base"
47
48# args of base modules'frameworks
49NETCONNMANAGER_INNERKITS_SOURCE_DIR =
50    "$NETMANAGER_BASE_ROOT/frameworks/native/netconnclient"
51
52# args of base modules' interfaces
53BASE_INNERKITS_ROOT = "$NETMANAGER_BASE_ROOT/interfaces/innerkits"
54
55# args of base module's servicesability_runtime
56NETCONNMANAGER_COMMON_DIR = "$NETMANAGER_BASE_ROOT/services/common"
57NETSYSCONTROLLER_ROOT_DIR = "$NETMANAGER_BASE_ROOT/services/netsyscontroller"
58NETCONNMANAGER_SOURCE_DIR = "$NETMANAGER_BASE_ROOT/services/netconnmanager"
59NETMANAGERNATIVE_ROOT = "$NETMANAGER_BASE_ROOT/services/netmanagernative"
60
61# args of base module's utils
62NETCONNMANAGER_UTILS_DIR = "$NETMANAGER_BASE_ROOT/utils"
63
64# NETMANAGER_PREBUILTS_DIR = "$NETMANAGER_BASE_ROOT/prebuilts"
65
66# args of other module
67DHCP_MANAGER_ROOT = "//foundation/communication/dhcp"
68WIFI_MANAGER_ROOT = "//foundation/communication/wifi/wifi"
69WIFI_MANAGER_INNERKITS_DIR = "$WIFI_MANAGER_ROOT/interfaces/kits/c"
70WIFI_FRAMEWORK_NATIVE_INCLUDE = "$WIFI_MANAGER_ROOT/frameworks/native/include"
71BLUETOOTH_ROOT = "//foundation/communication/bluetooth"
72USB_MANAGER_ROOT = "//base/usb/usb_manager"
73SAMGR_MANAGER_ROOT = "//foundation/systemabilitymgr/samgr"
74UTILS_ROOT = "//utils"
75THIRD_PARTY_ROOT = "//third_party"
76C_UTILS_ROOT = "//commonlibrary/c_utils"
77ABILITY_RUNTIME_PATH = "//foundation/ability/ability_runtime"
78ABILITY_RUNTIME_INNER_API_PATH = "$ABILITY_RUNTIME_PATH/interfaces/inner_api"
79ABILITY_RUNTIME_KITS_PATH = "$ABILITY_RUNTIME_PATH/interfaces/kits"
80ABILITY_RUNTIME_SERVICES_PATH = "$ABILITY_RUNTIME_PATH/services"
81ABILITY_RUNTIME_NAPI_PATH = "$ABILITY_RUNTIME_PATH/frameworks/js/napi"
82ABILITY_RUNTIME_NATIVE_PATH = "$ABILITY_RUNTIME_PATH/frameworks/native"
83ABILITY_DISPLAY_MANAGER = "//foundation/window/window_manager"
84
85use_js_debug = false
86declare_args() {
87  communication_bluetooth_switch_enable = false
88  communication_wifi_switch_enable = false
89  enable_netmgr_ext_debug = true
90  netmanager_ext_feature_ethernet = true
91  netmanager_ext_feature_share = true
92  netmanager_ext_feature_mdns = true
93  netmanager_ext_feature_vpn = true
94  netmanager_ext_feature_vpnext = true
95  usb_manager_enable = false
96}
97
98memory_optimization_cflags = [
99  "-fvisibility=hidden",
100  "-fdata-sections",
101  "-ffunction-sections",
102  "-Os",
103]
104
105memory_optimization_cflags_cc = [
106  "-fvisibility-inlines-hidden",
107  "-Os",
108]
109
110memory_optimization_ldflags = [
111  "-Wl,--exclude-libs=ALL",
112  "-Wl,--gc-sections",
113]
114
115if (defined(global_parts_info) &&
116    defined(global_parts_info.communication_wifi) &&
117    global_parts_info.communication_wifi) {
118  communication_wifi_switch_enable = true
119}
120
121if (defined(global_parts_info) &&
122    defined(global_parts_info.communication_bluetooth) &&
123    global_parts_info.communication_bluetooth) {
124  communication_bluetooth_switch_enable = true
125}
126
127if (defined(global_parts_info) && defined(global_parts_info.usb_usb_manager) &&
128    global_parts_info.usb_usb_manager) {
129  usb_manager_enable = true
130}
131
132fuzz_test_path = "netmanager_ext/netmanager_ext"
133