# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")
import("${chip_root}/src/app/common_flags.gni")
import("${chip_root}/src/lib/lib.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/src/platform/python.gni")

static_library("controller") {
  output_name = "libChipController"

  sources = [ "CHIPCluster.h" ]

  if (chip_controller && chip_build_controller) {
    sources += [
      "AbstractDnssdDiscoveryController.cpp",
      "AutoCommissioner.cpp",
      "AutoCommissioner.h",
      "CHIPCommissionableNodeController.cpp",
      "CHIPCommissionableNodeController.h",
      "CHIPDeviceControllerFactory.cpp",
      "CHIPDeviceControllerFactory.h",
      "CommissioneeDeviceProxy.cpp",
      "CommissioneeDeviceProxy.h",
      "CommissionerDiscoveryController.cpp",
      "CommissionerDiscoveryController.h",
      "CommissioningDelegate.cpp",
      "DeviceDiscoveryDelegate.h",
      "DevicePairingDelegate.h",
      "EmptyDataModelHandler.cpp",
      "ExampleOperationalCredentialsIssuer.cpp",
      "ExampleOperationalCredentialsIssuer.h",
      "SetUpCodePairer.cpp",
      "SetUpCodePairer.h",
    ]
    if (chip_enable_read_client) {
      sources += [
        "CHIPDeviceController.cpp",
        "CHIPDeviceController.h",
        "CommissioningWindowOpener.cpp",
        "CommissioningWindowOpener.h",
        "CurrentFabricRemover.cpp",
        "CurrentFabricRemover.h",
      ]
    }
  }

  cflags = [ "-Wconversion" ]

  public_deps = [
    "${chip_root}/src/app",
    "${chip_root}/src/app/server",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/dnssd",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/messaging",
    "${chip_root}/src/platform",
    "${chip_root}/src/protocols",
    "${chip_root}/src/setup_payload",
    "${chip_root}/src/tracing",
    "${chip_root}/src/tracing:macros",
    "${chip_root}/src/transport",
  ]

  deps = [ "${chip_root}/src/lib/address_resolve" ]

  defines = []
}
