blob: 9b95ff1ca9a3446467513ef2da20ec4edede531d [file] [log] [blame]
# 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 = "acpi_controller.bindbc",
rules = "acpi_controller.bind",
deps = [
"//src/testing/lib:examples.driver.test",
],
)
cc_binary(
name = "acpi_controller",
srcs = [
"acpi_controller.cc",
"acpi_controller.h",
"acpi_server.cc",
"acpi_server.h",
],
linkshared = True,
deps = [
"//src/acpi_multiply/lib",
"@fuchsia_sdk//bind/fuchsia.acpi:fuchsia.acpi_cc",
"@fuchsia_sdk//fidl/fuchsia.hardware.acpi:fuchsia.hardware.acpi_bindlib_cc",
"@fuchsia_sdk//fidl/fuchsia.hardware.acpi:fuchsia.hardware.acpi_llcpp_cc",
"@fuchsia_sdk//pkg/async-cpp",
"@fuchsia_sdk//pkg/driver_compat",
"@fuchsia_sdk//pkg/driver_component_cpp",
"@fuchsia_sdk//pkg/mmio",
],
)
fuchsia_component_manifest(
name = "manifest",
src = "meta/acpi_controller.cml",
includes = [
"@fuchsia_sdk//pkg/syslog:client",
],
)
fuchsia_driver_component(
name = "component",
bind_bytecode = ":bind_bytecode",
driver_lib = ":acpi_controller",
manifest = ":manifest",
)
fuchsia_package(
name = "pkg",
package_name = "acpi_controller",
visibility = ["//visibility:public"],
components = [
":component",
],
)