xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "libinstall_defaults", |
| 26 | |
| 27 | defaults: [ |
| 28 | "recovery_defaults", |
Kelvin Zhang | e631225 | 2021-05-14 17:15:50 -0400 | [diff] [blame] | 29 | "libspl_check_defaults", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 30 | ], |
| 31 | |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 32 | cflags: [ |
| 33 | //"-DRECOVERY_API_VERSION=3" |
xunchang | 95d6732 | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 34 | ], |
| 35 | |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 36 | shared_libs: [ |
| 37 | "libbase", |
| 38 | "libbootloader_message", |
| 39 | "libcrypto", |
| 40 | "libext4_utils", |
| 41 | "libfs_mgr", |
| 42 | "libfusesideload", |
| 43 | "libhidl-gen-utils", |
| 44 | "libhidlbase", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 45 | "liblog", |
| 46 | "libselinux", |
| 47 | "libtinyxml2", |
| 48 | "libutils", |
| 49 | "libz", |
| 50 | "libziparchive", |
| 51 | ], |
| 52 | |
| 53 | static_libs: [ |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 54 | "librecovery_utils", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 55 | "libotautil", |
David Anderson | 89d2d05 | 2019-10-15 13:22:20 -0700 | [diff] [blame] | 56 | "libsnapshot_nobinder", |
Kelvin Zhang | e631225 | 2021-05-14 17:15:50 -0400 | [diff] [blame] | 57 | "ota_metadata_proto_cc", |
bigbiff | e1981e5 | 2021-11-21 14:35:27 -0500 | [diff] [blame] | 58 | "update_metadata-protos", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 59 | |
| 60 | // external dependencies |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 61 | "libvintf", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 62 | ], |
| 63 | } |
| 64 | |
Kelvin Zhang | e631225 | 2021-05-14 17:15:50 -0400 | [diff] [blame] | 65 | cc_test_host { |
| 66 | name: "libinstall_host_unittests", |
| 67 | defaults: [ |
| 68 | "libspl_check_defaults" |
| 69 | ], |
| 70 | srcs: [ |
| 71 | "spl_check_unittests.cpp", |
| 72 | ], |
| 73 | static_libs: [ |
| 74 | "libspl_check", |
| 75 | ], |
| 76 | } |
| 77 | |
| 78 | cc_defaults { |
| 79 | name: "libspl_check_defaults", |
| 80 | static_libs: [ |
| 81 | "libbase", |
| 82 | "ota_metadata_proto_cc", |
| 83 | "liblog", |
| 84 | "libziparchive", |
| 85 | "libz", |
| 86 | "libprotobuf-cpp-lite", |
bigbiff | e1981e5 | 2021-11-21 14:35:27 -0500 | [diff] [blame] | 87 | "update_metadata-protos", |
Kelvin Zhang | e631225 | 2021-05-14 17:15:50 -0400 | [diff] [blame] | 88 | ], |
| 89 | } |
| 90 | |
| 91 | cc_library_static { |
| 92 | name: "libspl_check", |
| 93 | recovery_available: true, |
| 94 | host_supported: true, |
| 95 | defaults: [ |
| 96 | "libspl_check_defaults", |
| 97 | ], |
| 98 | srcs: ["spl_check.cpp"], |
| 99 | export_include_dirs: [ |
| 100 | "include", |
| 101 | ], |
| 102 | } |
| 103 | |
Tao Bao | 2f8afba | 2019-04-08 11:26:11 -0700 | [diff] [blame] | 104 | cc_library_static { |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 105 | name: "libinstall", |
| 106 | recovery_available: true, |
| 107 | |
| 108 | defaults: [ |
| 109 | "libinstall_defaults", |
| 110 | ], |
| 111 | |
| 112 | srcs: [ |
| 113 | "adb_install.cpp", |
| 114 | "asn1_decoder.cpp", |
Tianjie Xu | f6158eb | 2019-06-11 16:09:07 -0700 | [diff] [blame] | 115 | "fuse_install.cpp", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 116 | "install.cpp", |
| 117 | "package.cpp", |
David Anderson | 89d2d05 | 2019-10-15 13:22:20 -0700 | [diff] [blame] | 118 | "snapshot_utils.cpp", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 119 | "verifier.cpp", |
xunchang | 388d253 | 2019-04-12 16:22:15 -0700 | [diff] [blame] | 120 | "wipe_data.cpp", |
Tao Bao | 7f19d10 | 2019-04-26 22:56:56 -0700 | [diff] [blame] | 121 | "wipe_device.cpp", |
Kelvin Zhang | e631225 | 2021-05-14 17:15:50 -0400 | [diff] [blame] | 122 | "spl_check.cpp", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 123 | ], |
| 124 | |
Tao Bao | 3305d48 | 2019-09-26 00:02:29 -0700 | [diff] [blame] | 125 | header_libs: [ |
| 126 | "libminadbd_headers", |
xunchang | 2478885 | 2019-03-22 16:08:52 -0700 | [diff] [blame] | 127 | ], |
| 128 | |
| 129 | shared_libs: [ |
| 130 | "librecovery_ui", |
| 131 | ], |
| 132 | |
| 133 | export_include_dirs: [ |
| 134 | "include", |
| 135 | ], |
| 136 | |
| 137 | export_shared_lib_headers: [ |
| 138 | "librecovery_ui", |
| 139 | ], |
| 140 | } |