blob: b398ef8016a6917395b3b7e7ac173ee9b2302eff [file] [log] [blame]
# Copyright 2019 The Chromium OS 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("//common-mk/pkg_config.gni")
import("//common-mk/proto_library.gni")
group("all") {
deps = [ ":hardware_verifier" ]
if (use.test) {
deps += [ ":unittest_runner" ]
}
}
pkg_config("target_defaults") {
# Manually add the include path so that the generated .pb.h files can
# include runtime_probe.pb.h properly.
cflags = [ "-I${sysroot}/usr/include/runtime_probe/proto_bindings" ]
# NOSORT
pkg_deps = [
"libbrillo",
"libchrome",
"libmetrics",
# system_api depends on protobuf (or protobuf-lite). It must appear
# before protobuf here or the linker flags won't be in the right
# order.
"system_api",
"protobuf",
"vboot_host",
]
}
static_library("libhardware_verifier") {
configs += [ ":target_defaults" ]
deps = [ "//hardware_verifier/proto:hardware_verifier-protos" ]
sources = [
"cli.cc",
"hw_verification_spec_getter_impl.cc",
"observer.cc",
"probe_result_getter_impl.cc",
"verifier_impl.cc",
]
}
executable("hardware_verifier") {
configs += [ ":target_defaults" ]
sources = [ "main.cc" ]
deps = [ ":libhardware_verifier" ]
}
if (use.test) {
static_library("libhardware_verifier_test") {
configs += [ ":target_defaults" ]
deps = [ "//hardware_verifier/proto:hardware_verifier-protos" ]
sources = [
"hw_verification_spec_getter_fake.cc",
"probe_result_getter_fake.cc",
"test_utils.cc",
"verifier_fake.cc",
]
}
executable("unittest_runner") {
configs += [
"//common-mk:test",
":target_defaults",
]
sources = [
"cli_test.cc",
"hw_verification_spec_getter_impl_test.cc",
"probe_result_getter_impl_test.cc",
"verifier_impl_test.cc",
]
deps = [
":libhardware_verifier",
":libhardware_verifier_test",
"//common-mk/testrunner",
]
data = [ "testdata/" ]
}
}