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