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", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 90 | "install/get_args.cpp", |
| 91 | "install/install.cpp", |
bigbiff | c69420e | 2021-11-21 14:57:27 -0500 | [diff] [blame] | 92 | "install/spl_check.cpp", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 93 | "install/wipe_data.cpp", |
| 94 | "install/set_metadata.cpp", |
| 95 | "install/ZipUtil.cpp" |
| 96 | ], |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 97 | shared_libs: [ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 98 | "libbase", |
| 99 | "libbootloader_message", |
| 100 | "libcrypto", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 101 | "libext4_utils", |
| 102 | "libfs_mgr", |
| 103 | "libfusesideload", |
| 104 | "libhidl-gen-utils", |
| 105 | "libhidlbase", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 106 | "liblog", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 107 | "libselinux", |
| 108 | "libtinyxml2", |
| 109 | "libutils", |
| 110 | "libz", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 111 | "libziparchive", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 112 | "libcutils", |
| 113 | "libc++" |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 114 | ], |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 115 | static_libs: [ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 116 | "libotautil", |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 117 | "libvintf", |
| 118 | "libhidl-gen-utils", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 119 | "librecovery_utils", |
bigbiff | 42b4ba9 | 2021-11-21 13:29:32 -0500 | [diff] [blame] | 120 | "libc++fs", |
bigbiff | c69420e | 2021-11-21 14:57:27 -0500 | [diff] [blame] | 121 | "libprotobuf-cpp-lite", |
bigbiff | e1981e5 | 2021-11-21 14:35:27 -0500 | [diff] [blame] | 122 | "ota_metadata_proto_cc", |
bigbiff | 42b4ba9 | 2021-11-21 13:29:32 -0500 | [diff] [blame] | 123 | "update_metadata-protos" |
bigbiff | 91bd7a7 | 2021-01-03 17:33:01 -0500 | [diff] [blame] | 124 | ], |
| 125 | required: [ |
| 126 | "init_recovery.rc", |
Mohd Faraz | dc2cf79 | 2021-04-17 21:09:22 +0200 | [diff] [blame] | 127 | "ueventd.rc.recovery", |
bigbiff | 91bd7a7 | 2021-01-03 17:33:01 -0500 | [diff] [blame] | 128 | "libdl_android.bootstrap", |
bigbiff | eaac762 | 2021-02-21 14:21:50 -0500 | [diff] [blame] | 129 | "ziptool.recovery" |
bigbiff | 673c7ae | 2020-12-02 19:44:56 -0500 | [diff] [blame] | 130 | ] |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 131 | } |
| 132 | |
bigbiff | 91bd7a7 | 2021-01-03 17:33:01 -0500 | [diff] [blame] | 133 | prebuilt_etc { |
| 134 | name: "init_recovery.rc", |
| 135 | filename: "init.rc", |
| 136 | src: "etc/init.rc", |
| 137 | sub_dir: "init/hw", |
| 138 | recovery: true, |
| 139 | } |