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