• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 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") {
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    debug = false
22  }
23
24  branch_protector_ret = "pac_ret"
25
26  include_dirs = [
27    "context",
28    "$NETMANAGER_EXT_ROOT/utils/log/include",
29    "$NETCONNMANAGER_UTILS_DIR/common_utils/include",
30  ]
31
32  sources = [
33    "context/get_all_active_ifaces_context.cpp",
34    "context/get_iface_config_context.cpp",
35    "context/get_mac_address_context.cpp",
36    "context/is_iface_active_context.cpp",
37    "context/set_iface_config_context.cpp",
38    "ethernet_async_work.cpp",
39    "ethernet_exec.cpp",
40    "ethernet_module.cpp",
41    "interface_state_observer.cpp",
42    "interface_state_observer_wrapper.cpp",
43  ]
44
45  defines = [ "NETMGR_DEBUG" ]
46
47  cflags = [
48    "-fstack-protector-strong",
49    "-D_FORTIFY_SOURCE=2",
50    "-O2",
51  ]
52
53  cflags_cc = [
54    "-fstack-protector-strong",
55    "-D_FORTIFY_SOURCE=2",
56    "-O2",
57  ]
58
59  deps = [ "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_manager_if" ]
60
61  external_deps = [
62    "c_utils:utils",
63    "hilog:libhilog",
64    "ipc:ipc_core",
65    "napi:ace_napi",
66    "netmanager_base:napi_utils",
67    "netmanager_base:net_conn_manager_if",
68    "netmanager_base:net_manager_common",
69    "samgr:samgr_proxy",
70  ]
71
72  relative_install_dir = "module/net"
73  part_name = "netmanager_ext"
74  subsystem_name = "communication"
75}
76