blob: 302d8e40b9d7fb24ab6906430bb77e1a567eba59 [file] [log] [blame]
Alex Deymoe8ed6942017-01-11 16:54:52 -08001// Copyright 2015 The Android Open Source Project
2
Bob Badour4e060082021-02-16 18:59:28 -08003package {
4 default_applicable_licenses: ["system_extras_libfec_license"],
5}
6
7// Added automatically by a large-scale-change
8// See: http://go/android-license-faq
9license {
10 name: "system_extras_libfec_license",
11 visibility: [":__subpackages__"],
12 license_kinds: [
13 "SPDX-license-identifier-Apache-2.0",
14 ],
15 license_text: [
16 "NOTICE",
17 ],
18}
19
Tianjie Xu87d230b2020-03-06 12:30:18 -080020cc_defaults {
21 name: "libfec_default",
22
23 cflags: [
24 "-Wall",
25 "-Werror",
26 "-O3",
27 "-D_LARGEFILE64_SOURCE",
28 ],
29
Alex Deymoe8ed6942017-01-11 16:54:52 -080030 srcs: [
31 "fec_open.cpp",
32 "fec_read.cpp",
33 "fec_verity.cpp",
34 "fec_process.cpp",
35 ],
Tianjie Xu87d230b2020-03-06 12:30:18 -080036
Alex Deymoe8ed6942017-01-11 16:54:52 -080037 export_include_dirs: ["include"],
38 // Exported header include/fec/io.h includes crypto_utils headers.
Tao Bao3882cf72018-08-13 22:42:55 -070039 export_shared_lib_headers: ["libcrypto_utils"],
40
41 shared_libs: [
42 "libbase",
43 "libcrypto",
44 "libcrypto_utils",
45 "libcutils",
46 "libext4_utils",
47 "libsquashfs_utils",
48 ],
Alex Deymoe8ed6942017-01-11 16:54:52 -080049
50 static_libs: [
Alex Deymoe8ed6942017-01-11 16:54:52 -080051 "libfec_rs",
Alex Deymoe8ed6942017-01-11 16:54:52 -080052 ],
53
54 target: {
55 host: {
Tianjie Xu87d230b2020-03-06 12:30:18 -080056 cflags: [
57 "-D_GNU_SOURCE",
58 "-DFEC_NO_KLOG",
59 ],
Alex Deymoe8ed6942017-01-11 16:54:52 -080060 },
Colin Crossa2b046a2022-03-24 16:25:09 -070061 host_linux: {
Romain Guyc1386d32017-06-07 17:05:03 -070062 sanitize: {
63 misc_undefined: ["integer"],
64 },
65 },
Alex Deymoe8ed6942017-01-11 16:54:52 -080066 },
Alex Deymoe8ed6942017-01-11 16:54:52 -080067}
Tianjie Xu87d230b2020-03-06 12:30:18 -080068
69cc_library {
70 name: "libfec",
71 defaults: ["libfec_default"],
72 host_supported: true,
Inseob Kim4861cb12021-06-14 11:55:31 +090073 ramdisk_available: true,
David Andersoncd9bd902021-07-23 16:47:46 -070074 vendor_ramdisk_available: true,
Tianjie Xu87d230b2020-03-06 12:30:18 -080075 recovery_available: true,
76
77 target: {
78 linux: {
79 srcs: [
80 "avb_utils.cpp",
81 ],
82 static_libs: [
83 "libavb",
84 ],
85 },
86
87 // libavb isn't available on mac.
88 darwin: {
89 srcs: [
90 "avb_utils_stub.cpp",
91 ],
92 },
93 },
94}