summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2017-01-11 16:54:52 -0800
committerAlex Deymo <deymo@google.com>2017-01-24 13:23:43 -0800
commite8ed69493b7ab6237fb7114343789d3c213d2315 (patch)
treedf2692b3cf0ba840019ac3d72da420d4bcaf3b86 /libfec
parentea69a18cd42bf757d49d733401f4ca6aa3994dc2 (diff)
downloadextras-e8ed69493b7ab6237fb7114343789d3c213d2315.tar.gz
Convert several libraries to soong.
This patch coverts libfec and its dependencies to soong. This also updates the name of the libext2_uuid-host library removing the "-host" suffix as that is also being converted to soong. Also create a shared library for libfec given that it has quite a few dependencies. Bug: 34284069 Test: mmma system/extras; make checkbuild Change-Id: Ib3ada6420bae32418a02ca92db664d0d24214e2f
Diffstat (limited to 'libfec')
-rw-r--r--libfec/Android.bp37
-rw-r--r--libfec/Android.mk45
2 files changed, 37 insertions, 45 deletions
diff --git a/libfec/Android.bp b/libfec/Android.bp
new file mode 100644
index 00000000..1145fc41
--- /dev/null
+++ b/libfec/Android.bp
@@ -0,0 +1,37 @@
+// Copyright 2015 The Android Open Source Project
+
+cc_library {
+ name: "libfec",
+ host_supported: true,
+ srcs: [
+ "fec_open.cpp",
+ "fec_read.cpp",
+ "fec_verity.cpp",
+ "fec_process.cpp",
+ ],
+ cflags: ["-Wall", "-Werror", "-O3", "-D_LARGEFILE64_SOURCE"],
+ export_include_dirs: ["include"],
+ // Exported header include/fec/io.h includes crypto_utils headers.
+ export_static_lib_headers: ["libcrypto_utils"],
+
+ static_libs: [
+ "libext4_utils",
+ "libfec_rs",
+ "libsquashfs_utils",
+ "libcrypto_utils",
+ "libcrypto",
+ "libcutils",
+ "libbase",
+ ],
+
+ target: {
+ host: {
+ cflags: ["-D_GNU_SOURCE", "-DFEC_NO_KLOG"]
+ },
+ },
+
+ clang: true,
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
+}
diff --git a/libfec/Android.mk b/libfec/Android.mk
index 47ac556e..12974bc5 100644
--- a/libfec/Android.mk
+++ b/libfec/Android.mk
@@ -2,49 +2,4 @@
#
LOCAL_PATH := $(call my-dir)
-common_cflags := -Wall -Werror -O3 -D_LARGEFILE64_SOURCE
-
-common_c_includes := \
- $(LOCAL_PATH)/include \
- external/fec
-
-common_src_files := \
- fec_open.cpp \
- fec_read.cpp \
- fec_verity.cpp \
- fec_process.cpp
-
-common_static_libraries := \
- libext4_utils \
- libfec_rs \
- libsquashfs_utils \
- libcrypto_utils \
- libcrypto \
- libcutils \
- libbase \
-
-include $(CLEAR_VARS)
-LOCAL_CFLAGS := $(common_cflags)
-LOCAL_C_INCLUDES := $(common_c_includes)
-LOCAL_CLANG := true
-LOCAL_SANITIZE := integer
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_MODULE := libfec
-LOCAL_SRC_FILES := $(common_src_files)
-LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_CFLAGS := $(common_cflags) -D_GNU_SOURCE -DFEC_NO_KLOG
-LOCAL_C_INCLUDES := $(common_c_includes)
-LOCAL_CLANG := true
-ifeq ($(HOST_OS),linux)
-LOCAL_SANITIZE := integer
-endif
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_MODULE := libfec
-LOCAL_SRC_FILES := $(common_src_files)
-LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
-include $(BUILD_HOST_STATIC_LIBRARY)
-
include $(LOCAL_PATH)/test/Android.mk