summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2017-01-10 15:51:04 -0800
committerJack He <siyuanh@google.com>2017-01-10 20:54:08 -0800
commit9a3015d3e35fa054efbad6c925e712444a3cd07b (patch)
tree9782fb3e13cbada485b1aaca31cdb535bd1e3c1b
parent94704431a4da8fbf32cb7c2f964d7aeb140300b9 (diff)
downloadlibldac-9a3015d3e35fa054efbad6c925e712444a3cd07b.tar.gz
Change build config of libldac from Android.mk to Android.bp
* In an effort to modernize build configurations to the new Soong system, we need to upgrade existing Android.mk files to Android.bp * This file is done through "androidmk Android.mk > Android.bp" * Soong does not support Makefile flags from BoardConfig.mk and hence ifeq ($(BUILD_LDAC_32BIT_FIXED_POINT_), TRUE) is not supported and has to be removed * Since the flag is not used by any BoardConfig.mk yet (always FALSE) the removal is safe * This flag is specific to devices without an FPU such as ARM Cortex-R series and external 32-bit DSPs Bug: 32958753 Test: Code compilation, no user visible effects Change-Id: I33ee7767dd21ad7e055fbad42a5874cdb2069f07
-rw-r--r--Android.bp16
-rw-r--r--Android.mk27
2 files changed, 16 insertions, 27 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..e87603c
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,16 @@
+cc_library_shared {
+ name: "libldacBT_enc",
+ arch: {
+ arm: {
+ instruction_set: "arm",
+ },
+ },
+ export_include_dirs: ["inc"],
+ srcs: [
+ "src/ldaclib.c",
+ "src/ldacBT.c",
+ ],
+ // -D_32BIT_FIXED_POINT should be added to cflags for devices without a FPU
+ // unit such as ARM Cortex-R series or external 32-bit DSPs.
+ cflags: ["-O2"],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 240eb40..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libldacBT_enc
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
-
-LOCAL_SRC_FILES:= \
- src/ldaclib.c \
- src/ldacBT.c
-
-LOCAL_CFLAGS:= \
- -O2
-
-ifeq ($(BUILD_LDAC_32BIT_FIXED_POINT_), TRUE)
-LOCAL_CFLAGS+= \
- -D_32BIT_FIXED_POINT
-endif
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
-