• 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
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_lan_management.cpp",
25    "src/ethernet_management.cpp",
26    "src/ethernet_service.cpp",
27    "src/ethernet_service_common.cpp",
28    "src/stub/ethernet_service_stub.cpp",
29  ]
30
31  include_dirs = [
32    "$BASE_INNERKITS_ROOT/ethernetclient/include/proxy",
33    "$BASE_INNERKITS_ROOT/netstatsclient/include",
34    "$NETCONNMANAGER_UTILS_DIR/common_utils/include",
35    "$NETCONNMANAGER_COMMON_DIR/include",
36    "include",
37    "include/stub",
38    "$EXT_INNERKITS_ROOT/include",
39    "$EXT_INNERKITS_ROOT/ethernetclient/include",
40    "$EXT_INNERKITS_ROOT/ethernetclient/include/proxy",
41    "$BASE_INNERKITS_ROOT/include",
42    "$BASE_INNERKITS_ROOT/netconnclient/include",
43    "$BASE_INNERKITS_ROOT/dnsresolverclient/include",
44    "$BASE_INNERKITS_ROOT/ethernetclient/include",
45    "$NETSYSCONTROLLER_ROOT_DIR/include",
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  cflags = [
53    "-fstack-protector-strong",
54    "-D_FORTIFY_SOURCE=2",
55    "-O2",
56  ]
57
58  cflags_cc = [
59    "-fstack-protector-strong",
60    "-D_FORTIFY_SOURCE=2",
61    "-O2",
62  ]
63
64  deps = [ "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_parcel" ]
65
66  external_deps = [
67    "dhcp:dhcp_sdk",
68    "eventhandler:libeventhandler",
69    "ipc:ipc_core",
70    "netmanager_base:net_conn_manager_if",
71    "netmanager_base:net_service_common",
72    "netmanager_base:netsys_controller",
73    "safwk:system_ability_fwk",
74  ]
75
76  defines = [
77    "NETMGR_LOG_TAG = \"EthernetManager\"",
78    "LOG_DOMAIN = 0xD0015B0",
79    "USER_CONFIG_DIR = \"/data/service/el1/public/netmanager/ethernet\"",
80    "NETWORK_CONFIG_PATH = \"/system/etc/communication/netmanager_ext/ethernet_interfaces.json\"",
81  ]
82
83  if (enable_netmgr_ext_debug) {
84    defines += [ "NETMGR_DEBUG" ]
85  }
86
87  external_deps += [ "hilog:libhilog" ]
88
89  part_name = "netmanager_ext"
90  subsystem_name = "communication"
91}
92
93ohos_prebuilt_etc("ethernet_interfaces") {
94  source = "$NETMANAGER_EXT_ROOT/services/ethernetmanager/config/ethernet_interfaces.json"
95  install_enable = true
96  relative_install_dir = "communication/netmanager_ext"
97  part_name = "netmanager_ext"
98}
99