• 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")
15
16ohos_static_library("libxtables") {
17  sources = [
18    "//third_party/iptables/libxtables/xtables.c",
19    "//third_party/iptables/libxtables/xtoptions.c",
20  ]
21
22  include_dirs = [
23    "//third_party/iptables",
24    "//third_party/iptables/extensions",
25    "//third_party/iptables/include",
26    "//third_party/iptables/iptables",
27    "//third_party/iptables/libiptc",
28  ]
29  license_file = "//third_party/iptables/COPYING"
30  cflags = [
31    "-D_LARGEFILE_SOURCE=1",
32    "-D_LARGE_FILES",
33    "-D_FILE_OFFSET_BITS=64",
34    "-D_REENTRANT",
35    "-DENABLE_IPV4",
36    "-DENABLE_IPV6",
37    "-Wall",
38    "-Werror",
39    "-Wno-pointer-arith",
40    "-Wno-sign-compare",
41    "-Wno-unused-parameter",
42    "-DNO_SHARED_LIBS=1",
43    "-DXTABLES_INTERNAL",
44    "-DXTABLES_LIBDIR=\"xtables_libdir_not_used\"",
45    "-Wno-missing-field-initializers",
46  ]
47
48  deps = []
49
50  part_name = "netmanager_base"
51  subsystem_name = "communication"
52}
53