Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 1 | // Copyright (C) 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 29be3f6 | 2021-02-12 18:00:57 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["bootable_recovery_applypatch_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 22 | name: "bootable_recovery_applypatch_license", |
| 23 | visibility: [":__subpackages__"], |
| 24 | license_kinds: [ |
| 25 | "SPDX-license-identifier-Apache-2.0", |
| 26 | ], |
| 27 | license_text: [ |
| 28 | "NOTICE", |
| 29 | ], |
| 30 | } |
| 31 | |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 32 | cc_defaults { |
| 33 | name: "applypatch_defaults", |
| 34 | |
| 35 | cflags: [ |
| 36 | "-D_FILE_OFFSET_BITS=64", |
| 37 | "-DZLIB_CONST", |
| 38 | "-Wall", |
| 39 | "-Werror", |
| 40 | ], |
| 41 | |
| 42 | local_include_dirs: [ |
| 43 | "include", |
| 44 | ], |
| 45 | } |
| 46 | |
| 47 | cc_library_static { |
| 48 | name: "libapplypatch", |
| 49 | |
Tianjie Xu | e40c80d | 2018-02-03 17:20:56 -0800 | [diff] [blame] | 50 | host_supported: true, |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 51 | vendor_available: true, |
Tianjie Xu | e40c80d | 2018-02-03 17:20:56 -0800 | [diff] [blame] | 52 | |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 53 | defaults: [ |
| 54 | "applypatch_defaults", |
| 55 | ], |
| 56 | |
| 57 | srcs: [ |
| 58 | "applypatch.cpp", |
| 59 | "bspatch.cpp", |
| 60 | "freecache.cpp", |
| 61 | "imgpatch.cpp", |
| 62 | ], |
| 63 | |
| 64 | export_include_dirs: [ |
| 65 | "include", |
| 66 | ], |
| 67 | |
| 68 | static_libs: [ |
| 69 | "libbase", |
| 70 | "libbspatch", |
| 71 | "libbz", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 72 | "libedify", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 73 | "libotautil", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 74 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 75 | ], |
Tianjie Xu | 7a4dacf | 2018-02-17 21:58:54 -0800 | [diff] [blame] | 76 | |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 77 | shared_libs: [ |
| 78 | "libcrypto", |
| 79 | ], |
| 80 | |
Tianjie Xu | 7a4dacf | 2018-02-17 21:58:54 -0800 | [diff] [blame] | 81 | target: { |
| 82 | darwin: { |
| 83 | enabled: false, |
| 84 | }, |
| 85 | }, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | cc_library_static { |
| 89 | name: "libapplypatch_modes", |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 90 | vendor_available: true, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 91 | |
| 92 | defaults: [ |
| 93 | "applypatch_defaults", |
| 94 | ], |
| 95 | |
| 96 | srcs: [ |
| 97 | "applypatch_modes.cpp", |
| 98 | ], |
| 99 | |
| 100 | static_libs: [ |
| 101 | "libapplypatch", |
| 102 | "libbase", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 103 | "libedify", |
| 104 | "libotautil", |
| 105 | ], |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 106 | |
| 107 | shared_libs: [ |
| 108 | "libcrypto", |
| 109 | ], |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | cc_binary { |
| 113 | name: "applypatch", |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 114 | vendor: true, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 115 | |
| 116 | defaults: [ |
| 117 | "applypatch_defaults", |
| 118 | ], |
| 119 | |
| 120 | srcs: [ |
| 121 | "applypatch_main.cpp", |
| 122 | ], |
| 123 | |
| 124 | static_libs: [ |
| 125 | "libapplypatch_modes", |
| 126 | "libapplypatch", |
| 127 | "libedify", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 128 | "libotautil", |
Tao Bao | 71c35b9 | 2019-09-23 08:58:44 -0700 | [diff] [blame] | 129 | |
| 130 | // External dependencies. |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 131 | "libbspatch", |
Tao Bao | 71c35b9 | 2019-09-23 08:58:44 -0700 | [diff] [blame] | 132 | "libbrotli", |
| 133 | "libbz", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 134 | ], |
| 135 | |
| 136 | shared_libs: [ |
| 137 | "libbase", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 138 | "libcrypto", |
| 139 | "liblog", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 140 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 141 | "libziparchive", |
| 142 | ], |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 143 | |
| 144 | init_rc: [ |
| 145 | "vendor_flash_recovery.rc", |
| 146 | ], |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 147 | } |
| 148 | |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 149 | cc_library_static { |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 150 | name: "libimgdiff", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 151 | host_supported: true, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 152 | defaults: [ |
| 153 | "applypatch_defaults", |
| 154 | ], |
| 155 | |
| 156 | srcs: [ |
| 157 | "imgdiff.cpp", |
| 158 | ], |
| 159 | |
| 160 | export_include_dirs: [ |
| 161 | "include", |
| 162 | ], |
| 163 | |
| 164 | static_libs: [ |
| 165 | "libbase", |
| 166 | "libbsdiff", |
| 167 | "libdivsufsort", |
| 168 | "libdivsufsort64", |
| 169 | "liblog", |
| 170 | "libotautil", |
| 171 | "libutils", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 172 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 173 | "libziparchive", |
| 174 | ], |
| 175 | } |
| 176 | |
| 177 | cc_binary_host { |
| 178 | name: "imgdiff", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 179 | srcs: [ |
| 180 | "imgdiff_main.cpp", |
| 181 | ], |
| 182 | |
| 183 | defaults: [ |
| 184 | "applypatch_defaults", |
| 185 | ], |
| 186 | |
| 187 | static_libs: [ |
| 188 | "libimgdiff", |
Tao Bao | 4568582 | 2017-10-13 14:54:12 -0700 | [diff] [blame] | 189 | "libotautil", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 190 | "libbsdiff", |
| 191 | "libdivsufsort", |
| 192 | "libdivsufsort64", |
| 193 | "libziparchive", |
| 194 | "libbase", |
| 195 | "libutils", |
| 196 | "liblog", |
Tianjie Xu | 8c28081 | 2017-10-28 22:13:16 -0700 | [diff] [blame] | 197 | "libbrotli", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 198 | "libbz", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 199 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 200 | ], |
| 201 | } |