blob: 90f34f63e0e90d32ad1124bb99885ab3ec520bc1 [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 = [
":tpm2-simulator",
":tpm2-simulator-init",
":tpm2-simulator-stop",
]
}
pkg_config("target_default_deps") {
pkg_deps = [
"libbrillo",
"libchrome",
"libselinux",
"openssl",
]
}
config("target_defaults") {
configs = [ ":target_default_deps" ]
defines = [
"USE_TPM1=${use.tpm}",
"USE_TPM2=${use.tpm2}",
]
}
source_set("tpm_executor_version_library") {
sources = [ "tpm_executor_version.cc" ]
configs += [
":target_defaults",
"//common-mk:pic",
]
}
executable("tpm2-simulator") {
sources = [
"main.cc",
"simulator.cc",
"tpm_command_utils.cc",
]
libs = []
configs += [ ":target_defaults" ]
pkg_deps = [ "libminijail" ]
deps = [ ":tpm_executor_version_library" ]
if (use.tpm) {
sources += [ "tpm_executor_tpm1_impl.cc" ]
libs += [ "tpms" ]
}
if (use.tpm2) {
sources += [ "tpm_executor_tpm2_impl.cc" ]
libs += [ "tpm2" ]
}
}
executable("tpm2-simulator-init") {
sources = [ "simulator-init.cc" ]
configs += [ ":target_defaults" ]
pkg_deps = [ "vboot_host" ]
}
executable("tpm2-simulator-stop") {
sources = [ "simulator-stop.cc" ]
configs += [ ":target_defaults" ]
pkg_deps = [ "vboot_host" ]
}