# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")

assert(current_cpu == "x64")

driver_bind_rules("intel_rtc_bind") {
  rules = "intel_rtc.bind"
  header_output = "intel_rtc_bind.h"
  tests = "bind-tests.json"
  deps = [ "//src/devices/bind/fuchsia.acpi" ]
}

common_deps = [
  ":intel_rtc_bind",
  "//sdk/fidl/fuchsia.hardware.nvram:fuchsia.hardware.nvram_llcpp",
  "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_c",
  "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_llcpp",
  "//src/devices/lib/acpi",
  "//src/devices/lib/driver",
  "//src/devices/rtc/lib/rtc",
  "//src/devices/rtc/lib/rtc:rtc_llcpp",
  "//src/lib/ddk",
  "//src/lib/ddktl",
  "//zircon/third_party/ulib/safemath",
]

fuchsia_driver("intel-rtc-driver") {
  output_name = "intel-rtc"
  sources = [ "intel-rtc.cc" ]
  deps = common_deps

  # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
  configs += [ "//build/config:Wno-conversion" ]

  # TODO(fxbug.dev/85473): This target uses |fidl::WireTryDispatch| which is deprecated.
  # Please remove ad-hoc composition of FIDL protocols and migrate to |fidl::WireDispatch|.
  # See linked bug for details.
  configs += [ "//build/cpp:fidl-llcpp-deprecated-wire-try-dispatch" ]

  # TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
  # Consider switching to the C++ bindings. See linked bug for details.
  configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}

fuchsia_driver_component("intel-rtc") {
  info = "intel-rtc-info.json"
  component_name = "intel-rtc"
  deps = [ ":intel-rtc-driver" ]
  colocate = true
}

test("intel-rtc-test-bin") {
  output_name = "intel-rtc-test"
  sources = [
    "intel-rtc-test.cc",
    "intel-rtc.cc",
  ]

  cflags = [ "-DFOR_TEST" ]
  deps = common_deps + [
           "//src/devices/testing/mock-ddk",
           "//zircon/system/ulib/async-loop:async-loop-cpp",
           "//zircon/system/ulib/zxtest",
         ]

  # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
  configs += [ "//build/config:Wno-conversion" ]

  # TODO(fxbug.dev/85473): This target uses |fidl::WireTryDispatch| which is deprecated.
  # Please remove ad-hoc composition of FIDL protocols and migrate to |fidl::WireDispatch|.
  # See linked bug for details.
  configs += [ "//build/cpp:fidl-llcpp-deprecated-wire-try-dispatch" ]

  # TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
  # Consider switching to the C++ bindings. See linked bug for details.
  configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}

fuchsia_unittest_package("intel-rtc-test") {
  deps = [ ":intel-rtc-test-bin" ]
}

group("tests") {
  testonly = true
  deps = [
    ":intel-rtc-test",
    ":intel_rtc_bind_test",
  ]
}
