• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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_ext/netmanager_ext_config.gni")
16
17config("net_vpn_manager_config") {
18  include_dirs = [
19    "$UTILS_ROOT/native/base/include",
20    "$UTILS_ROOT/system/safwk/native/include",
21    "$EXT_INNERKITS_ROOT/include",
22    "$EXT_INNERKITS_ROOT/netvpnclient/include",
23    "$EXT_INNERKITS_ROOT/netvpnclient/include/ipc",
24    "$NETCONNMANAGER_COMMON_DIR/include",
25    "$NETMANAGER_EXT_ROOT/utils/log/include",
26    "$VPNMANAGER_SOURCE_DIR/include",
27    "$VPNMANAGER_SOURCE_DIR/include/ipc",
28    "$NETWORKSHAREMANAGER_UTILS_DIR/event_report/include",
29    "$BASE_INNERKITS_ROOT/include",
30    "$BASE_INNERKITS_ROOT/netconnclient/include",
31    "$BASE_INNERKITS_ROOT/netsyscontroller/include",
32    "$BASE_INNERKITS_ROOT/netmanagernative/include",
33    "$NETMANAGERNATIVE_ROOT/include/netsys",
34    "$NETSYSCONTROLLER_ROOT_DIR/include",
35    "$NETMANAGER_BASE_ROOT/utils/common_utils/include",
36    "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include",
37  ]
38
39  defines = [
40    "NETMGR_LOG_TAG = \"NetworkVpnManager\"",
41    "LOG_DOMAIN = 0xD0015B0",
42  ]
43
44  if (enable_netmgr_ext_debug) {
45    defines += [ "NETMGR_DEBUG" ]
46  }
47}
48
49net_vpn_manager_sources = [
50  "$VPNMANAGER_SOURCE_DIR/src/extended_vpn_ctl.cpp",
51  "$VPNMANAGER_SOURCE_DIR/src/ipc/networkvpn_service_stub.cpp",
52  "$VPNMANAGER_SOURCE_DIR/src/ipc/vpn_event_callback_proxy.cpp",
53  "$VPNMANAGER_SOURCE_DIR/src/net_vpn_impl.cpp",
54  "$VPNMANAGER_SOURCE_DIR/src/networkvpn_hisysevent.cpp",
55  "$VPNMANAGER_SOURCE_DIR/src/networkvpn_service.cpp",
56  "$VPN_INNERKITS_SOURCE_DIR/src/vpn_config.cpp",
57]
58
59net_vpn_manager_deps = [ "$NETMANAGER_EXT_ROOT/utils:net_event_report" ]
60
61net_vpn_manager_external_deps = [
62  "bundle_framework:appexecfwk_base",
63  "bundle_framework:appexecfwk_core",
64  "c_utils:utils",
65  "eventhandler:libeventhandler",
66  "hilog:libhilog",
67  "hisysevent:libhisysevent",
68  "ipc:ipc_core",
69  "netmanager_base:net_conn_manager_if",
70  "netmanager_base:net_manager_common",
71  "netmanager_base:netsys_controller",
72  "os_account:os_account_innerkits",
73  "safwk:system_ability_fwk",
74  "samgr:samgr_proxy",
75]
76
77ohos_shared_library("net_vpn_manager") {
78  configs = [ ":net_vpn_manager_config" ]
79
80  sources = net_vpn_manager_sources
81  deps = net_vpn_manager_deps
82  external_deps = net_vpn_manager_external_deps
83
84  cflags = memory_optimization_cflags
85  cflags_cc = memory_optimization_cflags_cc
86  ldflags = memory_optimization_ldflags
87
88  part_name = "netmanager_ext"
89  subsystem_name = "communication"
90}
91
92ohos_static_library("net_vpn_manager_static") {
93  configs = [ ":net_vpn_manager_config" ]
94
95  sources = net_vpn_manager_sources
96  deps = net_vpn_manager_deps
97  external_deps = net_vpn_manager_external_deps
98
99  part_name = "netmanager_ext"
100  subsystem_name = "communication"
101}
102