aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lin <dtwlin@google.com>2017-01-20 20:32:09 -0800
committerDavid Lin <dtwlin@google.com>2017-01-20 20:34:38 -0800
commita8723b556fb866ae777af4e0bb4a1c6eadbfa6fe (patch)
tree0745bfce033d3b047bb44f6b89c4cbbf186bbc70
parent37f25f8f724b770adda08aca405b6e1d244fb509 (diff)
downloadlz4-a8723b556fb866ae777af4e0bb4a1c6eadbfa6fe.tar.gz
lz4 program: Build lz4 and lz4c programs
Add programs directory as build target. Convert the Android.mk for program to Android.bp as well as add lz4c as build target. Bug: 33918223 Test: build Change-Id: I73864d4d2aaabb2eb088cdfd66f893a47186dff2 Signed-off-by: David Lin <dtwlin@google.com>
-rw-r--r--Android.bp2
-rw-r--r--programs/Android.bp24
-rw-r--r--programs/Android.mk11
3 files changed, 25 insertions, 12 deletions
diff --git a/Android.bp b/Android.bp
index d557fe25..88f6530a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,3 @@
// Copyright (C) 2015 The Android Open Source Project
-subdirs=["lib"]
+subdirs=["lib", "programs"]
diff --git a/programs/Android.bp b/programs/Android.bp
new file mode 100644
index 00000000..01680350
--- /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",
+}
diff --git a/programs/Android.mk b/programs/Android.mk
deleted file mode 100644
index d5a94bed..00000000
--- a/programs/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := lz4
-LOCAL_SRC_FILES := bench.c lz4io.c lz4cli.c
-LOCAL_STATIC_LIBRARIES := liblz4
-LOCAL_CXX_STL := libc++_static
-include $(BUILD_HOST_EXECUTABLE)
-