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 15cc_defaults { 16 name: "libupdater_static_libs", 17 18 static_libs: [ 19 "libapplypatch", 20 "libbootloader_message", 21 "libbspatch", 22 "libedify", 23 "libotautil", 24 "libext4_utils", 25 "libdm", 26 "libfec", 27 "libfec_rs", 28 "libavb", 29 "libverity_tree", 30 "libgtest_prod", 31 "liblog", 32 "liblp", 33 "libselinux", 34 "libsparse", 35 "libsquashfs_utils", 36 "libbrotli", 37 "libbz", 38 "libziparchive", 39 "libz", 40 "libbase", 41 "libcrypto_utils", 42 "libcutils", 43 "libutils", 44 ], 45} 46 47cc_defaults { 48 name: "libupdater_defaults", 49 50 defaults: [ 51 "recovery_defaults", 52 "libupdater_static_libs", 53 ], 54 55 shared_libs: [ 56 "libcrypto", 57 ], 58} 59 60cc_defaults { 61 name: "libupdater_device_defaults", 62 63 static_libs: [ 64 "libfs_mgr", 65 "libtune2fs", 66 67 "libext2_com_err", 68 "libext2_blkid", 69 "libext2_quota", 70 "libext2_uuid", 71 "libext2_e2p", 72 "libext2fs", 73 ], 74} 75 76cc_library_static { 77 name: "libupdater_core", 78 79 host_supported: true, 80 81 defaults: [ 82 "recovery_defaults", 83 "libupdater_defaults", 84 ], 85 86 srcs: [ 87 "blockimg.cpp", 88 "commands.cpp", 89 "install.cpp", 90 "mounts.cpp", 91 "updater.cpp", 92 ], 93 94 target: { 95 darwin: { 96 enabled: false, 97 }, 98 }, 99 100 export_include_dirs: [ 101 "include", 102 ], 103} 104 105cc_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", 116 "updater_runtime.cpp", 117 "updater_runtime_dynamic_partitions.cpp", 118 ], 119 120 static_libs: [ 121 "libupdater_core", 122 ], 123 124 include_dirs: [ 125 "external/e2fsprogs/misc", 126 ], 127 128 export_include_dirs: [ 129 "include", 130 ], 131} 132 133cc_library_host_static { 134 name: "libupdater_host", 135 136 defaults: [ 137 "recovery_defaults", 138 "libupdater_defaults", 139 ], 140 141 srcs: [ 142 "build_info.cpp", 143 "dynamic_partitions.cpp", 144 "simulator_runtime.cpp", 145 "target_files.cpp", 146 ], 147 148 static_libs: [ 149 "libupdater_core", 150 "libfstab", 151 "libc++fs", 152 ], 153 154 target: { 155 darwin: { 156 enabled: false, 157 }, 158 }, 159 160 export_include_dirs: [ 161 "include", 162 ], 163} 164 165cc_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} 190