blob: 3c96d3e4191cb7fdcce3904453b250fa0d742237 [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",
)
#[START parent_driver]
cc_binary(
name = "parent_driver",
srcs = [
"gizmo_server.h",
"parent-driver.cc",
"parent-driver.h",
],
linkshared = True,
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",
"@fuchsia_sdk//pkg/sys_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",
visibility = ["//visibility:public"],
components = [
":component",
],
)