aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-04-25 02:01:08 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-04-25 02:01:11 +0000
commit9654326e6af758bf25e50f15a7e7b9cff6755a78 (patch)
tree2519bf5f53ce253e0f5214485911a245ad2f1dee
parent445fd63a37a85fa696e278acad25bfd4dc20f843 (diff)
parentafd46eaaf9ebcfa4a866da8015f5e1f21dd5dcd3 (diff)
downloadflac-o-iot-preview-5.tar.gz
-rw-r--r--Android.bp11
-rw-r--r--Android.mk4
-rw-r--r--libFLAC/Android.bp51
-rw-r--r--libFLAC/Android.mk37
4 files changed, 62 insertions, 41 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 00000000..428a5995
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,11 @@
+cc_library_headers {
+ name: "libFLAC_config",
+ export_include_dirs: ["."],
+}
+
+cc_library_headers {
+ name: "libFLAC_headers",
+ export_include_dirs: ["include"],
+}
+
+subdirs = ["libFLAC"]
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 7cbcaaa0..00000000
--- a/Android.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/libFLAC/Android.mk
diff --git a/libFLAC/Android.bp b/libFLAC/Android.bp
new file mode 100644
index 00000000..cfb83f85
--- /dev/null
+++ b/libFLAC/Android.bp
@@ -0,0 +1,51 @@
+cc_library_static {
+ name: "libFLAC",
+
+ srcs: [
+ "bitmath.c",
+ "bitreader.c",
+ "bitwriter.c",
+ "cpu.c",
+ "crc.c",
+ "fixed.c",
+ "float.c",
+ "format.c",
+ "lpc.c",
+ "memory.c",
+ "md5.c",
+ "stream_decoder.c",
+ "stream_encoder.c",
+ "stream_encoder_framing.c",
+ "window.c",
+ ],
+
+ local_include_dirs: ["include"],
+ header_libs: [
+ "libFLAC_config",
+ "libFLAC_headers",
+ ],
+ export_header_lib_headers: ["libFLAC_headers"],
+
+ cflags: [
+ "-DHAVE_CONFIG_H",
+ "-DFLAC__NO_MD5",
+ "-DFLAC__INTEGER_ONLY_LIBRARY",
+
+ "-D_REENTRANT",
+ "-DPIC",
+ "-DU_COMMON_IMPLEMENTATION",
+ "-fPIC",
+
+ "-O3",
+ "-funroll-loops",
+ "-finline-functions",
+ "-Werror",
+ ],
+
+ arch: {
+ arm: {
+ instruction_set: "arm",
+ },
+ },
+
+}
diff --git a/libFLAC/Android.mk b/libFLAC/Android.mk
deleted file mode 100644
index 8c9d706f..00000000
--- a/libFLAC/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- bitmath.c \
- bitreader.c \
- bitwriter.c \
- cpu.c \
- crc.c \
- fixed.c \
- float.c \
- format.c \
- lpc.c \
- memory.c \
- md5.c \
- stream_decoder.c \
- stream_encoder.c \
- stream_encoder_framing.c \
- window.c
-
-LOCAL_C_INCLUDES += \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/.. \
- $(LOCAL_PATH)/../include
-
-LOCAL_CFLAGS += -DHAVE_CONFIG_H -DFLAC__NO_MD5 -DFLAC__INTEGER_ONLY_LIBRARY
-LOCAL_CFLAGS += -D_REENTRANT -DPIC -DU_COMMON_IMPLEMENTATION -fPIC
-LOCAL_CFLAGS += -O3 -funroll-loops -finline-functions
-LOCAL_CFLAGS += -Werror
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_MODULE := libFLAC
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_STATIC_LIBRARY)