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 56# args of base module 57NETMANAGER_BASE_ROOT = "$SUBSYSTEM_DIR/netmanager_base" 58 59# args of base modules'frameworks 60NETCONNMANAGER_INNERKITS_SOURCE_DIR = 61 "$NETMANAGER_BASE_ROOT/frameworks/native/netconnclient" 62 63# args of base modules' interfaces 64BASE_INNERKITS_ROOT = "$NETMANAGER_BASE_ROOT/interfaces/innerkits" 65 66# args of base module's servicesability_runtime 67NETCONNMANAGER_COMMON_DIR = "$NETMANAGER_BASE_ROOT/services/common" 68NETSYSCONTROLLER_ROOT_DIR = "$NETMANAGER_BASE_ROOT/services/netsyscontroller" 69NETCONNMANAGER_SOURCE_DIR = "$NETMANAGER_BASE_ROOT/services/netconnmanager" 70NETMANAGERNATIVE_ROOT = "$NETMANAGER_BASE_ROOT/services/netmanagernative" 71 72# args of base module's utils 73NETCONNMANAGER_UTILS_DIR = "$NETMANAGER_BASE_ROOT/utils" 74 75# NETMANAGER_PREBUILTS_DIR = "$NETMANAGER_BASE_ROOT/prebuilts" 76 77# args of other module 78DHCP_MANAGER_ROOT = "//foundation/communication/dhcp" 79WIFI_MANAGER_ROOT = "//foundation/communication/wifi/wifi" 80WIFI_MANAGER_INNERKITS_DIR = "$WIFI_MANAGER_ROOT/interfaces/kits/c" 81WIFI_FRAMEWORK_NATIVE_INCLUDE = "$WIFI_MANAGER_ROOT/frameworks/native/include" 82BLUETOOTH_ROOT = "//foundation/communication/bluetooth" 83USB_MANAGER_ROOT = "//base/usb/usb_manager" 84SAMGR_MANAGER_ROOT = "//foundation/systemabilitymgr/samgr" 85UTILS_ROOT = "//utils" 86THIRD_PARTY_ROOT = "//third_party" 87C_UTILS_ROOT = "//commonlibrary/c_utils" 88ABILITY_RUNTIME_PATH = "//foundation/ability/ability_runtime" 89ABILITY_RUNTIME_INNER_API_PATH = "$ABILITY_RUNTIME_PATH/interfaces/inner_api" 90ABILITY_RUNTIME_KITS_PATH = "$ABILITY_RUNTIME_PATH/interfaces/kits" 91ABILITY_RUNTIME_SERVICES_PATH = "$ABILITY_RUNTIME_PATH/services" 92ABILITY_RUNTIME_NAPI_PATH = "$ABILITY_RUNTIME_PATH/frameworks/js/napi" 93ABILITY_RUNTIME_NATIVE_PATH = "$ABILITY_RUNTIME_PATH/frameworks/native" 94ABILITY_DISPLAY_MANAGER = "//foundation/window/window_manager" 95BATTERY_MANAER_PATH = "//base/powermgr/battery_manager" 96BATTERY_INNER_API = "$BATTERY_MANAER_PATH/interfaces/inner_api" 97 98use_js_debug = false 99declare_args() { 100 communication_bluetooth_switch_enable = false 101 communication_wifi_switch_enable = false 102 enable_netmgr_ext_debug = true 103 netmanager_ext_feature_coverage = false 104 netmanager_ext_feature_ethernet = true 105 netmanager_ext_feature_share = true 106 netmanager_ext_feature_mdns = true 107 netmanager_ext_feature_net_firewall = false 108 netmanager_ext_feature_sysvpn = false 109 netmanager_ext_feature_vpn = true 110 netmanager_ext_feature_vpn_for_user0 = false 111 netmanager_ext_feature_vpnext = true 112 usb_manager_enable = false 113 netmanager_ext_feature_wearable_distributed_net = false 114 battery_manager_switch_enable = false 115 netmanager_ext_share_notification_enable = false 116 netmanager_ext_share_traffic_limit_enable = false 117 netmanager_ext_feature_networkslice = false 118} 119 120sysvpn_flags = [ "-DSUPPORT_SYSVPN" ] 121 122memory_optimization_cflags = [ 123 "-fvisibility=hidden", 124 "-fdata-sections", 125 "-ffunction-sections", 126 "-Os", 127] 128 129memory_optimization_cflags_cc = [ 130 "-fvisibility-inlines-hidden", 131 "-Os", 132] 133 134memory_optimization_ldflags = [ 135 "-Wl,--exclude-libs=ALL", 136 "-Wl,--gc-sections", 137] 138 139if (defined(global_parts_info) && 140 defined(global_parts_info.communication_wifi) && 141 global_parts_info.communication_wifi) { 142 communication_wifi_switch_enable = true 143} 144 145if (defined(global_parts_info) && 146 defined(global_parts_info.communication_bluetooth) && 147 global_parts_info.communication_bluetooth) { 148 communication_bluetooth_switch_enable = false 149} 150 151if (defined(global_parts_info) && defined(global_parts_info.usb_usb_manager) && 152 global_parts_info.usb_usb_manager) { 153 usb_manager_enable = true 154} 155 156if (defined(global_parts_info) && 157 defined(global_parts_info.powermgr_battery_manager) && 158 global_parts_info.powermgr_battery_manager) { 159 battery_manager_switch_enable = true 160} 161 162fuzz_test_path = "netmanager_ext/netmanager_ext" 163