mirror of
https://github.com/Evolution-X/external_piex
synced 2026-01-27 16:24:09 +00:00
Convert libpiex to Android.bp
See build/soong/README.md for more information. Also converts the tiny libbinary_parse, libimage_type_recognition, and libtiff_directory shared libraries to static libraries. They are only used by libpiex, and linking them statically reduces the total size by 90kB (263kB to 170kB). Test: mma -j Change-Id: I3f6a822e4497cf3cedecd30d4e11565e5da71b07
This commit is contained in:
40
Android.bp
Normal file
40
Android.bp
Normal file
@@ -0,0 +1,40 @@
|
||||
cc_library_static {
|
||||
name: "libbinary_parse",
|
||||
srcs: [
|
||||
"src/binary_parse/cached_paged_byte_array.cc",
|
||||
"src/binary_parse/range_checked_byte_ptr.cc",
|
||||
],
|
||||
cppflags: ["-Wsign-compare"],
|
||||
}
|
||||
|
||||
cc_library_static {
|
||||
name: "libimage_type_recognition",
|
||||
srcs: [
|
||||
"src/image_type_recognition/image_type_recognition_lite.cc",
|
||||
],
|
||||
static_libs: ["libbinary_parse"],
|
||||
cppflags: ["-Wsign-compare"],
|
||||
}
|
||||
|
||||
cc_library_static {
|
||||
name: "libtiff_directory",
|
||||
srcs: [
|
||||
"src/tiff_directory/tiff_directory.cc",
|
||||
],
|
||||
static_libs: ["libbinary_parse"],
|
||||
cppflags: ["-Wsign-compare"],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libpiex",
|
||||
srcs: [
|
||||
"src/tiff_parser.cc",
|
||||
"src/piex.cc",
|
||||
],
|
||||
static_libs: [
|
||||
"libbinary_parse",
|
||||
"libimage_type_recognition",
|
||||
"libtiff_directory",
|
||||
],
|
||||
cppflags: ["-Wsign-compare"],
|
||||
}
|
||||
45
Android.mk
45
Android.mk
@@ -1,45 +0,0 @@
|
||||
LOCAL_PATH := $(my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libbinary_parse
|
||||
LOCAL_CPP_EXTENSION := .cc
|
||||
LOCAL_SRC_FILES:= \
|
||||
src/binary_parse/cached_paged_byte_array.cc \
|
||||
src/binary_parse/range_checked_byte_ptr.cc
|
||||
LOCAL_CPPFALGS := -Wsign-compare
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libimage_type_recognition
|
||||
LOCAL_CPP_EXTENSION := .cc
|
||||
LOCAL_SRC_FILES:= \
|
||||
src/image_type_recognition/image_type_recognition_lite.cc
|
||||
LOCAL_SHARED_LIBRARIES := libbinary_parse
|
||||
LOCAL_CPPFALGS := -Wsign-compare
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libtiff_directory
|
||||
LOCAL_CPP_EXTENSION := .cc
|
||||
LOCAL_SRC_FILES:= \
|
||||
src/tiff_directory/tiff_directory.cc
|
||||
LOCAL_SHARED_LIBRARIES := libbinary_parse
|
||||
LOCAL_CPPFALGS := -Wsign-compare
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libpiex
|
||||
LOCAL_CPP_EXTENSION := .cc
|
||||
LOCAL_SRC_FILES:= \
|
||||
src/tiff_parser.cc \
|
||||
src/piex.cc
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libbinary_parse \
|
||||
libimage_type_recognition \
|
||||
libtiff_directory
|
||||
LOCAL_CPPFALGS := -Wsign-compare
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
Reference in New Issue
Block a user