| # 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_fidl_library", |
| "fuchsia_fidl_llcpp_library", |
| "fuchsia_package", |
| ) |
| |
| fuchsia_fidl_library( |
| name = "sample.acpi.multiply", |
| srcs = [ |
| "acpi_multiply.fidl", |
| ], |
| library = "sample.acpi.multiply", |
| visibility = ["//visibility:public"], |
| deps = [ |
| "@fuchsia_sdk//fidl/zx", |
| ], |
| ) |
| |
| fuchsia_fidl_llcpp_library( |
| name = "sample.acpi.multiply_cc", |
| library = ":sample.acpi.multiply", |
| visibility = ["//visibility:public"], |
| deps = [ |
| "@fuchsia_sdk//fidl/zx:zx_llcpp_cc", |
| "@fuchsia_sdk//pkg/fidl_cpp_wire", |
| ], |
| ) |
| |
| fuchsia_driver_bytecode_bind_rules( |
| name = "bind_bytecode", |
| output = "acpi_multiply.bindbc", |
| rules = "acpi_multiply.bind", |
| deps = [ |
| "@fuchsia_sdk//bind/fuchsia.acpi", |
| ], |
| ) |
| |
| cc_binary( |
| name = "acpi_multiply", |
| srcs = [ |
| "registers.h", |
| "acpi_multiply.cc", |
| "acpi_multiply.h", |
| ], |
| linkshared = True, |
| deps = [ |
| ":sample.acpi.multiply_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.acpi:fuchsia.hardware.acpi_llcpp_cc", |
| "@fuchsia_sdk//fidl/zx:zx_cc", |
| "@fuchsia_sdk//pkg/async-cpp", |
| "@fuchsia_sdk//pkg/mmio", |
| "@fuchsia_sdk//pkg/hwreg", |
| "@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/acpi_multiply.cml", |
| ) |
| |
| fuchsia_driver_component( |
| name = "component", |
| bind_bytecode = ":bind_bytecode", |
| driver_lib = ":acpi_multiply", |
| manifest = ":manifest", |
| ) |
| |
| fuchsia_package( |
| name = "pkg", |
| package_name = "acpi_multiply", |
| visibility = ["//visibility:public"], |
| deps = [ |
| ":component", |
| ], |
| ) |
| |
| |
| |
| cc_binary( |
| name = "test_acpi_implementation", |
| srcs = [ |
| "test_acpi_implementation.cc", |
| "test_acpi_implementation.h", |
| "registers.h", |
| ], |
| linkshared = True, |
| deps = [ |
| "@fuchsia_sdk//fidl/fuchsia.device.fs:fuchsia.device.fs_llcpp_cc", |
| "@fuchsia_sdk//fidl/fuchsia.driver.compat:fuchsia.driver.compat_llcpp_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.acpi:fuchsia.hardware.acpi_llcpp_cc", |
| "@fuchsia_sdk//fidl/zx:zx_cc", |
| "@fuchsia_sdk//pkg/async-cpp", |
| "@fuchsia_sdk//pkg/driver2-llcpp", |
| "@fuchsia_sdk//pkg/hwreg", |
| "@fuchsia_sdk//pkg/mmio", |
| "@fuchsia_sdk//pkg/fidl_cpp_wire", |
| "@fuchsia_sdk//pkg/sys_component_llcpp", |
| "@fuchsia_sdk//pkg/zx", |
| ], |
| ) |
| |
| fuchsia_component_manifest( |
| name = "test_implementation_manifest", |
| src = "meta/test_acpi_implementation.cml", |
| ) |
| |
| fuchsia_driver_bytecode_bind_rules( |
| name = "test_implementation_bind_bytecode", |
| output = "test_implementation.bindbc", |
| rules = "test_acpi_implementation.bind", |
| deps = [ |
| "@fuchsia_sdk//bind/fuchsia.acpi", |
| ], |
| ) |
| |
| fuchsia_driver_component( |
| name = "test_acpi_component", |
| bind_bytecode = ":test_implementation_bind_bytecode", |
| driver_lib = ":test_acpi_implementation", |
| manifest = ":test_implementation_manifest", |
| ) |
| |
| fuchsia_package( |
| name = "test_implementation_pkg", |
| package_name = "test_acpi_implementation", |
| visibility = ["//visibility:public"], |
| deps = [ |
| ":test_acpi_component", |
| ], |
| ) |