blob: c4bb3e3c5888eeafe25228c5ae536452e768568b [file] [log] [blame]
# Copyright 2018 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")
group("all") {
deps = [
":g2ftool",
":u2fd",
]
if (use.test) {
deps += [ ":g2f_client_test" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo-${libbase_ver}",
"libchrome-${libbase_ver}",
]
}
pkg_config("u2fd_config") {
pkg_deps = [
"libpower_manager-client",
"libtrunks",
"openssl",
"system_api",
]
}
executable("u2fd") {
configs += [
":target_defaults",
":u2fd_config",
]
sources = [
"main.cc",
"tpm_vendor_cmd.cc",
"u2f_adpu.cc",
"u2fhid.cc",
"uhid_device.cc",
"util.cc",
]
libs = [ "policy-${libbase_ver}" ]
deps = [
"//common-mk/external_dependencies:policy-protos",
]
}
executable("g2ftool") {
configs += [ ":target_defaults" ]
sources = [
"g2f_tools/g2ftool.cc",
]
deps = [
":libg2fclient",
]
}
static_library("libg2fclient") {
configs += [ ":target_defaults" ]
sources = [
"g2f_tools/g2f_client.cc",
]
libs = [ "hidapi-hidraw" ]
}
if (use.test) {
pkg_config("g2f_client_test_config") {
pkg_deps = [ "libchrome-test-${libbase_ver}" ]
}
executable("g2f_client_test") {
configs += [
"//common-mk:test",
":target_defaults",
":g2f_client_test_config",
]
sources = [
"g2f_tools/g2f_client.cc",
"g2f_tools/g2f_client_test.cc",
]
deps = [
"//common-mk/testrunner",
]
}
}