diff options
author | Alex Deymo <deymo@google.com> | 2015-09-02 19:07:46 -0700 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2015-11-16 10:49:10 -0800 |
commit | a87fa1b351938a2f8dc47bed1012beead0fa25fd (patch) | |
tree | 82285edf2b3e0a847196611db753d8144067b99b | |
parent | 939e1c9c5f14884e16e31e3f57aaaa796aab26d9 (diff) | |
download | e2fsprogs-a87fa1b351938a2f8dc47bed1012beead0fa25fd.tar.gz |
libext2fs: Export the library include path.
When adding 'libext2fs' as a library dependency from any other binary,
the binary needs to find the library headers. Users of this library
should not hard-code the include path themselves. This patch exports the
library headers on all three version of the libext2fs library and
removes the redundant include path from executables in e2fsprogs.
Bug: b/23084776
TEST=mma
Change-Id: Idfbfcd2b671a9cddd08c322bc916a5efcc3cffe1
(cherry picked from commit 941ca9e47429b8e0ee86b7b72ca0a107ddc09d22)
-rw-r--r-- | e2fsck/Android.mk | 6 | ||||
-rw-r--r-- | lib/ext2fs/Android.mk | 3 | ||||
-rw-r--r-- | misc/Android.mk | 18 |
3 files changed, 13 insertions, 14 deletions
diff --git a/e2fsck/Android.mk b/e2fsck/Android.mk index b4b2aef9..afae91fa 100644 --- a/e2fsck/Android.mk +++ b/e2fsck/Android.mk @@ -37,7 +37,7 @@ libext2_profile_cflags := -O2 -g -W -Wall \ -DHAVE_LINUX_FD_H \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF \ -DDISABLE_BACKTRACE=1 @@ -106,7 +106,7 @@ e2fsck_shared_libraries := \ libext2_e2p e2fsck_system_shared_libraries := libc -e2fsck_c_includes := external/e2fsprogs/lib +e2fsck_c_includes := e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing \ -DHAVE_DIRENT_H \ @@ -136,7 +136,7 @@ e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing \ -DHAVE_INTPTR_T \ -DENABLE_HTREE=1 \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF \ -DDISABLE_BACKTRACE=1 diff --git a/lib/ext2fs/Android.mk b/lib/ext2fs/Android.mk index 467ca7e0..4755ade9 100644 --- a/lib/ext2fs/Android.mk +++ b/lib/ext2fs/Android.mk @@ -124,6 +124,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_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes) LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux) LOCAL_MODULE := libext2fs LOCAL_MODULE_TAGS := optional @@ -135,6 +136,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext2fs_src_files) LOCAL_STATIC_LIBRARIES := $(libext2fs_static_libraries) $(libext2fs_system_static_libraries) LOCAL_C_INCLUDES := $(libext2fs_c_includes) +LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes) LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux) LOCAL_MODULE := libext2fs LOCAL_MODULE_TAGS := optional @@ -146,6 +148,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext2fs_src_files) LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2fs_shared_libraries)) LOCAL_C_INCLUDES := $(libext2fs_c_includes) +LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes) ifeq ($(HOST_OS),linux) LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux) else diff --git a/misc/Android.mk b/misc/Android.mk index 645fc9cc..b5af5c23 100644 --- a/misc/Android.mk +++ b/misc/Android.mk @@ -8,7 +8,6 @@ mke2fs_src_files := \ default_profile.c mke2fs_c_includes := \ - external/e2fsprogs/lib \ external/e2fsprogs/e2fsck mke2fs_cflags := -O2 -g -W -Wall \ @@ -32,7 +31,7 @@ mke2fs_cflags := -O2 -g -W -Wall \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_GETOPT_H \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF mke2fs_cflags_linux := \ @@ -89,7 +88,6 @@ tune2fs_src_files := \ util.c tune2fs_c_includes := \ - external/e2fsprogs/lib \ external/e2fsprogs/e2fsck tune2fs_cflags := -O2 -g -W -Wall \ @@ -117,7 +115,7 @@ tune2fs_cflags := -O2 -g -W -Wall \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_GETOPT_H \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF tune2fs_cflags += -DNO_CHECK_BB @@ -198,8 +196,7 @@ include $(CLEAR_VARS) badblocks_src_files := \ badblocks.c -badblocks_c_includes := \ - external/e2fsprogs/lib +badblocks_c_includes := badblocks_cflags := -O2 -g -W -Wall \ -DHAVE_UNISTD_H \ @@ -226,7 +223,7 @@ badblocks_cflags := -O2 -g -W -Wall \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_GETOPT_H \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF badblocks_shared_libraries := \ @@ -298,7 +295,7 @@ chattr_cflags := -O2 -g -W -Wall \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_GETOPT_H \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF chattr_shared_libraries := \ @@ -367,7 +364,7 @@ lsattr_cflags := -O2 -g -W -Wall \ -DHAVE_TYPE_SSIZE_T \ -DHAVE_GETOPT_H \ -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_PARAM_H \ + -DHAVE_SYS_PARAM_H \ -DHAVE_SYSCONF lsattr_shared_libraries := \ @@ -408,8 +405,7 @@ include $(CLEAR_VARS) blkid_src_files := \ blkid.c -blkid_c_includes := \ - external/e2fsprogs/lib +blkid_c_includes := blkid_cflags := -O2 -g -W -Wall \ -DHAVE_UNISTD_H \ |