blob: 4a285ac515ee62ee54e0bcfc17499e68454ac202 [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 = [
":bio_crypto_init",
":bio_wash",
":biod",
":biod_client_tool",
":libbiod",
]
if (use.test) {
deps += [ ":biod_test_runner" ]
}
if (use.fuzzer) {
deps += [ ":biod_storage_fuzzer" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo-${libbase_ver}",
"libchrome-${libbase_ver}",
"libmetrics-${libbase_ver}",
# 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-lite",
]
}
static_library("libbiod") {
configs += [ ":target_defaults" ]
sources = [
"biod_metrics.cc",
"biod_storage.cc",
"biometrics_daemon.cc",
"cros_fp_biometrics_manager.cc",
"cros_fp_device.cc",
"scoped_umask.cc",
"uinput_device.cc",
]
}
executable("biod") {
configs += [ ":target_defaults" ]
sources = [
"main.cc",
]
deps = [
":libbiod",
]
}
executable("bio_crypto_init") {
configs += [ ":target_defaults" ]
sources = [
"tools/bio_crypto_init.cc",
]
deps = [
":libbiod",
]
}
executable("bio_wash") {
configs += [ ":target_defaults" ]
sources = [
"tools/bio_wash.cc",
]
deps = [
":libbiod",
]
}
executable("biod_client_tool") {
configs += [ ":target_defaults" ]
sources = [
"tools/biod_client_tool.cc",
]
}
if (use.test) {
pkg_config("libchrome_test_config") {
pkg_deps = [ "libchrome-test-${libbase_ver}" ]
}
executable("biod_test_runner") {
configs += [
"//common-mk:test",
":libchrome_test_config",
":target_defaults",
]
sources = [
"biod_metrics_test.cc",
"biod_storage_test.cc",
]
deps = [
":libbiod",
"//common-mk/testrunner",
]
}
}
if (use.fuzzer) {
pkg_config("libchrome_test_config") {
pkg_deps = [ "libchrome-test-${libbase_ver}" ]
}
executable("biod_storage_fuzzer") {
configs += [
"//common-mk/common_fuzzer",
":libchrome_test_config",
":target_defaults",
]
sources = [
"biod_storage_fuzzer.cc",
]
deps = [
":libbiod",
]
}
}