| # Copyright 2022 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. |
| |
| load( |
| "@fuchsia_sdk//fuchsia:defs.bzl", |
| "fuchsia_cc_driver", |
| "fuchsia_component_manifest", |
| "fuchsia_driver_bind_bytecode", |
| "fuchsia_driver_component", |
| "fuchsia_package", |
| ) |
| |
| #[START parent_driver] |
| fuchsia_cc_driver( |
| name = "parent_driver", |
| srcs = [ |
| "gizmo_server.h", |
| "parent-driver.cc", |
| "parent-driver.h", |
| ], |
| deps = [ |
| # This is a C++ lib from our manually created bind library. |
| "//src/bind_library/lib:examples.gizmo.bind_cc", |
| # This is a C++ lib from our manually created FIDL based bind library. |
| "//src/bind_library/lib:examples.gizmo_bindlib_cc", |
| "//src/bind_library/lib:examples.gizmo_cc", |
| # This is a C++ lib from an SDK FIDL based bind library. |
| "@fuchsia_sdk//fidl/fuchsia.device.fs:fuchsia.device.fs_bindlib_cc", |
| "@fuchsia_sdk//pkg/driver_component_cpp", |
| ], |
| ) |
| #[END parent_driver] |
| |
| fuchsia_driver_bind_bytecode( |
| name = "bind_bytecode", |
| output = "parent-driver.bindbc", |
| rules = "parent-driver.bind", |
| deps = [ |
| "@fuchsia_sdk//bind/fuchsia.acpi", |
| ], |
| ) |
| |
| fuchsia_component_manifest( |
| name = "manifest", |
| src = "meta/parent-driver.cml", |
| includes = [ |
| "@fuchsia_sdk//pkg/syslog:client", |
| ], |
| ) |
| |
| fuchsia_driver_component( |
| name = "component", |
| bind_bytecode = ":bind_bytecode", |
| driver_lib = ":parent_driver", |
| manifest = ":manifest", |
| ) |
| |
| fuchsia_package( |
| name = "pkg", |
| package_name = "parent_pkg", |
| components = [ |
| ":component", |
| ], |
| visibility = ["//visibility:public"], |
| ) |