Whamcloud - gitweb
android: be able to build dumpe2fs, lsattr, and e2fsck statically
authorTheodore Ts'o <tytso@mit.edu>
Thu, 23 Jul 2015 16:46:42 +0000 (12:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 23 Jul 2015 16:46:42 +0000 (12:46 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/Android.mk
e2fsck/Android.mk
lib/ss/Android.mk
misc/Android.mk

index 80b5ec3..2200509 100644 (file)
@@ -40,6 +40,17 @@ debugfs_shared_libraries := \
 
 debugfs_system_shared_libraries := libc
 
+debugfs_static_libraries := \
+       libext2fs \
+       libext2_blkid \
+       libext2_uuid_static \
+       libext2_ss \
+       libext2_quota \
+       libext2_com_err \
+       libext2_e2p
+
+debugfs_system_static_libraries := libc
+
 debugfs_c_includes := \
        external/e2fsprogs/e2fsck \
        external/e2fsprogs/misc \
@@ -63,6 +74,17 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(debugfs_src_files)
 LOCAL_C_INCLUDES := $(debugfs_c_includes)
 LOCAL_CFLAGS := $(debugfs_cflags)
+LOCAL_STATIC_LIBRARIES := $(debugfs_static_libraries) $(debugfs_system_static_libraries)
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE := debugfs_static
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(debugfs_src_files)
+LOCAL_C_INCLUDES := $(debugfs_c_includes)
+LOCAL_CFLAGS := $(debugfs_cflags)
 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(debugfs_shared_libraries))
 LOCAL_MODULE := debugfs_host
 LOCAL_MODULE_STEM := debugfs
index 9726589..30f2d55 100644 (file)
@@ -39,8 +39,19 @@ e2fsck_shared_libraries := \
        libext2_quota \
        libext2_com_err \
        libext2_e2p
+
 e2fsck_system_shared_libraries := libc
 
+e2fsck_static_libraries := \
+       libext2fs \
+       libext2_blkid \
+       libext2_uuid_static \
+       libext2_quota \
+       libext2_com_err \
+       libext2_e2p
+
+e2fsck_system_static_libraries := libc
+
 e2fsck_c_includes := external/e2fsprogs/lib
 
 e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing
@@ -61,6 +72,18 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(e2fsck_src_files)
 LOCAL_C_INCLUDES := $(e2fsck_c_includes)
 LOCAL_CFLAGS := $(e2fsck_cflags)
+LOCAL_STATIC_LIBRARIES := $(e2fsck_static_libraries) $(e2fsck_system_static_libraries)
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE := e2fsck_static
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(e2fsck_src_files)
+LOCAL_C_INCLUDES := $(e2fsck_c_includes)
+LOCAL_CFLAGS := $(e2fsck_cflags)
 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(e2fsck_shared_libraries))
 LOCAL_MODULE := e2fsck_host
 LOCAL_MODULE_STEM := e2fsck
index 9231793..21e380f 100644 (file)
@@ -40,6 +40,18 @@ include $(BUILD_SHARED_LIBRARY)
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(libext2_ss_src_files)
+LOCAL_C_INCLUDES := $(libext2_ss_c_includes)
+LOCAL_CFLAGS := $(libext2_ss_cflags)
+LOCAL_STATIC_LIBRARIES := libc
+LOCAL_MODULE := libext2_ss
+LOCAL_MODULE_TAGS := optional
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_ss_src_files)
 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2_ss_shared_libraries))
 LOCAL_C_INCLUDES := $(libext2_ss_c_includes)
 LOCAL_CFLAGS := $(libext2_ss_cflags)
index 2ea323a..5ab5141 100644 (file)
@@ -237,6 +237,12 @@ lsattr_shared_libraries := \
 
 lsattr_system_shared_libraries := libc
 
+lsattr_static_libraries := \
+       libext2_com_err \
+       libext2_e2p
+
+lsattr_system_static_libraries := libc
+
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(lsattr_src_files)
@@ -254,6 +260,18 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(lsattr_src_files)
 LOCAL_C_INCLUDES := $(lsattr_c_includes)
 LOCAL_CFLAGS := $(lsattr_cflags)
+LOCAL_STATIC_LIBRARIES := $(lsattr_static_libraries) $(lsattr_system_static_libraries)
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE := lsattr_static
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(lsattr_src_files)
+LOCAL_C_INCLUDES := $(lsattr_c_includes)
+LOCAL_CFLAGS := $(lsattr_cflags)
 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(lsattr_shared_libraries))
 LOCAL_MODULE := lsattr_host
 LOCAL_MODULE_STEM := lsattr