blob: e68e239b88bd653bfe565c572666603a266fe683 [file] [log] [blame]
# 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")
source_set("shared") {
visibility = [ ":*" ]
sources = [ "simple-display.cc" ]
deps = [
"//sdk/banjo/fuchsia.hardware.display.controller",
"//sdk/banjo/fuchsia.hardware.pci",
"//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",
]
}
simple_drivers = [
"bochs",
"amd-kaveri",
"nv",
"intel",
"vmware",
]
tests = []
foreach(driver, simple_drivers) {
bind_rules("simple-$driver-bind") {
rules = "simple-$driver.bind"
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") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "simple-$driver.c" ]
deps = [
":shared",
":simple-$driver-bind",
"//sdk/banjo/fuchsia.hardware.display.controller",
"//sdk/banjo/fuchsia.hardware.pci",
"//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" ]
}
}
group("tests") {
testonly = true
deps = tests
}