OSDN Git Service

e2fsprogs: Rework build configuration
[android-x86/external-e2fsprogs.git] / misc / Android.mk
index e70591d..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,35 +68,10 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(mke2fs_src_files)
 LOCAL_C_INCLUDES := $(mke2fs_c_includes)
-LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux)
-LOCAL_STATIC_LIBRARIES := $(mke2fs_shared_libraries)
-LOCAL_STATIC_LIBRARIES += $(mke2fs_system_shared_libraries) libext2fs
-LOCAL_MODULE := recovery_mke2fs
+LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux) -Dmain=mke2fs_main
+LOCAL_MODULE := libmke2fs_static
 LOCAL_MODULE_TAGS := eng
-LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
-LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/recovery
-LOCAL_MODULE_STEM := mke2fs
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_PACK_MODULE_RELOCATIONS := false
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(mke2fs_src_files)
-LOCAL_C_INCLUDES := $(mke2fs_c_includes)
-LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux)
-LOCAL_STATIC_LIBRARIES := $(mke2fs_shared_libraries)
-LOCAL_STATIC_LIBRARIES += $(mke2fs_system_shared_libraries) libext2fs
-LOCAL_MODULE := utility_mke2fs
-LOCAL_MODULE_TAGS := eng
-LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
-LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
-LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
-LOCAL_MODULE_STEM := mke2fs
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_PACK_MODULE_RELOCATIONS := false
-include $(BUILD_EXECUTABLE)
+include $(BUILD_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
 
@@ -120,7 +94,6 @@ include $(BUILD_HOST_EXECUTABLE)
 #
 tune2fs_src_files := \
        tune2fs.c \
-       util.c
 
 tune2fs_c_includes := \
        external/e2fsprogs/lib \
@@ -193,23 +166,9 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(tune2fs_src_files)
 LOCAL_C_INCLUDES := $(tune2fs_c_includes)
-LOCAL_CFLAGS := $(tune2fs_cflags)
-LOCAL_STATIC_LIBRARIES := $(tune2fs_static_libraries) $(tune2fs_system_static_libraries)
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_MODULE := tune2fs_static
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(tune2fs_src_files)
-LOCAL_C_INCLUDES := $(tune2fs_c_includes)
-LOCAL_CFLAGS := $(tune2fs_cflags) -DBUILD_AS_LIB
-LOCAL_STATIC_LIBRARIES := $(tune2fs_static_libraries) $(tune2fs_system_static_libraries)
+LOCAL_CFLAGS := $(tune2fs_cflags) -Dmain="tune2fs_main"
 LOCAL_MODULE := libtune2fs
 LOCAL_MODULE_TAGS := optional
-
 include $(BUILD_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -217,38 +176,6 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(tune2fs_src_files)
 LOCAL_C_INCLUDES := $(tune2fs_c_includes)
 LOCAL_CFLAGS := $(tune2fs_cflags)
-LOCAL_STATIC_LIBRARIES := $(tune2fs_shared_libraries) $(tune2fs_system_shared_libraries) libext2fs
-LOCAL_MODULE := utility_tune2fs
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
-LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
-LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
-LOCAL_MODULE_STEM := tune2fs
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_PACK_MODULE_RELOCATIONS := false
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(tune2fs_src_files)
-LOCAL_C_INCLUDES := $(tune2fs_c_includes)
-LOCAL_CFLAGS := $(tune2fs_cflags)
-LOCAL_STATIC_LIBRARIES := $(tune2fs_shared_libraries) $(tune2fs_system_shared_libraries) libext2fs
-LOCAL_MODULE := recovery_tune2fs
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
-LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/recovery
-LOCAL_MODULE_STEM := tune2fs
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_PACK_MODULE_RELOCATIONS := false
-include $(BUILD_EXECUTABLE)
-
-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
 LOCAL_MODULE_STEM := tune2fs