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 14import("//build/ohos.gni") 15import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") 16 17ohos_shared_library("ethernet_manager") { 18 sources = [ 19 "src/dev_interface_state.cpp", 20 "src/ethernet_configuration.cpp", 21 "src/ethernet_dhcp_controller.cpp", 22 "src/ethernet_management.cpp", 23 "src/ethernet_service.cpp", 24 "src/ethernet_service_common.cpp", 25 "src/stub/ethernet_service_stub.cpp", 26 ] 27 28 include_dirs = [ 29 "$BASE_INNERKITS_ROOT/ethernetclient/include/proxy", 30 "$BASE_INNERKITS_ROOT/netstatsclient/include", 31 "$NETCONNMANAGER_UTILS_DIR/common_utils/include", 32 "$NETCONNMANAGER_COMMON_DIR/include", 33 "include", 34 "include/stub", 35 "$EXT_INNERKITS_ROOT/include", 36 "$EXT_INNERKITS_ROOT/ethernetclient/include", 37 "$EXT_INNERKITS_ROOT/ethernetclient/include/proxy", 38 "$BASE_INNERKITS_ROOT/include", 39 "$BASE_INNERKITS_ROOT/netconnclient/include", 40 "$BASE_INNERKITS_ROOT/dnsresolverclient/include", 41 "$BASE_INNERKITS_ROOT/ethernetclient/include", 42 "$NETSYSCONTROLLER_ROOT_DIR/include", 43 "$DHCP_MANAGER_ROOT/services/mgr_service/include", 44 "$DHCP_MANAGER_ROOT/interfaces/inner_api/include", 45 "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces", 46 "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include", 47 "$BASE_INNERKITS_ROOT/netmanagernative/include", 48 "$NETMANAGER_EXT_ROOT/utils/log/include", 49 "$NETMANAGER_BASE_ROOT/services/netmanagernative/include/netsys", 50 ] 51 52 deps = [ 53 "$BASE_INNERKITS_ROOT/netconnclient:net_conn_manager_if", 54 "$DHCP_MANAGER_ROOT/services/mgr_service:dhcp_manager_service", 55 "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_parcel", 56 "$NETCONNMANAGER_COMMON_DIR:net_service_common", 57 "$NETCONNMANAGER_UTILS_DIR:net_manager_common", 58 "$NETMANAGER_BASE_ROOT/services/netconnmanager:net_conn_manager", 59 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 60 "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", 61 ] 62 63 external_deps = [ 64 "ability_base:want", 65 "c_utils:utils", 66 "ipc:ipc_core", 67 "safwk:system_ability_fwk", 68 ] 69 70 defines = [ 71 "NETMGR_LOG_TAG = \"EthernetManager\"", 72 "LOG_DOMAIN = 0xD0015B0", 73 "USER_CONFIG_DIR = \"/data/service/el1/public/netmanager/ethernet\"", 74 "NETWORK_CONFIG_PATH = \"/system/etc/communication/netmanager_ext/ethernet_interfaces.json\"", 75 ] 76 77 if (enable_netmgr_ext_debug) { 78 defines += [ "NETMGR_DEBUG" ] 79 } 80 81 if (is_standard_system) { 82 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 83 } else { 84 external_deps += [ "hilog:libhilog" ] 85 } 86 87 part_name = "netmanager_ext" 88 subsystem_name = "communication" 89} 90 91ohos_prebuilt_etc("ethernet_interfaces") { 92 source = "$NETMANAGER_EXT_ROOT/services/ethernetmanager/config/ethernet_interfaces.json" 93 install_enable = true 94 relative_install_dir = "communication/netmanager_ext" 95 part_name = "netmanager_ext" 96} 97