Whamcloud - gitweb
AOSP: [LSC] Add LOCAL_LICENSE_KINDS to external/e2fsprogs
[tools/e2fsprogs.git] / misc / Android.bp
index 310c9dc..ca4267b 100644 (file)
@@ -2,6 +2,18 @@
 
 // Library used to export files from this directory to other programs in this
 // project.
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "external_e2fsprogs_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-GPL
+    //   SPDX-license-identifier-LGPL
+    //   SPDX-license-identifier-LGPL-2.1
+    //   SPDX-license-identifier-LGPL-3.0
+    default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
 cc_library {
     name: "libext2_misc",
     host_supported: true,
@@ -21,8 +33,9 @@ cc_library {
     ],
     cflags: ["-Wno-error=format-extra-args"],
     shared_libs: [
-        "libext2_quota",
         "libext2fs",
+        "libext2_com_err",
+        "libext2_quota",
     ],
     system_shared_libs: ["libc", "libdl"],
     export_include_dirs: ["."],
@@ -117,8 +130,8 @@ cc_defaults {
 }
 
 tune2fs_libs = [
-    "libext2_com_err",
     "libext2_blkid",
+    "libext2_com_err",
     "libext2_quota",
     "libext2_uuid",
     "libext2_e2p",
@@ -128,6 +141,7 @@ tune2fs_libs = [
 cc_binary {
     name: "tune2fs",
     host_supported: true,
+    vendor_ramdisk_available: true,
     defaults: ["tune2fs-defaults"],
 
     shared_libs: tune2fs_libs,
@@ -142,6 +156,16 @@ cc_binary {
     static_libs: tune2fs_libs,
 }
 
+cc_binary {
+    name: "tune2fs_ramdisk",
+    stem: "tune2fs",
+    static_executable: true,
+    ramdisk: true,
+    defaults: ["tune2fs-defaults"],
+    system_shared_libs: [],
+    static_libs: tune2fs_libs,
+}
+
 cc_library_static {
     name: "libtune2fs",
     defaults: ["tune2fs-defaults"],
@@ -173,7 +197,7 @@ cc_binary {
 // Build chattr
 
 cc_binary {
-    name: "chattr",
+    name: "chattr-e2fsprogs",
     host_supported: true,
     defaults: ["e2fsprogs-defaults"],
 
@@ -200,7 +224,7 @@ lsattr_libs = [
 ]
 
 cc_binary {
-    name: "lsattr",
+    name: "lsattr-e2fsprogs",
     host_supported: true,
     defaults: ["lsattr-defaults"],
 
@@ -272,3 +296,37 @@ cc_binary {
     ],
     system_shared_libs: ["libc", "libdl"],
 }
+
+//##########################################################################
+// Build filefrag
+
+cc_binary {
+    name: "filefrag",
+    host_supported: true,
+    defaults: ["e2fsprogs-defaults"],
+
+    srcs: ["filefrag.c"],
+    shared_libs: [
+        "libext2fs",
+    ],
+    system_shared_libs: ["libc", "libdl"],
+}
+
+//##########################################################################
+// Build e2freefrag
+
+cc_binary {
+    name: "e2freefrag",
+    host_supported: true,
+    defaults: ["e2fsprogs-defaults"],
+
+    srcs: [
+        "e2freefrag.c",
+    ],
+    header_libs: ["libext2-headers"],
+    shared_libs: [
+        "libext2fs",
+        "libext2_com_err",
+    ],
+    system_shared_libs: ["libc", "libdl"],
+}