Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 1 | // Copyright 2010 The Android Open Source Project |
| 2 | |
Alex Deymo | b0c3959 | 2017-01-11 14:37:50 -0800 | [diff] [blame] | 3 | cc_library { |
| 4 | name: "libsparse", |
| 5 | host_supported: true, |
Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 6 | recovery_available: true, |
Alex Deymo | b0c3959 | 2017-01-11 14:37:50 -0800 | [diff] [blame] | 7 | unique_host_soname: true, |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 8 | srcs: [ |
Jerry Zhang | 5a75507 | 2018-06-12 16:18:53 -0700 | [diff] [blame] | 9 | "backed_block.cpp", |
| 10 | "output_file.cpp", |
| 11 | "sparse.cpp", |
| 12 | "sparse_crc32.cpp", |
| 13 | "sparse_err.cpp", |
Chris Fries | a7eeb22 | 2017-04-17 21:53:16 -0500 | [diff] [blame] | 14 | "sparse_read.cpp", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 15 | ], |
| 16 | cflags: ["-Werror"], |
| 17 | local_include_dirs: ["include"], |
| 18 | export_include_dirs: ["include"], |
Dan Willemsen | 5cfa006 | 2017-09-27 16:24:45 -0700 | [diff] [blame] | 19 | shared_libs: [ |
| 20 | "libz", |
| 21 | "libbase", |
| 22 | ], |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 23 | target: { |
| 24 | windows: { |
| 25 | enabled: true, |
| 26 | }, |
| 27 | }, |
| 28 | } |
| 29 | |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 30 | cc_binary { |
| 31 | name: "simg2img", |
| 32 | host_supported: true, |
| 33 | srcs: [ |
Jerry Zhang | 5a75507 | 2018-06-12 16:18:53 -0700 | [diff] [blame] | 34 | "simg2img.cpp", |
| 35 | "sparse_crc32.cpp", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 36 | ], |
| 37 | static_libs: [ |
Alex Deymo | b0c3959 | 2017-01-11 14:37:50 -0800 | [diff] [blame] | 38 | "libsparse", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 39 | "libz", |
Chris Fries | a7eeb22 | 2017-04-17 21:53:16 -0500 | [diff] [blame] | 40 | "libbase", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 41 | ], |
| 42 | |
| 43 | cflags: ["-Werror"], |
| 44 | } |
| 45 | |
| 46 | cc_binary { |
| 47 | name: "img2simg", |
| 48 | host_supported: true, |
Jerry Zhang | 5a75507 | 2018-06-12 16:18:53 -0700 | [diff] [blame] | 49 | srcs: ["img2simg.cpp"], |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 50 | static_libs: [ |
Alex Deymo | b0c3959 | 2017-01-11 14:37:50 -0800 | [diff] [blame] | 51 | "libsparse", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 52 | "libz", |
Chris Fries | a7eeb22 | 2017-04-17 21:53:16 -0500 | [diff] [blame] | 53 | "libbase", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 54 | ], |
| 55 | |
| 56 | cflags: ["-Werror"], |
| 57 | } |
| 58 | |
| 59 | cc_binary_host { |
| 60 | name: "append2simg", |
Jerry Zhang | 5a75507 | 2018-06-12 16:18:53 -0700 | [diff] [blame] | 61 | srcs: ["append2simg.cpp"], |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 62 | static_libs: [ |
Alex Deymo | b0c3959 | 2017-01-11 14:37:50 -0800 | [diff] [blame] | 63 | "libsparse", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 64 | "libz", |
Chris Fries | a7eeb22 | 2017-04-17 21:53:16 -0500 | [diff] [blame] | 65 | "libbase", |
Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 66 | ], |
| 67 | |
| 68 | cflags: ["-Werror"], |
| 69 | } |
Sasha Smundak | 3a62fc4 | 2019-01-24 21:16:39 -0800 | [diff] [blame] | 70 | |
| 71 | python_binary_host { |
| 72 | name: "simg_dump.py", |
| 73 | main: "simg_dump.py", |
| 74 | srcs: ["simg_dump.py"], |
| 75 | version: { |
| 76 | py2: { |
| 77 | embedded_launcher: true, |
| 78 | enabled: true, |
| 79 | }, |
| 80 | py3: { |
| 81 | enabled: false, |
| 82 | }, |
| 83 | }, |
| 84 | } |
hamzeh | d17dc6a | 2019-09-25 11:00:31 -0700 | [diff] [blame] | 85 | |
| 86 | cc_fuzz { |
| 87 | name: "sparse_fuzzer", |
| 88 | host_supported: false, |
| 89 | srcs: [ |
| 90 | "sparse_fuzzer.cpp", |
| 91 | ], |
| 92 | static_libs: [ |
| 93 | "libsparse", |
| 94 | "liblog", |
| 95 | ], |
| 96 | } |