aboutsummaryrefslogtreecommitdiff
path: root/third_party/mDNSResponder/BUILD.gn
blob: bb0047ee8fee1530b0e5852ed05c851019d53b31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config("mdnsresponder_config") {
  cflags = [ "-w" ]  # Disable all warnings.

  cflags_c = [
    # We need to rename some linked symbols in order to avoid multiple
    # definitions.
    "-DMD5_Update=MD5_Update_mDNS",
    "-DMD5_Init=MD5_Init_mDNS",
    "-DMD5_Final=MD5_Final_mDNS",
    "-DMD5_Transform=MD5_Transform_mDNS",
  ]
}

source_set("core") {
  sources = [
    "src/mDNSCore/DNSCommon.c",
    "src/mDNSCore/DNSCommon.h",
    "src/mDNSCore/DNSDigest.c",
    "src/mDNSCore/mDNS.c",
    "src/mDNSCore/mDNSDebug.h",
    "src/mDNSCore/mDNSEmbeddedAPI.h",
    "src/mDNSCore/uDNS.c",
    "src/mDNSCore/uDNS.h",
    "src/mDNSShared/mDNSDebug.c",
  ]

  configs += [ ":mdnsresponder_config" ]

  if (is_debug) {
    defines = [ "MDNS_DEBUGMSGS=2" ]
  }

  include_dirs = [ "src/mDNSCore" ]
}