-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.gn
87 lines (78 loc) · 1.72 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# 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")
group("all") {
deps = [ ":libhwsec" ]
deps += [ ":libhwsec_test" ]
if (use.test) {
deps += [ ":hwsec_testrunner" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome",
"openssl",
]
defines = [ "USE_TPM2=${use.tpm2}" ]
}
static_library("overalls_library") {
configs += [
":target_defaults",
"//common-mk:pic",
]
sources = [
"overalls/overalls_api.cc",
"overalls/overalls_singleton.cc",
]
}
static_library("libhwsec_test") {
configs += [
":target_defaults",
"//common-mk:nouse_thin_archive",
]
configs -= [ "//common-mk:use_thin_archive" ]
sources = []
if (!use.tpm2) {
sources += [ "test_utils/tpm1/test_fixture.cc" ]
}
}
config("libhwsec_tpm1_config") {
libs = [ "tspi" ]
}
shared_library("libhwsec") {
configs += [ ":target_defaults" ]
sources = [ "crypto_utility.cc" ]
if (!use.tpm2) {
deps = [ ":overalls_library" ]
all_dependent_configs = [ ":libhwsec_tpm1_config" ]
}
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("hwsec_testrunner") {
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
sources = [
"crypto_utility_test.cc",
"task_dispatching_framework_test.cc",
]
deps = [
":libhwsec",
":libhwsec_test",
"//common-mk/testrunner",
]
if (!use.tpm2) {
sources += [
"overalls/overalls_api_test.cc",
"overalls/overalls_singleton_test.cc",
]
}
}
}