blob: 02bfee68d39d866ae0d92771ece88998a76e0335 [file] [log] [blame]
Dan Willemsen45f05242016-07-12 22:10:56 -07001// Copyright 2010 The Android Open Source Project
2
Bob Badourd69ad692021-02-16 19:02:14 -08003package {
4 default_applicable_licenses: ["Android-Apache-2.0"],
5}
6
Alex Deymob0c39592017-01-11 14:37:50 -08007cc_library {
8 name: "libsparse",
9 host_supported: true,
Yifan Hong7dd45532020-01-21 18:17:19 -080010 ramdisk_available: true,
Yifan Honge85233c2020-11-18 20:22:47 -080011 vendor_ramdisk_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +090012 recovery_available: true,
Alex Deymob0c39592017-01-11 14:37:50 -080013 unique_host_soname: true,
Alistair Delva9e28cd32020-09-03 08:43:43 -070014 vendor_available: true,
Dan Willemsen45f05242016-07-12 22:10:56 -070015 srcs: [
Jerry Zhang5a755072018-06-12 16:18:53 -070016 "backed_block.cpp",
17 "output_file.cpp",
18 "sparse.cpp",
19 "sparse_crc32.cpp",
20 "sparse_err.cpp",
Chris Friesa7eeb222017-04-17 21:53:16 -050021 "sparse_read.cpp",
Dan Willemsen45f05242016-07-12 22:10:56 -070022 ],
23 cflags: ["-Werror"],
24 local_include_dirs: ["include"],
25 export_include_dirs: ["include"],
Dan Willemsen5cfa0062017-09-27 16:24:45 -070026 shared_libs: [
27 "libz",
28 "libbase",
29 ],
Dan Willemsen45f05242016-07-12 22:10:56 -070030 target: {
31 windows: {
32 enabled: true,
33 },
34 },
Jiyong Park3ed3d4c2021-01-05 14:46:01 +090035 apex_available: [
36 "//apex_available:platform",
37 "com.android.virt",
38 ],
Dan Willemsen45f05242016-07-12 22:10:56 -070039}
40
Dan Willemsen45f05242016-07-12 22:10:56 -070041cc_binary {
42 name: "simg2img",
43 host_supported: true,
44 srcs: [
Jerry Zhang5a755072018-06-12 16:18:53 -070045 "simg2img.cpp",
46 "sparse_crc32.cpp",
Dan Willemsen45f05242016-07-12 22:10:56 -070047 ],
48 static_libs: [
Alex Deymob0c39592017-01-11 14:37:50 -080049 "libsparse",
Dan Willemsen45f05242016-07-12 22:10:56 -070050 "libz",
Chris Friesa7eeb222017-04-17 21:53:16 -050051 "libbase",
Dan Willemsen45f05242016-07-12 22:10:56 -070052 ],
53
54 cflags: ["-Werror"],
55}
56
57cc_binary {
58 name: "img2simg",
59 host_supported: true,
Jerry Zhang5a755072018-06-12 16:18:53 -070060 srcs: ["img2simg.cpp"],
Dan Willemsen45f05242016-07-12 22:10:56 -070061 static_libs: [
Alex Deymob0c39592017-01-11 14:37:50 -080062 "libsparse",
Dan Willemsen45f05242016-07-12 22:10:56 -070063 "libz",
Chris Friesa7eeb222017-04-17 21:53:16 -050064 "libbase",
Dan Willemsen45f05242016-07-12 22:10:56 -070065 ],
66
67 cflags: ["-Werror"],
68}
69
70cc_binary_host {
71 name: "append2simg",
Jerry Zhang5a755072018-06-12 16:18:53 -070072 srcs: ["append2simg.cpp"],
Dan Willemsen45f05242016-07-12 22:10:56 -070073 static_libs: [
Alex Deymob0c39592017-01-11 14:37:50 -080074 "libsparse",
Dan Willemsen45f05242016-07-12 22:10:56 -070075 "libz",
Chris Friesa7eeb222017-04-17 21:53:16 -050076 "libbase",
Dan Willemsen45f05242016-07-12 22:10:56 -070077 ],
78
79 cflags: ["-Werror"],
80}
Sasha Smundak3a62fc42019-01-24 21:16:39 -080081
82python_binary_host {
83 name: "simg_dump.py",
84 main: "simg_dump.py",
85 srcs: ["simg_dump.py"],
86 version: {
87 py2: {
Elliott Hughes726a6a92021-08-17 15:02:00 -070088 enabled: false,
Sasha Smundak3a62fc42019-01-24 21:16:39 -080089 },
90 py3: {
Elliott Hughes726a6a92021-08-17 15:02:00 -070091 embedded_launcher: true,
92 enabled: true,
Sasha Smundak3a62fc42019-01-24 21:16:39 -080093 },
94 },
95}
hamzehd17dc6a2019-09-25 11:00:31 -070096
97cc_fuzz {
98 name: "sparse_fuzzer",
Keith Mok0cf395c2021-12-31 05:09:32 +000099 host_supported: true,
hamzehd17dc6a2019-09-25 11:00:31 -0700100 srcs: [
101 "sparse_fuzzer.cpp",
102 ],
103 static_libs: [
104 "libsparse",
Keith Mok0cf395c2021-12-31 05:09:32 +0000105 "libbase",
106 "libz",
hamzehd17dc6a2019-09-25 11:00:31 -0700107 "liblog",
108 ],
109}