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