blob: 0d4e92f93e41330e8dc6e94257129d771c7c400b [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")
import("//build/test.gni")
import("//src/sys/build/components.gni")
bind_rules("aml_canvas_bind") {
rules = "aml_canvas.bind"
output = "aml_canvas-bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
source_set("common_srcs") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "aml-canvas.cc" ]
public_deps = [
":aml_canvas_bind",
"//sdk/banjo/fuchsia.hardware.amlogiccanvas",
"//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/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/zx",
]
}
driver_module("aml-canvas") {
deps = [ ":common_srcs" ]
}
test("aml-canvas-test") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "aml-canvas-test"
sources = [ "aml-canvas-test.cc" ]
deps = [
":common_srcs",
"//src/devices/testing/fake-bti",
"//src/devices/testing/fake_ddk",
"//src/devices/testing/mock-mmio-reg",
"//zircon/public/lib/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" ]
}