| # 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_component_manifest", |
| "fuchsia_driver_bind_bytecode", |
| "fuchsia_driver_component", |
| "fuchsia_package", |
| ) |
| |
| fuchsia_driver_bind_bytecode( |
| name = "bind_bytecode", |
| output = "input_sample.bindbc", |
| rules = "input_sample.bind", |
| deps = ["@fuchsia_sdk//bind/fuchsia.acpi"], |
| ) |
| |
| cc_binary( |
| name = "input_sample", |
| srcs = [ |
| "input_sample.cc", |
| "input_sample.h", |
| "input_server.cc", |
| "input_server.h", |
| ], |
| linkshared = True, |
| deps = [ |
| "@fuchsia_sdk//fidl/fuchsia.input.report:fuchsia.input.report_llcpp_cc", |
| "@fuchsia_sdk//pkg/async-cpp", |
| "@fuchsia_sdk//pkg/driver_compat", |
| "@fuchsia_sdk//pkg/driver_component_cpp", |
| "@fuchsia_sdk//pkg/input_report_reader", |
| ], |
| ) |
| |
| fuchsia_component_manifest( |
| name = "manifest", |
| src = "meta/input_sample.cml", |
| includes = [ |
| "@fuchsia_sdk//pkg/syslog:client", |
| ], |
| ) |
| |
| fuchsia_driver_component( |
| name = "component", |
| bind_bytecode = ":bind_bytecode", |
| driver_lib = ":input_sample", |
| manifest = ":manifest", |
| ) |
| |
| fuchsia_package( |
| name = "pkg", |
| package_name = "input_sample", |
| visibility = ["//visibility:public"], |
| components = [ |
| ":component", |
| ], |
| ) |