• 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
17NETMANAGER_EXT_NAPI_ROOT = "$NETMANAGER_EXT_ROOT/frameworks/js/napi/"
18
19config("mdns_config") {
20  visibility = [ ":mdns" ]
21
22  cflags = [
23    "-fstack-protector-strong",
24    "-D_FORTIFY_SOURCE=2",
25    "-O2",
26  ]
27
28  cflags_cc = [
29    "-fstack-protector-strong",
30    "-D_FORTIFY_SOURCE=2",
31    "-O2",
32  ]
33}
34
35ohos_shared_library("mdns") {
36  include_dirs = [
37    "$NETMANAGER_EXT_NAPI_ROOT/mdns/include",
38    "$NETMANAGER_EXT_NAPI_ROOT/mdns/include/contexts",
39  ]
40
41  sources = [
42    "src/contexts/mdns_addlocalservice_context.cpp",
43    "src/contexts/mdns_base_context.cpp",
44    "src/contexts/mdns_removelocalservice_context.cpp",
45    "src/contexts/mdns_resolvelocalservice_context.cpp",
46    "src/contexts/mdns_startsearching_context.cpp",
47    "src/mdns_async_work.cpp",
48    "src/mdns_callback_observer.cpp",
49    "src/mdns_exec.cpp",
50    "src/mdns_instances.cpp",
51    "src/mdns_module.cpp",
52  ]
53
54  defines = [ "NETMGR_DEBUG" ]
55
56  deps = [
57    "$EXT_INNERKITS_ROOT/mdnsclient:mdns_manager_if",
58    "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common",
59  ]
60
61  external_deps = [
62    "c_utils:utils",
63    "hilog:libhilog",
64    "ipc:ipc_core",
65    "napi:ace_napi",
66    "netmanager_base:napi_utils",
67  ]
68
69  configs = [ ":mdns_config" ]
70
71  relative_install_dir = "module/net"
72  part_name = "netmanager_ext"
73  subsystem_name = "communication"
74}
75