| # Copyright 2023 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/drivers.gni") |
| |
| driver_bind_rules("parent_bind") { |
| rules = "meta/parent-driver.bind" |
| bind_output = "parent-driver.bindbc" |
| deps = [ |
| "//examples/drivers/bind/bindlib:gizmo.example", |
| "//src/devices/bind/fuchsia.test", |
| ] |
| } |
| |
| fuchsia_cc_driver("parent_driver") { |
| output_name = "banjo_transport_parent" |
| sources = [ "parent-driver.cc" ] |
| deps = [ |
| "//examples/drivers/bind/bindlib:gizmo.example_cpp", |
| "//examples/drivers/transport/banjo:fuchsia.examples.gizmo_banjo_cpp", |
| "//sdk/lib/driver/compat/cpp", |
| "//sdk/lib/driver/component/cpp", |
| "//src/devices/bind/fuchsia.platform:fuchsia.platform_cpp", |
| "//src/devices/lib/driver:driver_runtime", |
| ] |
| } |
| |
| fuchsia_driver_component("parent_component") { |
| component_name = "banjo_transport_parent" |
| manifest = "meta/parent-driver.cml" |
| deps = [ |
| ":parent_bind", |
| ":parent_driver", |
| ] |
| info = "meta/component-info.json" |
| } |
| |
| driver_bind_rules("child_bind") { |
| rules = "meta/child-driver.bind" |
| bind_output = "child-driver.bindbc" |
| deps = [ |
| "//examples/drivers/bind/bindlib:gizmo.example", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| fuchsia_cc_driver("child_driver") { |
| output_name = "banjo_transport_child" |
| sources = [ "child-driver.cc" ] |
| deps = [ |
| "//examples/drivers/transport/banjo:fuchsia.examples.gizmo_banjo_cpp", |
| "//sdk/lib/driver/compat/cpp", |
| "//sdk/lib/driver/component/cpp", |
| "//src/devices/lib/driver:driver_runtime", |
| ] |
| } |
| |
| fuchsia_driver_component("child_component") { |
| component_name = "banjo_transport_child" |
| manifest = "meta/child-driver.cml" |
| deps = [ |
| ":child_bind", |
| ":child_driver", |
| ] |
| info = "meta/component-info.json" |
| } |
| |
| fuchsia_driver_package("pkg") { |
| package_name = "banjo_transport" |
| driver_components = [ |
| ":child_component", |
| ":parent_component", |
| ] |
| } |