• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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_base/netmanager_base_config.gni")
16
17ohos_shared_library("network") {
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    boundary_sanitize = true
22    all_ubsan = true
23    debug = false
24  }
25
26  include_dirs = [
27    "async_context/include",
28    "async_work/include",
29    "constant/include",
30    "network_exec/include",
31    "network_module/include",
32    "observer/include",
33    "options/include",
34    "$NETMANAGER_BASE_ROOT/utils/log/include",
35  ]
36
37  sources = [
38    "async_context/src/gettype_context.cpp",
39    "async_context/src/subscribe_context.cpp",
40    "async_context/src/unsubscribe_context.cpp",
41    "async_work/src/network_async_work.cpp",
42    "network_exec/src/network_exec.cpp",
43    "network_module/src/network_module.cpp",
44    "observer/src/network_observer.cpp",
45  ]
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 = [
60    "$INNERKITS_ROOT/netconnclient:net_conn_manager_if",
61    "$NETMANAGER_BASE_ROOT/utils/napi_utils:napi_utils",
62    "$THIRD_PARTY_ROOT/libuv:uv",
63  ]
64
65  external_deps = [
66    "c_utils:utils",
67    "hilog:libhilog",
68    "ipc:ipc_core",
69    "napi:ace_napi",
70  ]
71
72  relative_install_dir = "module"
73  part_name = "netmanager_base"
74  subsystem_name = "communication"
75}
76