#  Copyright (c) 2020, The OpenThread Authors.
#  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions are met:
#  1. Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#  3. Neither the name of the copyright holder nor the
#     names of its contributors may be used to endorse or promote products
#     derived from this software without specific prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#  POSSIBILITY OF SUCH DAMAGE.
#

import("../../etc/gn/openthread.gni")

openthread_cli_sources = [
  "cli.cpp",
  "cli.hpp",
  "cli_bbr.cpp",
  "cli_bbr.hpp",
  "cli_br.cpp",
  "cli_br.hpp",
  "cli_coap.cpp",
  "cli_coap.hpp",
  "cli_coap_secure.cpp",
  "cli_coap_secure.hpp",
  "cli_commissioner.cpp",
  "cli_commissioner.hpp",
  "cli_config.h",
  "cli_dataset.cpp",
  "cli_dataset.hpp",
  "cli_dns.cpp",
  "cli_dns.hpp",
  "cli_history.cpp",
  "cli_history.hpp",
  "cli_joiner.cpp",
  "cli_joiner.hpp",
  "cli_link_metrics.cpp",
  "cli_link_metrics.hpp",
  "cli_mac_filter.cpp",
  "cli_mac_filter.hpp",
  "cli_mdns.cpp",
  "cli_mdns.hpp",
  "cli_network_data.cpp",
  "cli_network_data.hpp",
  "cli_ping.cpp",
  "cli_ping.hpp",
  "cli_srp_client.cpp",
  "cli_srp_client.hpp",
  "cli_srp_server.cpp",
  "cli_srp_server.hpp",
  "cli_tcp.cpp",
  "cli_tcp.hpp",
  "cli_udp.cpp",
  "cli_udp.hpp",
  "cli_utils.cpp",
  "cli_utils.hpp",
  "x509_cert_key.hpp",
]

config("cli_config") {
  defines = []
}

static_library("libopenthread-cli-ftd") {
  sources = openthread_cli_sources
  public_deps = [ "../core:libopenthread-ftd" ]
  public_configs = [":cli_config"]
  visibility = [ "../../*" ]
}

static_library("libopenthread-cli-mtd") {
  sources = openthread_cli_sources
  public_deps = [ "../core:libopenthread-mtd" ]
  public_configs = [":cli_config"]
  visibility = [ "../../*" ]
}