blob: 97b8d31ad4943184434bea77b7eb8f7f6447d361 [file] [log] [blame]
# Copyright 2021 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 = [ ":libhwsec-foundation" ]
if (use.test) {
deps += [ ":hwsec-foundation_testrunner" ]
}
}
pkg_config("target_defaults") {
defines = [ "USE_TPM2=${use.tpm2}" ]
pkg_deps = [
"libbrillo",
"libchrome",
]
}
shared_library("libhwsec-foundation") {
sources = [
"da_reset/da_resetter.cc",
"tpm_error/auth_failure_analysis.cc",
"tpm_error/handle_auth_failure.cc",
"tpm_error/tpm_error_uma_reporter.cc",
]
pkg_deps = [
"libmetrics",
"libtpm_manager-client",
"system_api",
]
configs += [ ":target_defaults" ]
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [
"libchrome-test",
"libmetrics",
"libtpm_manager-client",
"libtpm_manager-client-test",
"system_api",
]
}
executable("hwsec-foundation_testrunner") {
sources = [
"da_reset/da_resetter_test.cc",
"tpm_error/auth_failure_analysis_test.cc",
"tpm_error/tpm_error_uma_reporter_test.cc",
]
deps = [
":libhwsec-foundation",
"//common-mk/testrunner",
]
sources += [ "tpm_error/tpm_error_uma_reporter.cc" ]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
}
}