blob: 5b6ce41989d885102fe644c2d55bb370a28a5b05 [file] [log] [blame]
Dan Willemsen45f05242016-07-12 22:10:56 -07001// Copyright 2010 The Android Open Source Project
2
Alex Deymob0c39592017-01-11 14:37:50 -08003cc_library {
4 name: "libsparse",
5 host_supported: true,
Yifan Hong7dd45532020-01-21 18:17:19 -08006 ramdisk_available: true,
Yifan Honge85233c2020-11-18 20:22:47 -08007 vendor_ramdisk_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +09008 recovery_available: true,
Alex Deymob0c39592017-01-11 14:37:50 -08009 unique_host_soname: true,
Alistair Delva9e28cd32020-09-03 08:43:43 -070010 vendor_available: true,
Dan Willemsen45f05242016-07-12 22:10:56 -070011 srcs: [
Jerry Zhang5a755072018-06-12 16:18:53 -070012 "backed_block.cpp",
13 "output_file.cpp",
14 "sparse.cpp",
15 "sparse_crc32.cpp",
16 "sparse_err.cpp",
Chris Friesa7eeb222017-04-17 21:53:16 -050017 "sparse_read.cpp",
Dan Willemsen45f05242016-07-12 22:10:56 -070018 ],
19 cflags: ["-Werror"],
20 local_include_dirs: ["include"],
21 export_include_dirs: ["include"],
Dan Willemsen5cfa0062017-09-27 16:24:45 -070022 shared_libs: [
23 "libz",
24 "libbase",
25 ],
Dan Willemsen45f05242016-07-12 22:10:56 -070026 target: {
27 windows: {
28 enabled: true,
29 },
30 },
Jiyong Park3ed3d4c2021-01-05 14:46:01 +090031 apex_available: [
32 "//apex_available:platform",
33 "com.android.virt",
34 ],
Dan Willemsen45f05242016-07-12 22:10:56 -070035}
36
Dan Willemsen45f05242016-07-12 22:10:56 -070037cc_binary {
38 name: "simg2img",
39 host_supported: true,
40 srcs: [
Jerry Zhang5a755072018-06-12 16:18:53 -070041 "simg2img.cpp",
42 "sparse_crc32.cpp",
Dan Willemsen45f05242016-07-12 22:10:56 -070043 ],
44 static_libs: [
Alex Deymob0c39592017-01-11 14:37:50 -080045 "libsparse",
Dan Willemsen45f05242016-07-12 22:10:56 -070046 "libz",
Chris Friesa7eeb222017-04-17 21:53:16 -050047 "libbase",
Dan Willemsen45f05242016-07-12 22:10:56 -070048 ],
49
50 cflags: ["-Werror"],
51}
52
53cc_binary {
54 name: "img2simg",
55 host_supported: true,
Jerry Zhang5a755072018-06-12 16:18:53 -070056 srcs: ["img2simg.cpp"],
Dan Willemsen45f05242016-07-12 22:10:56 -070057 static_libs: [
Alex Deymob0c39592017-01-11 14:37:50 -080058 "libsparse",
Dan Willemsen45f05242016-07-12 22:10:56 -070059 "libz",
Chris Friesa7eeb222017-04-17 21:53:16 -050060 "libbase",
Dan Willemsen45f05242016-07-12 22:10:56 -070061 ],
62
63 cflags: ["-Werror"],
64}
65
66cc_binary_host {
67 name: "append2simg",
Jerry Zhang5a755072018-06-12 16:18:53 -070068 srcs: ["append2simg.cpp"],
Dan Willemsen45f05242016-07-12 22:10:56 -070069 static_libs: [
Alex Deymob0c39592017-01-11 14:37:50 -080070 "libsparse",
Dan Willemsen45f05242016-07-12 22:10:56 -070071 "libz",
Chris Friesa7eeb222017-04-17 21:53:16 -050072 "libbase",
Dan Willemsen45f05242016-07-12 22:10:56 -070073 ],
74
75 cflags: ["-Werror"],
76}
Sasha Smundak3a62fc42019-01-24 21:16:39 -080077
78python_binary_host {
79 name: "simg_dump.py",
80 main: "simg_dump.py",
81 srcs: ["simg_dump.py"],
82 version: {
83 py2: {
84 embedded_launcher: true,
85 enabled: true,
86 },
87 py3: {
88 enabled: false,
89 },
90 },
91}
hamzehd17dc6a2019-09-25 11:00:31 -070092
93cc_fuzz {
94 name: "sparse_fuzzer",
95 host_supported: false,
96 srcs: [
97 "sparse_fuzzer.cpp",
98 ],
99 static_libs: [
100 "libsparse",
101 "liblog",
102 ],
103}