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