| # Copyright 2018 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. |
| |
| import("//build/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/driver_package.gni") |
| |
| bind_rules("bt-hci-emulator-bind") { |
| rules = "bt-hci-emulator.bind" |
| disable_autobind = true |
| output = "bt-hci-emulator-bind.h" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.test" ] |
| } |
| |
| driver_module("driver") { |
| output_name = "bt-hci-emulator" |
| testonly = true |
| |
| sources = [ |
| "device.cc", |
| "device.h", |
| "driver.cc", |
| "log.h", |
| "peer.cc", |
| "peer.h", |
| ] |
| |
| deps = [ |
| ":bt-hci-emulator-bind", |
| "//sdk/banjo/fuchsia.hardware.test", |
| "//sdk/fidl/fuchsia.bluetooth.test", |
| "//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c_client", |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//src/connectivity/bluetooth/core/bt-host:fidl_helpers", |
| "//src/connectivity/bluetooth/core/bt-host/hci", |
| "//src/connectivity/bluetooth/core/bt-host/testing:fake_controller", |
| "//src/connectivity/bluetooth/lib/fidl", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-default", |
| ] |
| } |
| |
| driver_package("emulator") { |
| testonly = true |
| |
| deps = [ ":driver" ] |
| |
| drivers = [ |
| { |
| name = "bt-hci-emulator.so" |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-hci-emulator-bind_test" ] |
| } |