blob: 7ca75c609b0f2d00016a9c3788add1200581027b [file] [log] [blame]
# 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")
import("//build/test/test_package.gni")
wlanphy_sources = [
"device.cc",
"device.h",
"driver.cc",
"driver.h",
]
wlanphy_deps = [
":wlanphy_bind",
"//garnet/lib/wlan/protocol",
"//sdk/banjo/ddk.hw.wlan.wlaninfo",
"//sdk/banjo/fuchsia.hardware.wlanphyimpl",
"//sdk/fidl/fuchsia.wlan.device",
"//sdk/fidl/fuchsia.wlan.device:fuchsia.wlan.device_llcpp",
"//src/connectivity/wlan/lib/common/cpp:common",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//zircon/public/lib/async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
bind_rules("wlanphy_bind") {
rules = "wlanphy.bind"
output = "wlanphy-bind.h"
tests = "wlanphy_bind_test.json"
deps = [ "//src/devices/bind/fuchsia.wlan" ]
}
driver_module("wlanphy_driver") {
output_name = "wlanphy"
sources = wlanphy_sources
deps = wlanphy_deps
configs += [ "//build/config/fuchsia:enable_zircon_asserts" ]
}
driver_package("wlanphy") {
deps = [ ":wlanphy_driver" ]
drivers = [
{
name = "wlanphy.so"
},
]
}
# unit tests start here
executable("wlanphy_convert_unittest") {
testonly = true
sources = wlanphy_sources + [ "tests/convert_unittest.cc" ]
deps = wlanphy_deps + [ "//src/lib/fxl/test:gtest_main" ]
configs +=
[ "//src/connectivity/wlan/lib/mlme/cpp/tests:wlan_mlme_tests_config" ]
}
unittest_package("wlanphy-unittests") {
deps = [
":wlanphy_bind_test",
":wlanphy_convert_unittest",
]
tests = [
{
name = "wlanphy_convert_unittest"
},
]
}