summaryrefslogtreecommitdiffstats
path: root/misc_writer/Android.bp
diff options
context:
space:
mode:
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",
+ ]
}