| # 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( |
| "@rules_fuchsia//fuchsia:defs.bzl", |
| "fuchsia_cc_binary", |
| "fuchsia_component_manifest", |
| "fuchsia_driver_bytecode_bind_rules", |
| "fuchsia_driver_component", |
| "fuchsia_package", |
| ) |
| |
| fuchsia_driver_bytecode_bind_rules( |
| name = "bind_bytecode", |
| output = "composite_sample.bindbc", |
| rules = "composite_sample.bind", |
| deps = [ |
| "@fuchsia_sdk//bind/fuchsia.acpi", |
| ], |
| ) |
| |
| cc_binary( |
| name = "composite_sample", |
| srcs = [ |
| "composite_sample.cc", |
| "composite_sample.h", |
| ], |
| linkshared = True, |
| deps = [ |
| "@fuchsia_sdk//fidl/fuchsia.driver.compat:fuchsia.driver.compat_llcpp_cc", |
| "@fuchsia_sdk//fidl/zx:zx_cc", |
| "@fuchsia_sdk//pkg/driver2-llcpp", |
| "@fuchsia_sdk//pkg/fidl_cpp_wire", |
| "@fuchsia_sdk//pkg/sys_component_llcpp", |
| "@fuchsia_sdk//pkg/zx", |
| ], |
| ) |
| |
| fuchsia_component_manifest( |
| name = "manifest", |
| src = "meta/composite_sample.cml", |
| includes = [ |
| "@fuchsia_sdk//pkg/syslog:client", |
| ], |
| ) |
| |
| fuchsia_driver_component( |
| name = "component", |
| bind_bytecode = ":bind_bytecode", |
| driver_lib = ":composite_sample", |
| manifest = ":manifest", |
| ) |
| |
| fuchsia_package( |
| name = "pkg", |
| package_name = "composite_sample", |
| visibility = ["//visibility:public"], |
| deps = [ |
| ":component", |
| ], |
| ) |