Dan Willemsen | 45f0524 | 2016-07-12 22:10:56 -0700 | [diff] [blame] | 1 | // Copyright 2010 The Android Open Source Project |
| 2 | |
| 3 | cc_defaults { |
| 4 | name: "libsparse_defaults", |
| 5 | srcs: [ |
| 6 | "backed_block.c", |
| 7 | "output_file.c", |
| 8 | "sparse.c", |
| 9 | "sparse_crc32.c", |
| 10 | "sparse_err.c", |
| 11 | "sparse_read.c", |
| 12 | ], |
| 13 | cflags: ["-Werror"], |
| 14 | local_include_dirs: ["include"], |
| 15 | export_include_dirs: ["include"], |
| 16 | } |
| 17 | |
| 18 | cc_library_host_static { |
| 19 | name: "libsparse_host", |
| 20 | defaults: ["libsparse_defaults"], |
| 21 | static_libs: ["libz"], |
| 22 | target: { |
| 23 | windows: { |
| 24 | enabled: true, |
| 25 | }, |
| 26 | }, |
| 27 | } |
| 28 | |
| 29 | cc_library_shared { |
| 30 | name: "libsparse", |
| 31 | defaults: ["libsparse_defaults"], |
| 32 | shared_libs: ["libz"], |
| 33 | } |
| 34 | |
| 35 | cc_library_static { |
| 36 | name: "libsparse_static", |
| 37 | host_supported: true, |
| 38 | defaults: ["libsparse_defaults"], |
| 39 | static_libs: ["libz"], |
| 40 | } |
| 41 | |
| 42 | cc_binary { |
| 43 | name: "simg2img", |
| 44 | host_supported: true, |
| 45 | srcs: [ |
| 46 | "simg2img.c", |
| 47 | "sparse_crc32.c", |
| 48 | ], |
| 49 | static_libs: [ |
| 50 | "libsparse_static", |
| 51 | "libz", |
| 52 | ], |
| 53 | |
| 54 | cflags: ["-Werror"], |
| 55 | } |
| 56 | |
| 57 | cc_binary { |
| 58 | name: "img2simg", |
| 59 | host_supported: true, |
| 60 | srcs: ["img2simg.c"], |
| 61 | static_libs: [ |
| 62 | "libsparse_static", |
| 63 | "libz", |
| 64 | ], |
| 65 | |
| 66 | cflags: ["-Werror"], |
| 67 | } |
| 68 | |
| 69 | cc_binary_host { |
| 70 | name: "append2simg", |
| 71 | srcs: ["append2simg.c"], |
| 72 | static_libs: [ |
| 73 | "libsparse_static", |
| 74 | "libz", |
| 75 | ], |
| 76 | |
| 77 | cflags: ["-Werror"], |
| 78 | } |