Merge commit 'f68eead36c0eb8f6f4e5c912dfe204c52bb7b7c5' to aosp/master

Change-Id: I8cfd6cd12923ca4ecb13195abb44f657eff11770
Signed-off-by: David Lin <dtwlin@google.com>
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..88f6530
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,3 @@
+// Copyright (C) 2015 The Android Open Source Project
+
+subdirs=["lib", "programs"]
diff --git a/lib/LICENSE b/LICENSE
similarity index 100%
rename from lib/LICENSE
rename to LICENSE
diff --git a/MODULE_LICENSE_BSD b/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_BSD
diff --git a/lib/LICENSE b/NOTICE
similarity index 100%
copy from lib/LICENSE
copy to NOTICE
diff --git a/lib/Android.bp b/lib/Android.bp
new file mode 100644
index 0000000..19d02a3
--- /dev/null
+++ b/lib/Android.bp
@@ -0,0 +1,13 @@
+// Copyright (C) 2015 The Android Open Source Project
+
+cc_library {
+    name: "liblz4",
+    host_supported: true,
+    srcs: [
+        "lz4.c",
+        "lz4hc.c",
+        "lz4frame.c",
+        "xxhash.c",
+    ],
+    export_include_dirs: ["."],
+}
diff --git a/programs/Android.bp b/programs/Android.bp
new file mode 100644
index 0000000..0168035
--- /dev/null
+++ b/programs/Android.bp
@@ -0,0 +1,24 @@
+// Copyright (C) 2016 The Android Open Source Project
+
+cc_binary_host {
+    name: "lz4",
+    srcs: [
+        "bench.c",
+        "lz4io.c",
+        "lz4cli.c",
+    ],
+    static_libs: ["liblz4"],
+    stl: "libc++_static",
+}
+
+cc_binary_host {
+    name: "lz4c",
+    cflags: ["-DENABLE_LZ4C_LEGACY_OPTIONS"],
+    srcs: [
+        "bench.c",
+        "lz4io.c",
+        "lz4cli.c",
+    ],
+    static_libs: ["liblz4"],
+    stl: "libc++_static",
+}