blob: 3ccc6c93cabfc8e489e5afa0bd098692ba24a528 [file] [log] [blame] [edit]
# Copyright 2021 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/components.gni")
import("//build/drivers.gni")
all_hdrs = [
"device.h",
"debug.h",
]
all_src = [ "device.cc" ]
all_deps = [
":wlanif_bind",
"//sdk/fidl/fuchsia.driver.compat:fuchsia.driver.compat_cpp",
"//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_cpp",
"//sdk/fidl/fuchsia.wlan.device:fuchsia.wlan.device_hlcpp",
"//sdk/fidl/fuchsia.wlan.fullmac:fuchsia.wlan.fullmac_cpp",
"//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal_hlcpp",
"//sdk/fidl/fuchsia.wlan.mlme:fuchsia.wlan.mlme_hlcpp",
"//sdk/lib/driver/compat/cpp",
"//sdk/lib/driver/compat/cpp:symbols",
"//sdk/lib/driver/component/cpp",
"//src/connectivity/wlan/lib/common/cpp:common",
"//src/connectivity/wlan/lib/mlme/fullmac/c-binding:wlan-fullmac-mlme-c",
"//src/devices/lib/driver:driver_runtime",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/sync:sync-cpp",
# TODO(https://fxbug.dev/42114366): The fdio dependency here is purely due to
# a problem with transitive Rust static library dependencies when linking
# C++ programs
"//sdk/lib/fdio",
]
source_set("lib_source") {
public = all_hdrs
sources = all_src
public_deps = all_deps + [ "//src/connectivity/wlan/lib/mlme/fullmac/c-binding:wlan-fullmac-mlme-c" ]
include_dirs = [ "src/connectivity/wlan/drivers/wlanif/" ]
# TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
driver_bind_rules("wlanif_bind") {
rules = "meta/wlanif.bind"
bind_output = "wlanif.bindbc"
deps = [ "//sdk/fidl/fuchsia.wlan.fullmac:fuchsia.wlan.fullmac_bindlib" ]
}
fuchsia_cc_driver("wlanif_driver-driver") {
output_name = "wlanif"
deps = [ ":lib_source" ]
configs += [ "//build/config/fuchsia:enable_zircon_asserts" ]
}
fuchsia_driver_component("wlanif_driver") {
component_name = "wlanif"
manifest = "meta/wlanif.cml"
deps = [ ":wlanif_driver-driver" ]
info = "meta/wlanif_driver-info.json"
}
fuchsia_driver_package("wlanif") {
driver_components = [ ":wlanif_driver" ]
}