blob: 88a13f7f9db653da92b077ae19613995d8c9a03b [file]
# Copyright 2019 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/drivers/fuchsia_driver_component.gni")
source_set("shared") {
visibility = [ ":*" ]
sources = [ "simple-display.cc" ]
public_deps = [
"//sdk/banjo/fuchsia.hardware.display.controller:fuchsia.hardware.display.controller_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.pci:fuchsia.hardware.pci_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_llcpp",
"//sdk/fidl/fuchsia.sysmem2:fuchsia.sysmem2_llcpp",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/devices/pci/lib/device-protocol-pci",
"//src/devices/pci/lib/pci",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/zircon-internal",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
]
}
simple_drivers = [
"amd-kaveri",
"bochs",
"gga",
"intel",
"nv",
"vmware",
]
tests = []
foreach(driver, simple_drivers) {
driver_bind_rules("simple-$driver-bind") {
rules = "simple-$driver.bind"
header_output = "simple-$driver-bind.h"
tests = "${driver}_bind_tests.json"
deps = [ "//src/devices/bind/fuchsia.pci" ]
}
tests += [ ":simple-$driver-bind_test" ]
driver_module("simple.$driver-driver") {
output_name = "simple.$driver"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "simple-$driver.cc" ]
deps = [
":shared",
":simple-$driver-bind",
"//sdk/banjo/fuchsia.hardware.display.controller:fuchsia.hardware.display.controller_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.pci:fuchsia.hardware.pci_banjo_cpp",
"//src/devices/pci/lib/device-protocol-pci",
"//src/devices/pci/lib/pci",
"//src/lib/ddk",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
fuchsia_driver_component("simple.$driver") {
component_name = "simple.$driver"
deps = [ ":simple.$driver-driver" ]
}
}
group("tests") {
testonly = true
deps = tests
}