| # 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. |
| |
| # This file was generated by the `fx create` command. The template |
| # is located at `//tools/create/templates/component-default/BUILD.gn.tmpl-cpp`. |
| # If you find something broken, we are eager to review fixes. |
| |
| import("//build/components.gni") |
| import("//src/sys/core/build/core_shard.gni") |
| |
| group("fastboot-usb") { |
| deps = [ ":package" ] |
| } |
| |
| # Logic are mostly trivial. Thus for test we simply included the binary target |
| # so that it is being built and any change that breaks it will be disocvered. |
| group("tests") { |
| testonly = true |
| deps = [ ":bin" ] |
| } |
| |
| executable("bin") { |
| output_name = "fastboot-usb" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_cpp", |
| "//sdk/fidl/fuchsia.hardware.fastboot:fuchsia.hardware.fastboot_cpp", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/firmware/lib/fastboot", |
| "//src/lib/fsl", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "fastboot-usb" |
| manifest = "meta/fastboot_usb.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("package") { |
| package_name = "fastboot-usb" |
| deps = [ ":component" ] |
| } |
| |
| # The core realm shard to be used by product integrators. |
| core_shard("fastboot-usb-core-shard") { |
| shard_file = "meta/fastboot_usb.core_shard.cml" |
| } |