| # 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. |
| |
| # [START imports] |
| load( |
| "@rules_fuchsia//fuchsia:defs.bzl", |
| "fuchsia_component_manifest", |
| "fuchsia_driver_bind_bytecode", |
| "fuchsia_driver_component", |
| "fuchsia_package", |
| ) |
| # [END imports] |
| |
| # [START bind_rules] |
| fuchsia_driver_bind_bytecode( |
| name = "bind_bytecode", |
| output = "qemu_edu.bindbc", |
| rules = "qemu_edu.bind", |
| deps = [ |
| "@fuchsia_sdk//bind/fuchsia.pci", |
| ], |
| ) |
| # [END bind_rules] |
| |
| #[START binary] |
| cc_binary( |
| name = "qemu_edu", |
| srcs = [ |
| "edu_device.cc", |
| "edu_device.h", |
| "edu_server.cc", |
| "edu_server.h", |
| "qemu_edu.cc", |
| "qemu_edu.h", |
| ], |
| linkshared = True, |
| deps = [ |
| "//src/qemu_edu/fidl:examples.qemuedu_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.pci:fuchsia.hardware.pci_llcpp_cc", |
| "@fuchsia_sdk//pkg/driver_compat", |
| "@fuchsia_sdk//pkg/driver_component_cpp", |
| "@fuchsia_sdk//pkg/hwreg", |
| "@fuchsia_sdk//pkg/mmio", |
| ], |
| ) |
| # [END binary] |
| |
| # [START component_manifest] |
| fuchsia_component_manifest( |
| name = "manifest", |
| src = "meta/qemu_edu.cml", |
| includes = [ |
| "@fuchsia_sdk//pkg/syslog:client", |
| ], |
| ) |
| # [END component_manifest] |
| |
| # [START component] |
| fuchsia_driver_component( |
| name = "component", |
| bind_bytecode = ":bind_bytecode", |
| driver_lib = ":qemu_edu", |
| manifest = ":manifest", |
| ) |
| # [END component] |
| |
| # [START package] |
| fuchsia_package( |
| name = "pkg", |
| package_name = "qemu_edu", |
| visibility = ["//visibility:public"], |
| components = [ |
| ":component", |
| ], |
| ) |
| # [END package] |