From 4fb758aa4bf235ecd85786b4e819941dc534a0c0 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 30 Mar 2015 14:50:55 -0400 Subject: [PATCH] Clean up and fix Android build files Add missing new lib/ext2fs source files that were added for encryption support. Also move configuration #define's from individual Android.mk to the android_config.h file, since we've moved away from specifying configuration #define's on the command-line upstream. Signed-off-by: Theodore Ts'o --- e2fsck/Android.mk | 59 +------------- lib/blkid/Android.mk | 34 +------- lib/e2p/Android.mk | 26 +----- lib/et/Android.mk | 34 +------- lib/ext2fs/Android.mk | 38 ++------- lib/quota/Android.mk | 26 +----- lib/uuid/Android.mk | 27 +------ misc/Android.mk | 218 ++++++++++---------------------------------------- resize/Android.mk | 26 +----- util/android_config.h | 34 ++++++++ 10 files changed, 93 insertions(+), 429 deletions(-) diff --git a/e2fsck/Android.mk b/e2fsck/Android.mk index a95bae4..83d1c2d 100644 --- a/e2fsck/Android.mk +++ b/e2fsck/Android.mk @@ -14,32 +14,7 @@ libext2_profile_system_shared_libraries := libc libext2_profile_c_includes := external/e2fsprogs/lib -libext2_profile_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF \ - -DDISABLE_BACKTRACE=1 +libext2_profile_cflags := -O2 -g -W -Wall include $(CLEAR_VARS) @@ -108,37 +83,7 @@ e2fsck_system_shared_libraries := libc e2fsck_c_includes := external/e2fsprogs/lib -e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing \ - -DHAVE_DIRENT_H \ - -DHAVE_ERRNO_H \ - -DHAVE_INTTYPES_H \ - -DHAVE_LINUX_FD_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SETJMP_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_UNISTD_H \ - -DHAVE_UTIME_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_INTPTR_T \ - -DENABLE_HTREE=1 \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF \ - -DDISABLE_BACKTRACE=1 +e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing include $(CLEAR_VARS) diff --git a/lib/blkid/Android.mk b/lib/blkid/Android.mk index 53925a3..95fe681 100644 --- a/lib/blkid/Android.mk +++ b/lib/blkid/Android.mk @@ -21,33 +21,7 @@ libext2_blkid_system_shared_libraries := libc libext2_blkid_c_includes := external/e2fsprogs/lib -libext2_blkid_cflags := -O2 -g -W -Wall -fno-strict-aliasing \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF - -libext2_blkid_cflags_linux := \ - -DHAVE_LINUX_FD_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE +libext2_blkid_cflags := -O2 -g -W -Wall -fno-strict-aliasing include $(CLEAR_VARS) @@ -55,7 +29,7 @@ LOCAL_SRC_FILES := $(libext2_blkid_src_files) LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_blkid_system_shared_libraries) LOCAL_SHARED_LIBRARIES := $(libext2_blkid_shared_libraries) LOCAL_C_INCLUDES := $(libext2_blkid_c_includes) -LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux) -fno-strict-aliasing +LOCAL_CFLAGS := $(libext2_blkid_cflags) LOCAL_MODULE := libext2_blkid LOCAL_MODULE_TAGS := optional @@ -66,11 +40,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext2_blkid_src_files) LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2_blkid_shared_libraries)) LOCAL_C_INCLUDES := $(libext2_blkid_c_includes) -ifeq ($(HOST_OS),linux) -LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux) -else LOCAL_CFLAGS := $(libext2_blkid_cflags) -endif LOCAL_MODULE := libext2_blkid_host LOCAL_MODULE_TAGS := optional diff --git a/lib/e2p/Android.mk b/lib/e2p/Android.mk index 7fd6e51..87a57ff 100644 --- a/lib/e2p/Android.mk +++ b/lib/e2p/Android.mk @@ -24,31 +24,7 @@ libext2_e2p_src_files := \ libext2_e2p_c_includes := external/e2fsprogs/lib -libext2_e2p_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +libext2_e2p_cflags := -O2 -g -W -Wall libext2_e2p_system_shared_libraries := libc diff --git a/lib/et/Android.mk b/lib/et/Android.mk index 42af71c..c69eca3 100644 --- a/lib/et/Android.mk +++ b/lib/et/Android.mk @@ -9,33 +9,7 @@ libext2_com_err_src_files := \ libext2_com_err_c_includes := external/e2fsprogs/lib -libext2_com_err_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF - -libext2_com_err_cflags_linux := \ - -DHAVE_LINUX_FD_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE +libext2_com_err_cflags := -O2 -g -W -Wall libext2_com_err_system_shared_libraries := libc @@ -43,7 +17,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext2_com_err_src_files) LOCAL_C_INCLUDES := $(libext2_com_err_c_includes) -LOCAL_CFLAGS := $(libext2_com_err_cflags) $(libext2_com_err_cflags_linux) +LOCAL_CFLAGS := $(libext2_com_err_cflags) LOCAL_SYSTEM_SHARED_LIBRARIES := libc LOCAL_MODULE := libext2_com_err LOCAL_MODULE_TAGS := optional @@ -54,11 +28,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext2_com_err_src_files) LOCAL_C_INCLUDES := $(libext2_com_err_c_includes) -ifeq ($(HOST_OS),linux) -LOCAL_CFLAGS := $(libext2_com_err_cflags) $(libext2_com_err_cflags_linux) -else LOCAL_CFLAGS := $(libext2_com_err_cflags) -endif LOCAL_MODULE := libext2_com_err_host LOCAL_MODULE_TAGS := optional diff --git a/lib/ext2fs/Android.mk b/lib/ext2fs/Android.mk index 96f587c..192b362 100644 --- a/lib/ext2fs/Android.mk +++ b/lib/ext2fs/Android.mk @@ -22,6 +22,7 @@ libext2fs_src_files := \ closefs.c \ dblist.c \ dblist_dir.c \ + digest_encode.c \ dirblock.c \ dirhash.c \ dir_iterate.c \ @@ -65,6 +66,8 @@ libext2fs_src_files := \ read_bb_file.c \ res_gdt.c \ rw_bitmaps.c \ + sha256.c \ + sha512.c \ swapfs.c \ symlink.c \ tdb.c \ @@ -87,34 +90,7 @@ libext2fs_system_shared_libraries := libc libext2fs_c_includes := external/e2fsprogs/lib -libext2fs_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF - -libext2fs_cflags_linux := \ - -DHAVE_MALLOC_H=1 \ - -DHAVE_LINUX_FD_H=1 \ - -DHAVE_SYS_PRCTL_H=1 \ - -DHAVE_LSEEK64=1 \ - -DHAVE_LSEEK64_PROTOTYPE=1 +libext2fs_cflags := -O2 -g -W -Wall include $(CLEAR_VARS) @@ -122,7 +98,7 @@ LOCAL_SRC_FILES := $(libext2fs_src_files) LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2fs_system_shared_libraries) LOCAL_SHARED_LIBRARIES := $(libext2fs_shared_libraries) LOCAL_C_INCLUDES := $(libext2fs_c_includes) -LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux) +LOCAL_CFLAGS := $(libext2fs_cflags) LOCAL_MODULE := libext2fs LOCAL_MODULE_TAGS := optional @@ -133,11 +109,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext2fs_src_files) LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2fs_shared_libraries)) LOCAL_C_INCLUDES := $(libext2fs_c_includes) -ifeq ($(HOST_OS),linux) -LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux) -else LOCAL_CFLAGS := $(libext2fs_cflags) -endif LOCAL_MODULE := libext2fs_host LOCAL_MODULE_TAGS := optional diff --git a/lib/quota/Android.mk b/lib/quota/Android.mk index 888591b..1c724d9 100644 --- a/lib/quota/Android.mk +++ b/lib/quota/Android.mk @@ -9,31 +9,7 @@ libext2_quota_src_files := \ libext2_quota_c_includes := external/e2fsprogs/lib -libext2_quota_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +libext2_quota_cflags := -O2 -g -W -Wall libext2_quota_shared_libraries := libext2fs libext2_com_err diff --git a/lib/uuid/Android.mk b/lib/uuid/Android.mk index f895160..282a136 100644 --- a/lib/uuid/Android.mk +++ b/lib/uuid/Android.mk @@ -15,32 +15,7 @@ libext2_uuid_src_files := \ libext2_uuid_c_includes := external/e2fsprogs/lib -libext2_uuid_cflags := -O2 -g -W -Wall \ - -DHAVE_INTTYPES_H \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +libext2_uuid_cflags := -O2 -g -W -Wall libext2_uuid_system_shared_libraries := libc diff --git a/misc/Android.mk b/misc/Android.mk index b596b78..798ae86 100644 --- a/misc/Android.mk +++ b/misc/Android.mk @@ -14,37 +14,7 @@ mke2fs_c_includes := \ external/e2fsprogs/lib \ external/e2fsprogs/e2fsck -mke2fs_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRCASECMP \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_GETOPT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF - -mke2fs_cflags_linux := \ - -DHAVE_LINUX_FD_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE - -mke2fs_cflags += -DNO_CHECK_BB +mke2fs_cflags := -O2 -g -W -Wall mke2fs_shared_libraries := \ libext2fs \ @@ -61,7 +31,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(mke2fs_src_files) LOCAL_C_INCLUDES := $(mke2fs_c_includes) -LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux) +LOCAL_CFLAGS := $(mke2fs_cflags) LOCAL_SYSTEM_SHARED_LIBRARIES := $(mke2fs_system_shared_libraries) LOCAL_SHARED_LIBRARIES := $(mke2fs_shared_libraries) LOCAL_MODULE := mke2fs @@ -72,11 +42,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(mke2fs_src_files) LOCAL_C_INCLUDES := $(mke2fs_c_includes) -ifeq ($(HOST_OS),linux) -LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux) -else LOCAL_CFLAGS := $(mke2fs_cflags) -endif LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(mke2fs_shared_libraries)) LOCAL_MODULE := mke2fs_host LOCAL_MODULE_STEM := mke2fs @@ -96,35 +62,7 @@ tune2fs_c_includes := \ external/e2fsprogs/lib \ external/e2fsprogs/e2fsck -tune2fs_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRCASECMP \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_GETOPT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF - -tune2fs_cflags += -DNO_CHECK_BB +tune2fs_cflags := -O2 -g -W -Wall tune2fs_shared_libraries := \ libext2fs \ @@ -171,33 +109,7 @@ badblocks_src_files := \ badblocks_c_includes := \ external/e2fsprogs/lib -badblocks_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRCASECMP \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_GETOPT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +badblocks_cflags := -O2 -g -W -Wall badblocks_shared_libraries := \ libext2fs \ @@ -243,33 +155,7 @@ chattr_src_files := \ chattr_c_includes := \ external/e2fsprogs/lib -chattr_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRCASECMP \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_GETOPT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +chattr_cflags := -O2 -g -W -Wall chattr_shared_libraries := \ libext2_com_err \ @@ -312,33 +198,7 @@ lsattr_src_files := \ lsattr_c_includes := \ external/e2fsprogs/lib -lsattr_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRCASECMP \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_GETOPT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +lsattr_cflags := -O2 -g -W -Wall lsattr_shared_libraries := \ libext2_com_err \ @@ -381,34 +241,7 @@ blkid_src_files := \ blkid_c_includes := \ external/e2fsprogs/lib -blkid_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRCASECMP \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_GETOPT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF \ - -DHAVE_TERMIO_H +blkid_cflags := -O2 -g -W -Wall blkid_shared_libraries := \ libext2fs \ @@ -429,3 +262,40 @@ LOCAL_MODULE := blkid LOCAL_MODULE_TAGS := optional include $(BUILD_EXECUTABLE) + +######################################################################### +# Build e4crypt +e4crypt_src_files := e4crypt.c + +e4crypt_c_includes := \ + external/e2fsprogs/lib + +e4crypt_cflags := -O2 -g -W -Wall + +e4crypt_shared_libraries := libext2fs libext2_uuid + +e4crypt_system_shared_libraries := libc + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(e4crypt_src_files) +LOCAL_C_INCLUDES := $(e4crypt_c_includes) +LOCAL_CFLAGS := $(e4crypt_cflags) +LOCAL_SYSTEM_SHARED_LIBRARIES := $(e4crypt_system_shared_libraries) +LOCAL_SHARED_LIBRARIES := $(e4crypt_shared_libraries) +LOCAL_MODULE := e4crypt +LOCAL_MODULE_TAGS := optional +include $(BUILD_EXECUTABLE) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(e4crypt_src_files) +LOCAL_C_INCLUDES := $(e4crypt_c_includes) +LOCAL_CFLAGS := $(e4crypt_cflags) +LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(e4crypt_shared_libraries)) +LOCAL_MODULE := e4crypt_host +LOCAL_MODULE_STEM := e4crypt +LOCAL_MODULE_TAGS := optional + +include $(BUILD_HOST_EXECUTABLE) + diff --git a/resize/Android.mk b/resize/Android.mk index 41f9fe0..1cbd01e 100644 --- a/resize/Android.mk +++ b/resize/Android.mk @@ -10,31 +10,7 @@ resize2fs_src_files := \ resize2fs_c_includes := external/e2fsprogs/lib -resize2fs_cflags := -O2 -g -W -Wall \ - -DHAVE_UNISTD_H \ - -DHAVE_ERRNO_H \ - -DHAVE_NETINET_IN_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_MMAN_H \ - -DHAVE_SYS_MOUNT_H \ - -DHAVE_SYS_PRCTL_H \ - -DHAVE_SYS_RESOURCE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_STDLIB_H \ - -DHAVE_STRDUP \ - -DHAVE_MMAP \ - -DHAVE_UTIME_H \ - -DHAVE_GETPAGESIZE \ - -DHAVE_LSEEK64 \ - -DHAVE_LSEEK64_PROTOTYPE \ - -DHAVE_EXT2_IOCTLS \ - -DHAVE_LINUX_FD_H \ - -DHAVE_TYPE_SSIZE_T \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYSCONF +resize2fs_cflags := -O2 -g -W -Wall resize2fs_shared_libraries := \ libext2fs \ diff --git a/util/android_config.h b/util/android_config.h index f88c6d1..b348e07 100644 --- a/util/android_config.h +++ b/util/android_config.h @@ -5,3 +5,37 @@ #endif #define ROOT_SYSCONFDIR "/etc" + +#define DISABLE_BACKTRACE 1 +#define ENABLE_HTREE 1 +#define HAVE_DIRENT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_EXT2_IOCTLS 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_INTPTR_T 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LINUX_FD_H 1 +#define HAVE_LSEEK64 1 +#define HAVE_LSEEK64_PROTOTYPE 1 +#define HAVE_MMAP 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SETJMP_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRCASECMP 1 +#define HAVE_STRDUP 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_MOUNT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_PRCTL_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TERMIO_H 1 +#define HAVE_TYPE_SSIZE_T 1 +#define HAVE_UNISTD_H 1 +#define HAVE_UTIME_H 1 -- 1.8.3.1