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 | |
| 15 | cc_defaults { |
| 16 | name: "applypatch_defaults", |
| 17 | |
| 18 | cflags: [ |
| 19 | "-D_FILE_OFFSET_BITS=64", |
| 20 | "-DZLIB_CONST", |
| 21 | "-Wall", |
| 22 | "-Werror", |
| 23 | ], |
| 24 | |
| 25 | local_include_dirs: [ |
| 26 | "include", |
| 27 | ], |
| 28 | } |
| 29 | |
| 30 | cc_library_static { |
| 31 | name: "libapplypatch", |
| 32 | |
Tianjie Xu | e40c80d | 2018-02-03 17:20:56 -0800 | [diff] [blame] | 33 | host_supported: true, |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 34 | vendor_available: true, |
Tianjie Xu | e40c80d | 2018-02-03 17:20:56 -0800 | [diff] [blame] | 35 | |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 36 | defaults: [ |
| 37 | "applypatch_defaults", |
| 38 | ], |
| 39 | |
| 40 | srcs: [ |
| 41 | "applypatch.cpp", |
| 42 | "bspatch.cpp", |
| 43 | "freecache.cpp", |
| 44 | "imgpatch.cpp", |
| 45 | ], |
| 46 | |
| 47 | export_include_dirs: [ |
| 48 | "include", |
| 49 | ], |
| 50 | |
| 51 | static_libs: [ |
| 52 | "libbase", |
| 53 | "libbspatch", |
| 54 | "libbz", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 55 | "libedify", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 56 | "libotautil", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 57 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 58 | ], |
Tianjie Xu | 7a4dacf | 2018-02-17 21:58:54 -0800 | [diff] [blame] | 59 | |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 60 | shared_libs: [ |
| 61 | "libcrypto", |
| 62 | ], |
| 63 | |
Tianjie Xu | 7a4dacf | 2018-02-17 21:58:54 -0800 | [diff] [blame] | 64 | target: { |
| 65 | darwin: { |
| 66 | enabled: false, |
| 67 | }, |
| 68 | }, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | cc_library_static { |
| 72 | name: "libapplypatch_modes", |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 73 | vendor_available: true, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 74 | |
| 75 | defaults: [ |
| 76 | "applypatch_defaults", |
| 77 | ], |
| 78 | |
| 79 | srcs: [ |
| 80 | "applypatch_modes.cpp", |
| 81 | ], |
| 82 | |
| 83 | static_libs: [ |
| 84 | "libapplypatch", |
| 85 | "libbase", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 86 | "libedify", |
| 87 | "libotautil", |
| 88 | ], |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 89 | |
| 90 | shared_libs: [ |
| 91 | "libcrypto", |
| 92 | ], |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | cc_binary { |
| 96 | name: "applypatch", |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 97 | vendor: true, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 98 | |
| 99 | defaults: [ |
| 100 | "applypatch_defaults", |
| 101 | ], |
| 102 | |
| 103 | srcs: [ |
| 104 | "applypatch_main.cpp", |
| 105 | ], |
| 106 | |
| 107 | static_libs: [ |
| 108 | "libapplypatch_modes", |
| 109 | "libapplypatch", |
| 110 | "libedify", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 111 | "libotautil", |
Tao Bao | 71c35b9 | 2019-09-23 08:58:44 -0700 | [diff] [blame] | 112 | |
| 113 | // External dependencies. |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 114 | "libbspatch", |
Tao Bao | 71c35b9 | 2019-09-23 08:58:44 -0700 | [diff] [blame] | 115 | "libbrotli", |
| 116 | "libbz", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 117 | ], |
| 118 | |
| 119 | shared_libs: [ |
| 120 | "libbase", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 121 | "libcrypto", |
| 122 | "liblog", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 123 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 124 | "libziparchive", |
| 125 | ], |
Bill Peckham | 341644d | 2019-09-17 17:11:50 -0700 | [diff] [blame] | 126 | |
| 127 | init_rc: [ |
| 128 | "vendor_flash_recovery.rc", |
| 129 | ], |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 130 | } |
| 131 | |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 132 | cc_library_static { |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 133 | name: "libimgdiff", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 134 | host_supported: true, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 135 | defaults: [ |
| 136 | "applypatch_defaults", |
| 137 | ], |
| 138 | |
| 139 | srcs: [ |
| 140 | "imgdiff.cpp", |
| 141 | ], |
| 142 | |
| 143 | export_include_dirs: [ |
| 144 | "include", |
| 145 | ], |
| 146 | |
| 147 | static_libs: [ |
| 148 | "libbase", |
| 149 | "libbsdiff", |
| 150 | "libdivsufsort", |
| 151 | "libdivsufsort64", |
| 152 | "liblog", |
| 153 | "libotautil", |
| 154 | "libutils", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 155 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 156 | "libziparchive", |
| 157 | ], |
| 158 | } |
| 159 | |
| 160 | cc_binary_host { |
| 161 | name: "imgdiff", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 162 | srcs: [ |
| 163 | "imgdiff_main.cpp", |
| 164 | ], |
| 165 | |
| 166 | defaults: [ |
| 167 | "applypatch_defaults", |
| 168 | ], |
| 169 | |
| 170 | static_libs: [ |
| 171 | "libimgdiff", |
Tao Bao | 4568582 | 2017-10-13 14:54:12 -0700 | [diff] [blame] | 172 | "libotautil", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 173 | "libbsdiff", |
| 174 | "libdivsufsort", |
| 175 | "libdivsufsort64", |
| 176 | "libziparchive", |
| 177 | "libbase", |
| 178 | "libutils", |
| 179 | "liblog", |
Tianjie Xu | 8c28081 | 2017-10-28 22:13:16 -0700 | [diff] [blame] | 180 | "libbrotli", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 181 | "libbz", |
Kelvin Zhang | 2f2749f | 2021-01-12 14:42:56 -0500 | [diff] [blame] | 182 | "libz_stable", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 183 | ], |
| 184 | } |