Bob Badour | 26a133b | 2021-08-18 20:47:02 -0700 | [diff] [blame] | 1 | |
| 2 | package { |
| 3 | default_applicable_licenses: ["external_zucchini_license"], |
| 4 | } |
| 5 | |
| 6 | // Added automatically by a large-scale-change |
| 7 | // See: http://go/android-license-faq |
| 8 | license { |
| 9 | name: "external_zucchini_license", |
| 10 | visibility: [":__subpackages__"], |
| 11 | license_kinds: [ |
| 12 | "legacy_notice", |
| 13 | ], |
| 14 | license_text: [ |
| 15 | "LICENSE", |
| 16 | ], |
| 17 | } |
| 18 | |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 19 | filegroup { |
| 20 | name: "libzucchini_srcs", |
| 21 | |
| 22 | srcs: [ |
| 23 | "abs32_utils.cc", |
| 24 | "address_translator.cc", |
| 25 | "arm_utils.cc", |
| 26 | "binary_data_histogram.cc", |
| 27 | "buffer_sink.cc", |
| 28 | "buffer_source.cc", |
| 29 | "crc32.cc", |
| 30 | "disassembler.cc", |
| 31 | "disassembler_dex.cc", |
| 32 | "disassembler_elf.cc", |
| 33 | "disassembler_no_op.cc", |
| 34 | "disassembler_win32.cc", |
| 35 | "disassembler_ztf.cc", |
| 36 | "element_detection.cc", |
| 37 | "encoded_view.cc", |
| 38 | "ensemble_matcher.cc", |
| 39 | "equivalence_map.cc", |
| 40 | "heuristic_ensemble_matcher.cc", |
| 41 | "image_index.cc", |
| 42 | "imposed_ensemble_matcher.cc", |
| 43 | "io_utils.cc", |
Kelvin Zhang | 539c01b | 2021-08-19 10:52:34 -0700 | [diff] [blame] | 44 | "mapped_file.cc", |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 45 | "patch_reader.cc", |
| 46 | "patch_writer.cc", |
| 47 | "reference_bytes_mixer.cc", |
| 48 | "reference_set.cc", |
| 49 | "rel32_finder.cc", |
| 50 | "rel32_utils.cc", |
| 51 | "reloc_elf.cc", |
| 52 | "reloc_win32.cc", |
| 53 | "target_pool.cc", |
| 54 | "targets_affinity.cc", |
| 55 | "zucchini_apply.cc", |
| 56 | "zucchini_gen.cc", |
| 57 | "zucchini_tools.cc", |
| 58 | ], |
| 59 | } |
| 60 | |
| 61 | filegroup { |
Kelvin Zhang | 539c01b | 2021-08-19 10:52:34 -0700 | [diff] [blame] | 62 | name: "zucchini_srcs", |
| 63 | srcs: [ |
| 64 | "main_utils.cc", |
| 65 | "zucchini_commands.cc", |
| 66 | "zucchini_integration.cc", |
| 67 | "zucchini_main_aosp.cc", |
| 68 | ], |
| 69 | } |
| 70 | |
| 71 | filegroup { |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 72 | name: "libzucchini_headers", |
| 73 | srcs: [ |
| 74 | "abs32_utils.h", |
| 75 | "address_translator.h", |
| 76 | "algorithm.h", |
| 77 | "arm_utils.h", |
| 78 | "binary_data_histogram.h", |
| 79 | "buffer_sink.h", |
| 80 | "buffer_source.h", |
| 81 | "buffer_view.h", |
| 82 | "crc32.h", |
| 83 | "disassembler.h", |
| 84 | "disassembler_dex.h", |
| 85 | "disassembler_elf.h", |
| 86 | "disassembler_no_op.h", |
| 87 | "disassembler_win32.h", |
| 88 | "disassembler_ztf.h", |
| 89 | "element_detection.h", |
| 90 | "encoded_view.h", |
| 91 | "ensemble_matcher.h", |
| 92 | "equivalence_map.h", |
| 93 | "heuristic_ensemble_matcher.h", |
| 94 | "image_index.h", |
| 95 | "image_utils.h", |
| 96 | "imposed_ensemble_matcher.h", |
| 97 | "io_utils.h", |
| 98 | "main_utils.h", |
| 99 | "mapped_file.h", |
| 100 | "patch_reader.h", |
| 101 | "patch_utils.h", |
| 102 | "patch_writer.h", |
| 103 | "reference_bytes_mixer.h", |
| 104 | "reference_set.h", |
| 105 | "rel32_finder.h", |
| 106 | "rel32_utils.h", |
| 107 | "reloc_elf.h", |
| 108 | "reloc_win32.h", |
| 109 | "suffix_array.h", |
| 110 | "target_pool.h", |
| 111 | "targets_affinity.h", |
| 112 | "test_disassembler.h", |
| 113 | "test_reference_reader.h", |
| 114 | "test_utils.h", |
| 115 | "type_dex.h", |
| 116 | "type_elf.h", |
| 117 | "type_win_pe.h", |
| 118 | "type_ztf.h", |
| 119 | "typed_value.h", |
| 120 | "zucchini.h", |
| 121 | "zucchini_apply.h", |
| 122 | "zucchini_commands.h", |
| 123 | "zucchini_gen.h", |
| 124 | "zucchini_integration.h", |
| 125 | "zucchini_tools.h", |
| 126 | ], |
| 127 | } |
| 128 | |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 129 | cc_library { |
| 130 | name: "libzucchini", |
| 131 | host_supported: true, |
Kelvin Zhang | 2af699e | 2021-08-19 16:46:44 -0700 | [diff] [blame] | 132 | device_supported: true, |
| 133 | recovery_available: true, |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 134 | // Need this to ensure that the generated headers are used, |
| 135 | // instead of loacl ones. As the generated headers contain |
| 136 | // incorrect include paths |
| 137 | include_build_directory: false, |
Kelvin Zhang | ddcf1d9 | 2021-08-19 11:09:15 -0700 | [diff] [blame] | 138 | srcs: [":libzucchini_srcs"], |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 139 | local_include_dirs: ["aosp/include"], |
Kelvin Zhang | 8d806d1 | 2021-08-19 16:55:56 -0700 | [diff] [blame] | 140 | export_include_dirs: [ |
| 141 | "aosp/include/components", |
| 142 | "aosp/include/", |
| 143 | ], |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 144 | static_libs: [ |
| 145 | "libchrome", |
| 146 | "libcutils", |
| 147 | ], |
| 148 | shared_libs: [ |
| 149 | "liblog", |
| 150 | "libbase", |
| 151 | ], |
| 152 | cflags: [ |
| 153 | "-Wno-unused-parameter", |
| 154 | ], |
Tianjie | d22306f | 2021-08-19 16:14:30 -0700 | [diff] [blame] | 155 | visibility: [ |
| 156 | "//external/puffin:__subpackages__", |
| 157 | "//system/update_engine:__subpackages__", |
| 158 | ], |
Kelvin Zhang | 011d854 | 2021-07-29 14:50:32 -0400 | [diff] [blame] | 159 | } |
Kelvin Zhang | 539c01b | 2021-08-19 10:52:34 -0700 | [diff] [blame] | 160 | |
| 161 | cc_binary { |
| 162 | name: "zucchini", |
| 163 | host_supported: true, |
| 164 | device_supported: true, |
| 165 | srcs: [":zucchini_srcs"], |
| 166 | include_build_directory: false, |
| 167 | local_include_dirs: ["aosp/include"], |
| 168 | static_libs: [ |
| 169 | "libchrome", |
| 170 | "libcutils", |
| 171 | "libzucchini", |
Kelvin Zhang | 539c01b | 2021-08-19 10:52:34 -0700 | [diff] [blame] | 172 | "liblog", |
| 173 | "libbase", |
| 174 | ], |
| 175 | cflags: [ |
| 176 | "-Wno-unused-parameter", |
| 177 | ], |
| 178 | } |