blob: d7abc42f6af1e703971179d636385f1684e1ff66 [file] [log] [blame]
Bob Badourbf2255d2021-02-12 16:31:32 -08001package {
2 default_applicable_licenses: ["external_fsverity-utils_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20 name: "external_fsverity-utils_license",
21 visibility: [":__subpackages__"],
22 license_kinds: [
23 "SPDX-license-identifier-GPL-2.0",
24 "SPDX-license-identifier-MIT",
25 ],
26 license_text: [
27 "LICENSE",
28 ],
29}
30
Martijn Coenenb59c9042020-09-23 11:45:03 +020031cc_defaults {
32 name: "fsverity_default_flags",
33
Victor Hsiehbb1cf282018-10-03 09:32:35 -070034 cflags: [
35 "-Wall",
36 "-Wno-pointer-arith",
Haibo Huang6cc33252021-01-19 20:02:16 -080037 "-D_GNU_SOURCE",
38 "-D_FILE_OFFSET_BITS=64",
Victor Hsiehbb1cf282018-10-03 09:32:35 -070039 ],
Martijn Coenenb59c9042020-09-23 11:45:03 +020040}
41
42cc_binary {
43 name: "fsverity",
44 defaults: [
45 "fsverity_default_flags",
46 ],
47 host_supported: true,
48 shared_libs: ["libfsverity"],
Eric Biggers7b8d3d52020-06-15 09:12:02 -070049 srcs: [
Eric Biggers7b8d3d52020-06-15 09:12:02 -070050 "programs/cmd_*.c",
51 "programs/fsverity.c",
52 "programs/utils.c",
53 ],
Victor Hsiehbb1cf282018-10-03 09:32:35 -070054}
Martijn Coenenb59c9042020-09-23 11:45:03 +020055
56cc_library {
57 name: "libfsverity",
58 defaults: [
59 "fsverity_default_flags",
60 ],
61 host_supported: true,
62 shared_libs: ["libcrypto"],
63
64 export_include_dirs: ["include"],
65
Alan Stokesdaf3d3f2021-07-06 17:46:12 +010066 apex_available: [
67 "//apex_available:platform",
68 "com.android.compos",
69 ],
Jeff Vander Stoep0051d4e2021-11-30 05:25:30 +010070 recovery_available: true,
Alan Stokesdaf3d3f2021-07-06 17:46:12 +010071
Martijn Coenenb59c9042020-09-23 11:45:03 +020072 srcs: [
73 "lib/*.c",
74 ],
75}