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