• 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"
26NETFIREWALL_EXTENSION_SOURCE_DIR =
27    "$NETMANAGER_EXT_ROOT/frameworks/native/netfirewallclient"
28WEARABLE_DISTRIBUTED_NET_INNERKITS_SOURCE_DIR =
29    "$NETMANAGER_EXT_ROOT/frameworks/native/wearabledistributednetclient"
30NETWORKSLICE_INNERKITS_SOURCE_DIR =
31    "$NETMANAGER_EXT_ROOT/frameworks/native/networksliceclient"
32
33# args of interfaces
34INTERFACES_INCLUDE =
35    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/externalvpnclient/include"
36INTERFACES_DIR = "$NETMANAGER_EXT_ROOT/interfaces/innerkits/externalvpnclient"
37EXT_INNERKITS_ROOT = "$NETMANAGER_EXT_ROOT/interfaces/innerkits"
38MDNSINTERFACE_INCLUDE = "$NETMANAGER_EXT_ROOT/interfaces/innerkits/mdnsclient"
39
40# args of services
41SERVICES_EXTERNALVPNMANAGER = "$NETMANAGER_EXT_ROOT/services/externalvpnmanager"
42ETHERNETMANAGER_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/ethernetmanager"
43NETWORKSHAREMANAGER_SOURCE_DIR =
44    "$NETMANAGER_EXT_ROOT/services/networksharemanager"
45MDNSMANAGER_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/mdnsmanager"
46VPNMANAGER_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/vpnmanager"
47NETFIREWALLMANAGER_SOURCE_DIR =
48    "$NETMANAGER_EXT_ROOT/services/netfirewallmanager"
49WEARABLE_DISTRIBUTED_NET_MANAGER_SOURCE_DIR =
50    "$NETMANAGER_EXT_ROOT/services/wearabledistributednetmanager"
51NETWORKSLICE_SOURCE_DIR = "$NETMANAGER_EXT_ROOT/services/networkslicemanager"
52
53# args of uitls
54NETWORKSHAREMANAGER_UTILS_DIR = "$NETMANAGER_EXT_ROOT/utils"
55
56use_js_debug = false
57declare_args() {
58  communication_bluetooth_switch_enable = false
59  communication_wifi_switch_enable = false
60  enable_netmgr_ext_debug = true
61  netmanager_ext_feature_coverage = false
62  netmanager_ext_feature_ethernet = true
63  netmanager_ext_feature_share = true
64  netmanager_ext_feature_mdns = true
65  netmanager_ext_feature_net_firewall = false
66  netmanager_ext_feature_sysvpn = false
67  netmanager_ext_feature_vpn = true
68  netmanager_ext_feature_vpn_for_user0 = false
69  netmanager_ext_feature_vpnext = true
70  usb_manager_enable = false
71  netmanager_ext_feature_wearable_distributed_net = false
72  battery_manager_switch_enable = false
73  netmanager_ext_share_notification_enable = false
74  netmanager_ext_share_traffic_limit_enable = false
75  netmanager_ext_extensible_authentication = false
76  netmanager_ext_feature_networkslice = false
77}
78
79sysvpn_flags = [ "-DSUPPORT_SYSVPN" ]
80
81common_cflags = [
82  "-fstack-protector-strong",
83  "-D_FORTIFY_SOURCE=2",
84  "-fdata-sections",
85  "-ffunction-sections",
86  "-Os",
87  "-O2",
88]
89
90memory_optimization_cflags = [
91  "-fvisibility=hidden",
92]
93
94memory_optimization_cflags_cc = [
95  "-fvisibility=hidden",
96  "-fvisibility-inlines-hidden",
97]
98
99memory_optimization_ldflags = [
100  "-Wl,--exclude-libs=ALL",
101  "-Wl,--gc-sections",
102]
103
104if (defined(global_parts_info) &&
105    defined(global_parts_info.communication_wifi) &&
106    global_parts_info.communication_wifi) {
107  communication_wifi_switch_enable = true
108}
109
110if (defined(global_parts_info) &&
111    defined(global_parts_info.communication_bluetooth) &&
112    global_parts_info.communication_bluetooth) {
113  communication_bluetooth_switch_enable = false
114}
115
116if (defined(global_parts_info) && defined(global_parts_info.usb_usb_manager) &&
117    global_parts_info.usb_usb_manager) {
118  usb_manager_enable = true
119}
120
121if (defined(global_parts_info) &&
122    defined(global_parts_info.powermgr_battery_manager) &&
123    global_parts_info.powermgr_battery_manager) {
124  battery_manager_switch_enable = true
125}
126
127fuzz_test_path = "netmanager_ext/netmanager_ext"
128