| # 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/drivers.gni") |
| |
| driver_bind_rules("serial_async_bind") { |
| rules = "serial.bind" |
| header_output = "serial_bind.h" |
| bind_output = "serial-async.bindbc" |
| tests = "tests/tests.json" |
| deps = [ "//src/devices/bind/fuchsia.serial" ] |
| } |
| |
| fuchsia_driver("serial-async-driver") { |
| output_name = "serial-async" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| deps = [ |
| ":common", |
| "//src/devices/lib/driver", |
| ] |
| } |
| |
| fuchsia_driver_component("serial-async") { |
| info = "serial-async-info.json" |
| component_name = "serial-async" |
| deps = [ ":serial-async-driver" ] |
| colocate = true |
| fallback = true |
| } |
| |
| source_set("common") { |
| sources = [ |
| "serial.cc", |
| "serial.h", |
| ] |
| public_deps = [ |
| ":serial_async_bind", |
| "//sdk/banjo/fuchsia.hardware.serial:fuchsia.hardware.serial_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.serialimpl.async:fuchsia.hardware.serialimpl.async_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_llcpp", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/async", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/fidl-utils", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":serial_async_bind_test", |
| "tests", |
| ] |
| } |