• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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_base/netmanager_base_config.gni")
16
17config("net_service_common_config") {
18  # header file path
19  include_dirs = [ "$INNERKITS_ROOT/netconnclient/include/proxy" ]
20
21  cflags = [
22    "-fstack-protector-strong",
23    "-D_FORTIFY_SOURCE=2",
24    "-O2",
25  ]
26
27  cflags_cc = [
28    "-fstack-protector-strong",
29    "-D_FORTIFY_SOURCE=2",
30    "-O2",
31  ]
32}
33
34ohos_shared_library("net_service_common") {
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    boundary_sanitize = true
39    all_ubsan = true
40    debug = false
41  }
42
43  sources = [
44    "src/broadcast_manager.cpp",
45    "src/net_manager_center.cpp",
46    "src/net_settings.cpp",
47    "src/route_utils.cpp",
48  ]
49
50  include_dirs = [
51    "include",
52    "$NETMANAGER_BASE_ROOT/utils/log/include",
53    "$INNERKITS_ROOT/include",
54    "$INNERKITS_ROOT/netconnclient/include",
55    "$INNERKITS_ROOT/netmanagernative/include",
56    "$INNERKITS_ROOT/netstatsclient/include",
57    "$NETCONNMANAGER_COMMON_DIR/include",
58    "$NETMANAGER_BASE_ROOT/utils/log/include",
59    "$NETSYSCONTROLLER_ROOT_DIR/include",
60    "$SUBSYSTEM_DIR/ipc/interfaces/innerkits/ipc_core/include",
61    "$NETSYSNATIVE_SOURCE_DIR/include/netsys",
62  ]
63
64  public_configs = [ ":net_service_common_config" ]
65
66  deps = [
67    "$INNERKITS_ROOT/netconnclient:net_conn_parcel",
68    "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller",
69  ]
70
71  external_deps = [
72    "ability_base:want",
73    "common_event_service:cesfwk_innerkits",
74  ]
75
76  defines = [
77    "NETMGR_LOG_TAG = \"NetConnManager\"",
78    "LOG_DOMAIN = 0xD0015B0",
79  ]
80
81  if (enable_netmgr_debug) {
82    defines += [ "NETMGR_DEBUG" ]
83  }
84
85  external_deps += [ "hilog:libhilog" ]
86
87  part_name = "netmanager_base"
88  subsystem_name = "communication"
89}
90