blob: 5dc49857f2b9b7b49d351e7d43ca77b987625237 [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/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
driver_bind_rules("aml_canvas_bind") {
rules = "aml_canvas.bind"
header_output = "aml_canvas-bind.h"
bind_output = "aml-canvas.bindbc"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
source_set("common_srcs") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "aml-canvas.cc" ]
public_deps = [
":aml_canvas_bind",
"//sdk/banjo/fuchsia.hardware.amlogiccanvas:fuchsia.hardware.amlogiccanvas_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/inspect",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver("aml-canvas-driver") {
output_name = "aml-canvas"
deps = [ ":common_srcs" ]
}
fuchsia_driver_component("aml-canvas") {
component_name = "aml-canvas"
deps = [ ":aml-canvas-driver" ]
info = "aml-canvas-info.json"
colocate = true
}
test("aml-canvas-test") {
output_name = "aml-canvas-test"
sources = [ "aml-canvas-test.cc" ]
deps = [
":common_srcs",
"//src/devices/testing/fake-bti",
"//src/devices/testing/mock-ddk",
"//src/devices/testing/mock-mmio-reg",
"//zircon/system/ulib/zxtest",
]
}
group("tests") {
testonly = true
deps = [
":aml-canvas-test-package",
":aml_canvas_bind_test",
]
}
fuchsia_unittest_package("aml-canvas-test-package") {
package_name = "aml-canvas-test"
deps = [ ":aml-canvas-test" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}