• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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# http://www.apache.org/licenses/LICENSE-2.0
6# Unless required by applicable law or agreed to in writing, software
7# distributed under the License is distributed on an "AS IS" BASIS,
8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9# See the License for the specific language governing permissions and
10# limitations under the License.
11
12import("//build/ohos.gni")
13import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni")
14
15ohos_shared_library("netfirewall") {
16  sanitize = {
17    cfi = true
18    cfi_cross_dso = true
19    debug = false
20  }
21
22  include_dirs = [
23    "include",
24    "include/context",
25  ]
26
27  sources = [
28    "src/context/add_netfirewall_rule_context.cpp",
29    "src/context/delete_netfirewall_rule_context.cpp",
30    "src/context/get_all_intercept_records_context.cpp",
31    "src/context/get_all_netfirewall_rules_context.cpp",
32    "src/context/get_netfirewall_policy_context.cpp",
33    "src/context/get_netfirewall_rule_context.cpp",
34    "src/context/net_firewall_param_check.cpp",
35    "src/context/net_firewall_rule_parse.cpp",
36    "src/context/set_netfirewall_policy_context.cpp",
37    "src/context/update_netfirewall_rule_context.cpp",
38    "src/net_firewall_async_work.cpp",
39    "src/net_firewall_exec.cpp",
40    "src/netfirewall_module.cpp",
41  ]
42
43  cflags = [
44    "-fstack-protector-strong",
45    "-D_FORTIFY_SOURCE=2",
46    "-O2",
47  ]
48
49  cflags_cc = [
50    "-fstack-protector-strong",
51    "-D_FORTIFY_SOURCE=2",
52    "-O2",
53  ]
54
55  deps = [ "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netfirewallclient:netfirewall_manager_if" ]
56
57  external_deps = [
58    "c_utils:utils",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61    "napi:ace_napi",
62    "netmanager_base:napi_utils",
63    "netmanager_base:net_manager_common",
64    "netmanager_base:net_native_manager_if",
65  ]
66
67  relative_install_dir = "module/net"
68  part_name = "netmanager_ext"
69  subsystem_name = "communication"
70}
71