OSDN Git Service

e2fsprogs: Rework build configuration
[android-x86/external-e2fsprogs.git] / misc / Android.mk
index 2a50e63..3cba7c4 100644 (file)
@@ -4,7 +4,6 @@ LOCAL_PATH := $(call my-dir)
 # Build mke2fs
 mke2fs_src_files := \
        mke2fs.c \
-       util.c \
        default_profile.c
 
 mke2fs_c_includes := \
@@ -69,6 +68,15 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(mke2fs_src_files)
 LOCAL_C_INCLUDES := $(mke2fs_c_includes)
+LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux) -Dmain=mke2fs_main
+LOCAL_MODULE := libmke2fs_static
+LOCAL_MODULE_TAGS := eng
+include $(BUILD_STATIC_LIBRARY)
+
+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
@@ -86,7 +94,6 @@ include $(BUILD_HOST_EXECUTABLE)
 #
 tune2fs_src_files := \
        tune2fs.c \
-       util.c
 
 tune2fs_c_includes := \
        external/e2fsprogs/lib \
@@ -132,6 +139,17 @@ tune2fs_shared_libraries := \
 
 tune2fs_system_shared_libraries := libc
 
+
+tune2fs_static_libraries := \
+       libext2_com_err \
+       libext2_blkid \
+       libext2_quota \
+       libext2_uuid_static \
+       libext2_e2p \
+       libext2fs
+
+tune2fs_system_static_libraries := libc
+
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(tune2fs_src_files)
@@ -148,6 +166,15 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(tune2fs_src_files)
 LOCAL_C_INCLUDES := $(tune2fs_c_includes)
+LOCAL_CFLAGS := $(tune2fs_cflags) -Dmain="tune2fs_main"
+LOCAL_MODULE := libtune2fs
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(tune2fs_src_files)
+LOCAL_C_INCLUDES := $(tune2fs_c_includes)
 LOCAL_CFLAGS := $(tune2fs_cflags)
 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(tune2fs_shared_libraries))
 LOCAL_MODULE := tune2fs_host
@@ -377,7 +404,7 @@ blkid_src_files := \
 blkid_c_includes := \
     external/e2fsprogs/lib
 
-lsattr_cflags := -O2 -g -W -Wall \
+blkid_cflags := -O2 -g -W -Wall \
     -DHAVE_UNISTD_H \
     -DHAVE_ERRNO_H \
     -DHAVE_NETINET_IN_H \
@@ -403,7 +430,8 @@ lsattr_cflags := -O2 -g -W -Wall \
     -DHAVE_GETOPT_H \
     -DHAVE_SYS_TIME_H \
     -DHAVE_SYS_PARAM_H \
-    -DHAVE_SYSCONF
+    -DHAVE_SYSCONF \
+    -DHAVE_TERMIO_H
 
 blkid_shared_libraries := \
     libext2fs \