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, |
| 34 | |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 35 | defaults: [ |
| 36 | "applypatch_defaults", |
| 37 | ], |
| 38 | |
| 39 | srcs: [ |
| 40 | "applypatch.cpp", |
| 41 | "bspatch.cpp", |
| 42 | "freecache.cpp", |
| 43 | "imgpatch.cpp", |
| 44 | ], |
| 45 | |
| 46 | export_include_dirs: [ |
| 47 | "include", |
| 48 | ], |
| 49 | |
| 50 | static_libs: [ |
| 51 | "libbase", |
| 52 | "libbspatch", |
| 53 | "libbz", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 54 | "libedify", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 55 | "libotautil", |
| 56 | "libz", |
| 57 | ], |
Tianjie Xu | 7a4dacf | 2018-02-17 21:58:54 -0800 | [diff] [blame] | 58 | |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 59 | shared_libs: [ |
| 60 | "libcrypto", |
| 61 | ], |
| 62 | |
Tianjie Xu | 7a4dacf | 2018-02-17 21:58:54 -0800 | [diff] [blame] | 63 | target: { |
| 64 | darwin: { |
| 65 | enabled: false, |
| 66 | }, |
| 67 | }, |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | cc_library_static { |
| 71 | name: "libapplypatch_modes", |
| 72 | |
| 73 | defaults: [ |
| 74 | "applypatch_defaults", |
| 75 | ], |
| 76 | |
| 77 | srcs: [ |
| 78 | "applypatch_modes.cpp", |
| 79 | ], |
| 80 | |
| 81 | static_libs: [ |
| 82 | "libapplypatch", |
| 83 | "libbase", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 84 | "libedify", |
| 85 | "libotautil", |
| 86 | ], |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 87 | |
| 88 | shared_libs: [ |
| 89 | "libcrypto", |
| 90 | ], |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | cc_binary { |
| 94 | name: "applypatch", |
| 95 | |
| 96 | defaults: [ |
| 97 | "applypatch_defaults", |
| 98 | ], |
| 99 | |
| 100 | srcs: [ |
| 101 | "applypatch_main.cpp", |
| 102 | ], |
| 103 | |
| 104 | static_libs: [ |
| 105 | "libapplypatch_modes", |
| 106 | "libapplypatch", |
| 107 | "libedify", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 108 | "libotautil", |
| 109 | "libbspatch", |
| 110 | ], |
| 111 | |
| 112 | shared_libs: [ |
| 113 | "libbase", |
Tianjie Xu | 3d84386 | 2017-11-03 15:52:22 -0700 | [diff] [blame] | 114 | "libbrotli", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 115 | "libbz", |
| 116 | "libcrypto", |
| 117 | "liblog", |
| 118 | "libz", |
| 119 | "libziparchive", |
| 120 | ], |
| 121 | } |
| 122 | |
Tianjie Xu | 42d7779 | 2019-06-28 11:04:07 -0700 | [diff] [blame] | 123 | cc_library_host_static { |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 124 | name: "libimgdiff", |
| 125 | |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 126 | defaults: [ |
| 127 | "applypatch_defaults", |
| 128 | ], |
| 129 | |
| 130 | srcs: [ |
| 131 | "imgdiff.cpp", |
| 132 | ], |
| 133 | |
| 134 | export_include_dirs: [ |
| 135 | "include", |
| 136 | ], |
| 137 | |
| 138 | static_libs: [ |
| 139 | "libbase", |
| 140 | "libbsdiff", |
| 141 | "libdivsufsort", |
| 142 | "libdivsufsort64", |
| 143 | "liblog", |
| 144 | "libotautil", |
| 145 | "libutils", |
| 146 | "libz", |
| 147 | "libziparchive", |
| 148 | ], |
| 149 | } |
| 150 | |
| 151 | cc_binary_host { |
| 152 | name: "imgdiff", |
| 153 | |
| 154 | srcs: [ |
| 155 | "imgdiff_main.cpp", |
| 156 | ], |
| 157 | |
| 158 | defaults: [ |
| 159 | "applypatch_defaults", |
| 160 | ], |
| 161 | |
| 162 | static_libs: [ |
| 163 | "libimgdiff", |
Tao Bao | 4568582 | 2017-10-13 14:54:12 -0700 | [diff] [blame] | 164 | "libotautil", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 165 | "libbsdiff", |
| 166 | "libdivsufsort", |
| 167 | "libdivsufsort64", |
| 168 | "libziparchive", |
| 169 | "libbase", |
| 170 | "libutils", |
| 171 | "liblog", |
Tianjie Xu | 8c28081 | 2017-10-28 22:13:16 -0700 | [diff] [blame] | 172 | "libbrotli", |
Tao Bao | 582b678 | 2017-10-05 09:06:21 -0700 | [diff] [blame] | 173 | "libbz", |
| 174 | "libz", |
| 175 | ], |
| 176 | } |