1 # Copyright 2010 The Android Open Source Project 2 3 LOCAL_PATH:= $(call my-dir) 4 5 libext4_utils_src_files := \ 6 make_ext4fs.c \ 7 ext4fixup.c \ 8 ext4_utils.c \ 9 allocate.c \ 10 contents.c \ 11 extent.c \ 12 indirect.c \ 13 uuid.c \ 14 sha1.c \ 15 wipe.c \ 16 crc16.c \ 17 ext4_sb.c 18 19 # 20 # -- All host/targets including windows 21 # 22 23 include $(CLEAR_VARS) 24 LOCAL_SRC_FILES := $(libext4_utils_src_files) 25 LOCAL_MODULE := libext4_utils_host 26 LOCAL_STATIC_LIBRARIES := \ 27 libsparse_host \ 28 libz 29 ifneq ($(HOST_OS),windows) 30 LOCAL_STATIC_LIBRARIES += libselinux 31 endif 32 include $(BUILD_HOST_STATIC_LIBRARY) 33 34 35 include $(CLEAR_VARS) 36 LOCAL_SRC_FILES := make_ext4fs_main.c 37 LOCAL_MODULE := make_ext4fs 38 LOCAL_STATIC_LIBRARIES += \ 39 libext4_utils_host \ 40 libsparse_host \ 41 libz 42 ifeq ($(HOST_OS),windows) 43 LOCAL_LDLIBS += -lws2_32 44 else 45 LOCAL_STATIC_LIBRARIES += libselinux 46 LOCAL_CFLAGS := -DHOST 47 endif 48 include $(BUILD_HOST_EXECUTABLE) 49 50 51 # 52 # -- All host/targets excluding windows 53 # 54 55 ifneq ($(HOST_OS),windows) 56 57 include $(CLEAR_VARS) 58 LOCAL_SRC_FILES := $(libext4_utils_src_files) 59 LOCAL_MODULE := libext4_utils 60 LOCAL_SHARED_LIBRARIES := \ 61 libselinux \ 62 libsparse \ 63 libz 64 include $(BUILD_SHARED_LIBRARY) 65 66 67 include $(CLEAR_VARS) 68 LOCAL_SRC_FILES := $(libext4_utils_src_files) 69 LOCAL_MODULE := libext4_utils_static 70 LOCAL_STATIC_LIBRARIES += \ 71 libselinux \ 72 libsparse_static 73 include $(BUILD_STATIC_LIBRARY) 74 75 76 include $(CLEAR_VARS) 77 LOCAL_SRC_FILES := make_ext4fs_main.c 78 LOCAL_MODULE := make_ext4fs 79 LOCAL_SHARED_LIBRARIES := \ 80 libext4_utils \ 81 libselinux \ 82 libz 83 include $(BUILD_EXECUTABLE) 84 85 86 include $(CLEAR_VARS) 87 LOCAL_SRC_FILES := ext2simg.c 88 LOCAL_MODULE := ext2simg 89 LOCAL_SHARED_LIBRARIES += \ 90 libext4_utils \ 91 libselinux \ 92 libsparse \ 93 libz 94 include $(BUILD_EXECUTABLE) 95 96 97 include $(CLEAR_VARS) 98 LOCAL_SRC_FILES := ext2simg.c 99 LOCAL_MODULE := ext2simg 100 LOCAL_STATIC_LIBRARIES += \ 101 libext4_utils_host \ 102 libselinux \ 103 libsparse_host \ 104 libz 105 include $(BUILD_HOST_EXECUTABLE) 106 107 108 include $(CLEAR_VARS) 109 LOCAL_SRC_FILES := setup_fs.c 110 LOCAL_MODULE := setup_fs 111 LOCAL_SHARED_LIBRARIES += libcutils 112 include $(BUILD_EXECUTABLE) 113 114 115 include $(CLEAR_VARS) 116 LOCAL_SRC_FILES := ext4fixup_main.c 117 LOCAL_MODULE := ext4fixup 118 LOCAL_SHARED_LIBRARIES += \ 119 libext4_utils \ 120 libsparse \ 121 libz 122 include $(BUILD_EXECUTABLE) 123 124 125 include $(CLEAR_VARS) 126 LOCAL_SRC_FILES := ext4fixup_main.c 127 LOCAL_MODULE := ext4fixup 128 LOCAL_STATIC_LIBRARIES += \ 129 libext4_utils_host \ 130 libsparse_host \ 131 libz 132 include $(BUILD_HOST_EXECUTABLE) 133 134 135 include $(CLEAR_VARS) 136 LOCAL_MODULE := mkuserimg.sh 137 LOCAL_SRC_FILES := mkuserimg.sh 138 LOCAL_MODULE_CLASS := EXECUTABLES 139 # We don't need any additional suffix. 140 LOCAL_MODULE_SUFFIX := 141 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES)) 142 LOCAL_IS_HOST_MODULE := true 143 include $(BUILD_PREBUILT) 144 145 endif 146 147