Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 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 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "bootable_recovery_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["bootable_recovery_license"], |
| 22 | } |
| 23 | |
Tao Bao | ef5e38f | 2018-07-24 15:34:39 -0700 | [diff] [blame] | 24 | cc_defaults { |
Dan Willemsen | 5a67841 | 2020-01-15 09:38:09 -0800 | [diff] [blame] | 25 | name: "libupdater_static_libs", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 26 | |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 27 | static_libs: [ |
| 28 | "libapplypatch", |
| 29 | "libbootloader_message", |
| 30 | "libbspatch", |
| 31 | "libedify", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 32 | "libotautil", |
| 33 | "libext4_utils", |
Yifan Hong | 8ff84d7 | 2018-12-19 16:21:55 -0800 | [diff] [blame] | 34 | "libdm", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 35 | "libfec", |
| 36 | "libfec_rs", |
Tianjie Xu | 2bb374a | 2019-11-22 13:46:19 -0800 | [diff] [blame] | 37 | "libavb", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 38 | "libverity_tree", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 39 | "liblog", |
Yifan Hong | 8ff84d7 | 2018-12-19 16:21:55 -0800 | [diff] [blame] | 40 | "liblp", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 41 | "libselinux", |
| 42 | "libsparse", |
| 43 | "libsquashfs_utils", |
| 44 | "libbrotli", |
| 45 | "libbz", |
| 46 | "libziparchive", |
| 47 | "libz", |
| 48 | "libbase", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 49 | "libcrypto_utils", |
| 50 | "libcutils", |
| 51 | "libutils", |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 52 | ], |
Elliott Hughes | a85d7a0 | 2021-04-20 11:58:05 -0700 | [diff] [blame] | 53 | header_libs: [ |
| 54 | "libgtest_prod_headers", |
| 55 | ], |
Dan Willemsen | 5a67841 | 2020-01-15 09:38:09 -0800 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | cc_defaults { |
| 59 | name: "libupdater_defaults", |
| 60 | |
| 61 | defaults: [ |
| 62 | "recovery_defaults", |
| 63 | "libupdater_static_libs", |
| 64 | ], |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 65 | |
| 66 | shared_libs: [ |
| 67 | "libcrypto", |
| 68 | ], |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | cc_defaults { |
| 72 | name: "libupdater_device_defaults", |
| 73 | |
| 74 | static_libs: [ |
| 75 | "libfs_mgr", |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 76 | "libtune2fs", |
| 77 | |
| 78 | "libext2_com_err", |
| 79 | "libext2_blkid", |
| 80 | "libext2_quota", |
| 81 | "libext2_uuid", |
| 82 | "libext2_e2p", |
| 83 | "libext2fs", |
Dan Willemsen | 5a67841 | 2020-01-15 09:38:09 -0800 | [diff] [blame] | 84 | ], |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 85 | } |
Tao Bao | ef5e38f | 2018-07-24 15:34:39 -0700 | [diff] [blame] | 86 | |
| 87 | cc_library_static { |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 88 | name: "libupdater_core", |
| 89 | |
| 90 | host_supported: true, |
Tao Bao | ef5e38f | 2018-07-24 15:34:39 -0700 | [diff] [blame] | 91 | |
| 92 | defaults: [ |
| 93 | "recovery_defaults", |
| 94 | "libupdater_defaults", |
| 95 | ], |
| 96 | |
| 97 | srcs: [ |
| 98 | "blockimg.cpp", |
| 99 | "commands.cpp", |
| 100 | "install.cpp", |
Tao Bao | d628cfc | 2019-10-01 12:08:33 -0700 | [diff] [blame] | 101 | "mounts.cpp", |
Tianjie Xu | 58d5912 | 2019-05-03 01:05:04 -0700 | [diff] [blame] | 102 | "updater.cpp", |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 103 | ], |
| 104 | |
Tianjie Xu | 76e165d | 2019-05-30 10:24:47 -0700 | [diff] [blame] | 105 | target: { |
| 106 | darwin: { |
| 107 | enabled: false, |
| 108 | }, |
| 109 | }, |
| 110 | |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 111 | export_include_dirs: [ |
| 112 | "include", |
| 113 | ], |
| 114 | } |
| 115 | |
| 116 | cc_library_static { |
| 117 | name: "libupdater_device", |
| 118 | |
| 119 | defaults: [ |
| 120 | "recovery_defaults", |
| 121 | "libupdater_defaults", |
| 122 | "libupdater_device_defaults", |
| 123 | ], |
| 124 | |
| 125 | srcs: [ |
| 126 | "dynamic_partitions.cpp", |
Tianjie Xu | 1536db8 | 2019-05-14 10:54:43 -0700 | [diff] [blame] | 127 | "updater_runtime.cpp", |
Tianjie Xu | d118833 | 2019-05-24 16:08:45 -0700 | [diff] [blame] | 128 | "updater_runtime_dynamic_partitions.cpp", |
Tao Bao | ef5e38f | 2018-07-24 15:34:39 -0700 | [diff] [blame] | 129 | ], |
| 130 | |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 131 | static_libs: [ |
| 132 | "libupdater_core", |
| 133 | ], |
| 134 | |
Tao Bao | ef5e38f | 2018-07-24 15:34:39 -0700 | [diff] [blame] | 135 | include_dirs: [ |
| 136 | "external/e2fsprogs/misc", |
| 137 | ], |
| 138 | |
| 139 | export_include_dirs: [ |
| 140 | "include", |
| 141 | ], |
| 142 | } |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 143 | |
| 144 | cc_library_host_static { |
| 145 | name: "libupdater_host", |
| 146 | |
| 147 | defaults: [ |
| 148 | "recovery_defaults", |
| 149 | "libupdater_defaults", |
| 150 | ], |
| 151 | |
| 152 | srcs: [ |
Tianjie Xu | 74b0f7c | 2019-05-22 13:59:57 -0700 | [diff] [blame] | 153 | "build_info.cpp", |
Tianjie Xu | d118833 | 2019-05-24 16:08:45 -0700 | [diff] [blame] | 154 | "dynamic_partitions.cpp", |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 155 | "simulator_runtime.cpp", |
| 156 | "target_files.cpp", |
| 157 | ], |
| 158 | |
| 159 | static_libs: [ |
| 160 | "libupdater_core", |
| 161 | "libfstab", |
Tianjie Xu | 74b0f7c | 2019-05-22 13:59:57 -0700 | [diff] [blame] | 162 | "libc++fs", |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 163 | ], |
| 164 | |
Tianjie Xu | 76e165d | 2019-05-30 10:24:47 -0700 | [diff] [blame] | 165 | target: { |
| 166 | darwin: { |
| 167 | enabled: false, |
| 168 | }, |
| 169 | }, |
| 170 | |
Tianjie Xu | c1a5e26 | 2019-05-22 14:34:12 -0700 | [diff] [blame] | 171 | export_include_dirs: [ |
| 172 | "include", |
| 173 | ], |
| 174 | } |
Dan Willemsen | 5a67841 | 2020-01-15 09:38:09 -0800 | [diff] [blame] | 175 | |
| 176 | cc_binary_host { |
| 177 | name: "update_host_simulator", |
| 178 | defaults: ["libupdater_static_libs"], |
| 179 | |
| 180 | srcs: ["update_simulator_main.cpp"], |
| 181 | |
| 182 | cflags: [ |
| 183 | "-Wall", |
| 184 | "-Werror", |
| 185 | ], |
| 186 | |
| 187 | static_libs: [ |
| 188 | "libupdater_host", |
| 189 | "libupdater_core", |
| 190 | "libcrypto_static", |
| 191 | "libfstab", |
| 192 | "libc++fs", |
| 193 | ], |
| 194 | |
| 195 | target: { |
| 196 | darwin: { |
| 197 | enabled: false, |
| 198 | }, |
| 199 | }, |
| 200 | } |