Steven Moreland | f3ae55a | 2017-05-09 15:49:36 -0700 | [diff] [blame] | 1 | subdirs = [ |
Tom Cherry | 600e806 | 2017-05-12 17:08:20 -0700 | [diff] [blame] | 2 | "bootloader_message", |
Steven Moreland | f3ae55a | 2017-05-09 15:49:36 -0700 | [diff] [blame] | 3 | ] |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 4 | |
Bob Badour | 29be3f6 | 2021-02-12 18:00:57 -0800 | [diff] [blame] | 5 | // *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE |
| 6 | // CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE |
| 7 | // DEPENDING ON IT IN YOUR PROJECT. *** |
| 8 | package { |
| 9 | default_applicable_licenses: ["bootable_recovery_license"], |
| 10 | } |
| 11 | |
| 12 | // Added automatically by a large-scale-change that took the approach of |
| 13 | // 'apply every license found to every target'. While this makes sure we respect |
| 14 | // every license restriction, it may not be entirely correct. |
| 15 | // |
| 16 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 17 | // |
| 18 | // Please consider splitting the single license below into multiple licenses, |
| 19 | // taking care not to lose any license_kind information, and overriding the |
| 20 | // default license using the 'licenses: [...]' property on targets as needed. |
| 21 | // |
| 22 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 23 | // to attach the license to, and including a comment whether the files may be |
| 24 | // used in the current project. |
| 25 | // See: http://go/android-license-faq |
| 26 | license { |
| 27 | name: "bootable_recovery_license", |
| 28 | visibility: [":__subpackages__"], |
| 29 | license_kinds: [ |
| 30 | "SPDX-license-identifier-Apache-2.0", |
| 31 | "SPDX-license-identifier-MIT", |
| 32 | "SPDX-license-identifier-OFL", // by exception only |
| 33 | ], |
| 34 | license_text: [ |
| 35 | "NOTICE", |
| 36 | ], |
| 37 | } |
| 38 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 39 | cc_defaults { |
| 40 | name: "recovery_defaults", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 41 | cflags: [ |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 42 | "-D_FILE_OFFSET_BITS=64", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 43 | // Must be the same as RECOVERY_API_VERSION. |
| 44 | "-DRECOVERY_API_VERSION=3", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 45 | "-Wall", |
| 46 | "-Werror", |
| 47 | ], |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 48 | cpp_std: "c++17", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 49 | } |
| 50 | |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 51 | bootstrap_go_package { |
| 52 | name: "soong-libaosprecovery_defaults", |
| 53 | pkgPath: "bootable/recovery/libaosprecovery", |
| 54 | deps: [ |
| 55 | "soong", |
| 56 | "soong-android", |
| 57 | "soong-cc" |
Hridya Valsaraju | 20c81b3 | 2018-07-27 22:09:12 -0700 | [diff] [blame] | 58 | ], |
Hridya Valsaraju | 20c81b3 | 2018-07-27 22:09:12 -0700 | [diff] [blame] | 59 | srcs: [ |
bigbiff | 6e0ca7d | 2021-02-06 19:15:16 -0500 | [diff] [blame] | 60 | "libaosprecovery_defaults.go", |
| 61 | "soong/makevars.go" |
Hridya Valsaraju | 20c81b3 | 2018-07-27 22:09:12 -0700 | [diff] [blame] | 62 | ], |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 63 | pluginFor: ["soong_build"] |
Hridya Valsaraju | 20c81b3 | 2018-07-27 22:09:12 -0700 | [diff] [blame] | 64 | } |
| 65 | |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 66 | libaosprecovery_defaults { |
| 67 | name: "libaosprecovery_defaults" |
| 68 | } |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 69 | |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 70 | cc_library_shared { |
| 71 | name: "libaosprecovery", |
| 72 | defaults: ["libaosprecovery_defaults"], |
| 73 | cflags: [ |
| 74 | "-std=gnu++2a", |
| 75 | "-DRECOVERY_API_VERSION=3" |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 76 | ], |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 77 | include_dirs: [ |
| 78 | "bootable/recovery/install/include", |
| 79 | "bootable/recovery/recovery_ui/include", |
| 80 | "bootable/recovery/recovery_utils/include", |
| 81 | "bootable/recovery/otautil/include", |
| 82 | "bootable/recovery/minadbd", |
| 83 | "bootable/recovery/minadbd/include", |
| 84 | "bootable/recovery/minzip", |
| 85 | "bootable/recovery/twrpinstall/include", |
| 86 | "system/libvintf/include" |
| 87 | ], |
| 88 | srcs: [ |
| 89 | "install/adb_install.cpp", |
| 90 | "install/asn1_decoder.cpp", |
| 91 | "install/get_args.cpp", |
| 92 | "install/install.cpp", |
| 93 | "install/package.cpp", |
bigbiff | c69420e | 2021-11-21 14:57:27 -0500 | [diff] [blame] | 94 | "install/spl_check.cpp", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 95 | "install/verifier.cpp", |
| 96 | "install/wipe_data.cpp", |
| 97 | "install/set_metadata.cpp", |
| 98 | "install/ZipUtil.cpp" |
| 99 | ], |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 100 | shared_libs: [ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 101 | "libbase", |
| 102 | "libbootloader_message", |
| 103 | "libcrypto", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 104 | "libext4_utils", |
| 105 | "libfs_mgr", |
| 106 | "libfusesideload", |
| 107 | "libhidl-gen-utils", |
| 108 | "libhidlbase", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 109 | "liblog", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 110 | "libselinux", |
| 111 | "libtinyxml2", |
| 112 | "libutils", |
| 113 | "libz", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 114 | "libziparchive", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 115 | "libcutils", |
| 116 | "libc++" |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 117 | ], |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 118 | static_libs: [ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 119 | "libotautil", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 120 | "libvintf", |
| 121 | "libhidl-gen-utils", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 122 | "librecovery_utils", |
bigbiff | 42b4ba9 | 2021-11-21 13:29:32 -0500 | [diff] [blame] | 123 | "libc++fs", |
bigbiff | c69420e | 2021-11-21 14:57:27 -0500 | [diff] [blame] | 124 | "libprotobuf-cpp-lite", |
bigbiff | e1981e5 | 2021-11-21 14:35:27 -0500 | [diff] [blame] | 125 | "ota_metadata_proto_cc", |
bigbiff | 42b4ba9 | 2021-11-21 13:29:32 -0500 | [diff] [blame] | 126 | "update_metadata-protos" |
bigbiff | 91bd7a7 | 2021-01-03 17:33:01 -0500 | [diff] [blame] | 127 | ], |
| 128 | required: [ |
| 129 | "init_recovery.rc", |
Mohd Faraz | dc2cf79 | 2021-04-17 21:09:22 +0200 | [diff] [blame] | 130 | "ueventd.rc.recovery", |
bigbiff | 91bd7a7 | 2021-01-03 17:33:01 -0500 | [diff] [blame] | 131 | "libdl_android.bootstrap", |
bigbiff | eaac762 | 2021-02-21 14:21:50 -0500 | [diff] [blame] | 132 | "ziptool.recovery" |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 133 | ] |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 134 | } |
| 135 | |
bigbiff | 91bd7a7 | 2021-01-03 17:33:01 -0500 | [diff] [blame] | 136 | prebuilt_etc { |
| 137 | name: "init_recovery.rc", |
| 138 | filename: "init.rc", |
| 139 | src: "etc/init.rc", |
| 140 | sub_dir: "init/hw", |
| 141 | recovery: true, |
| 142 | } |