summaryrefslogtreecommitdiffstats
path: root/misc_writer/Android.bp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-11-10 07:07:20 +0100
committerTianjie Xu <xunchang@google.com>2019-11-12 19:53:04 +0100
commit3d57c84476ce542a7d8d623cf1f208efc1a20026 (patch)
tree98792d6c0dee1e8205a425e6519019614d66122d /misc_writer/Android.bp
parentMerge "bootloader_message: Add helpers for handling IBootControl MergeStatus." (diff)
downloadandroid_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.gz
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.bz2
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.lz
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.xz
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.zst
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.zip
Diffstat (limited to 'misc_writer/Android.bp')
-rw-r--r--misc_writer/Android.bp80
1 files changed, 75 insertions, 5 deletions
diff --git a/misc_writer/Android.bp b/misc_writer/Android.bp
index 567143c79..73c44d2eb 100644
--- a/misc_writer/Android.bp
+++ b/misc_writer/Android.bp
@@ -14,14 +14,30 @@
// limitations under the License.
//
-cc_binary {
- name: "misc_writer",
+cc_defaults {
+ name: "misc_writer_defaults",
vendor: true,
+ cpp_std: "experimental",
- srcs: [
- "misc_writer.cpp",
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "libbase",
+ ],
+
+ static_libs: [
+ "libbootloader_message_vendor",
+ "libfstab",
],
+}
+// TODO(xunchang) Remove duplicates after we convert the device specific librecovery_ui to recovery
+// module. Then libmisc_writer can build as a vendor module available in recovery.
+cc_library_static {
+ name: "libmisc_writer",
cpp_std: "experimental",
cflags: [
@@ -34,7 +50,61 @@ cc_binary {
],
static_libs: [
- "libbootloader_message_vendor",
+ "libbootloader_message",
"libfstab",
],
+
+ srcs: [
+ "misc_writer.cpp",
+ ],
+
+ export_include_dirs: [
+ "include",
+ ],
+}
+
+cc_library_static {
+ name: "libmisc_writer_vendor",
+ defaults: [
+ "misc_writer_defaults",
+ ],
+
+ srcs: [
+ "misc_writer.cpp",
+ ],
+
+ export_include_dirs: [
+ "include",
+ ],
+}
+
+cc_binary {
+ name: "misc_writer",
+ defaults: [
+ "misc_writer_defaults",
+ ],
+
+ srcs: [
+ "misc_writer_main.cpp",
+ ],
+
+ static_libs: [
+ "libmisc_writer_vendor",
+ ]
+}
+
+cc_test {
+ name: "misc_writer_test",
+ defaults: [
+ "misc_writer_defaults",
+ ],
+
+ srcs: [
+ "misc_writer_test.cpp",
+ ],
+ test_suites: ["device-tests"],
+
+ static_libs: [
+ "libmisc_writer_vendor",
+ ]
}