diff options
author | Raphael Moll <raphael@google.com> | 2012-02-03 23:02:33 -0800 |
---|---|---|
committer | Raphael Moll <raphael@google.com> | 2012-02-16 13:15:04 -0800 |
commit | 4605b3fb8a00fa37f617a8d0fe3a095d0503a845 (patch) | |
tree | 648c0e8c3df25c4139cebb442c905b4ddc8ef99a /ext4_utils/Android.mk | |
parent | 3ee934fecdf8148ed5ea499932aedcca7530830c (diff) | |
download | extras-4605b3fb8a00fa37f617a8d0fe3a095d0503a845.tar.gz |
Adapt ext4_utils for windows.
This is not a full port of ext4_utils for windows.
Instead it merely enables use to use the library
for the 'create an empty fs image' functionality
as used by 'fastboot format'.
Change-Id: Ia1ffacd64e4233c4fbb369c4ac5927ccd72ac526
Diffstat (limited to 'ext4_utils/Android.mk')
-rw-r--r-- | ext4_utils/Android.mk | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/ext4_utils/Android.mk b/ext4_utils/Android.mk index 9b0dc1b5..f09197c6 100644 --- a/ext4_utils/Android.mk +++ b/ext4_utils/Android.mk @@ -4,7 +4,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) libext4_utils_src_files := \ - make_ext4fs.c \ + make_ext4fs.c \ ext4fixup.c \ ext4_utils.c \ allocate.c \ @@ -15,34 +15,51 @@ libext4_utils_src_files := \ indirect.c \ uuid.c \ sha1.c \ - sparse_crc32.c \ - wipe.c + sparse_crc32.c \ + wipe.c + +# -- All host/targets including windows LOCAL_SRC_FILES := $(libext4_utils_src_files) LOCAL_MODULE := libext4_utils LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES += external/zlib -LOCAL_SHARED_LIBRARIES := libz +include $(BUILD_HOST_STATIC_LIBRARY) -include $(BUILD_SHARED_LIBRARY) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := make_ext4fs_main.c +LOCAL_MODULE := make_ext4fs +LOCAL_STATIC_LIBRARIES += libext4_utils libz +ifeq ($(HOST_OS),windows) +LOCAL_LDLIBS += -lws2_32 +endif + +include $(BUILD_HOST_EXECUTABLE) include $(CLEAR_VARS) +# -- All host/targets excluding windows + +ifneq ($(HOST_OS),windows) + LOCAL_SRC_FILES := $(libext4_utils_src_files) LOCAL_MODULE := libext4_utils LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES += external/zlib +LOCAL_SHARED_LIBRARIES := libz -include $(BUILD_STATIC_LIBRARY) +include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext4_utils_src_files) LOCAL_MODULE := libext4_utils LOCAL_MODULE_TAGS := optional +LOCAL_C_INCLUDES += external/zlib -include $(BUILD_HOST_STATIC_LIBRARY) +include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) @@ -55,14 +72,6 @@ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) -LOCAL_SRC_FILES := make_ext4fs_main.c -LOCAL_MODULE := make_ext4fs -LOCAL_STATIC_LIBRARIES += libext4_utils libz - -include $(BUILD_HOST_EXECUTABLE) - -include $(CLEAR_VARS) - LOCAL_SRC_FILES := ext2simg.c LOCAL_MODULE := ext2simg LOCAL_MODULE_TAGS := optional @@ -160,3 +169,5 @@ LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_IS_HOST_MODULE := true include $(BUILD_PREBUILT) + +endif |