1 # Copyright 2010 The Android Open Source Project 2 3 LOCAL_PATH:= $(call my-dir) 4 include $(CLEAR_VARS) 5 6 libext4_utils_src_files := \ 7 make_ext4fs.c \ 8 ext4fixup.c \ 9 ext4_utils.c \ 10 allocate.c \ 11 backed_block.c \ 12 output_file.c \ 13 contents.c \ 14 extent.c \ 15 indirect.c \ 16 uuid.c \ 17 sha1.c \ 18 sparse_crc32.c \ 19 wipe.c 20 21 # -- All host/targets including windows 22 23 LOCAL_SRC_FILES := $(libext4_utils_src_files) 24 LOCAL_MODULE := libext4_utils 25 LOCAL_MODULE_TAGS := optional 26 LOCAL_C_INCLUDES += external/zlib 27 28 ifeq ($(HAVE_SELINUX), true) 29 LOCAL_C_INCLUDES += external/libselinux/include 30 LOCAL_STATIC_LIBRARIES += libselinux 31 LOCAL_CFLAGS += -DHAVE_SELINUX 32 endif # HAVE_SELINUX 33 34 include $(BUILD_HOST_STATIC_LIBRARY) 35 36 include $(CLEAR_VARS) 37 38 LOCAL_SRC_FILES := make_ext4fs_main.c 39 LOCAL_MODULE := make_ext4fs 40 LOCAL_STATIC_LIBRARIES += libext4_utils libz 41 ifeq ($(HOST_OS),windows) 42 LOCAL_LDLIBS += -lws2_32 43 else 44 ifeq ($(HAVE_SELINUX), true) 45 LOCAL_STATIC_LIBRARIES += libselinux 46 endif # HAVE_SELINUX 47 endif 48 49 include $(BUILD_HOST_EXECUTABLE) 50 51 include $(CLEAR_VARS) 52 53 # -- All host/targets excluding windows 54 55 ifneq ($(HOST_OS),windows) 56 57 LOCAL_SRC_FILES := $(libext4_utils_src_files) 58 LOCAL_MODULE := libext4_utils 59 LOCAL_MODULE_TAGS := optional 60 LOCAL_C_INCLUDES += external/zlib 61 LOCAL_SHARED_LIBRARIES := libz 62 63 ifeq ($(HAVE_SELINUX), true) 64 LOCAL_C_INCLUDES += external/libselinux/include 65 LOCAL_SHARED_LIBRARIES += libselinux 66 LOCAL_CFLAGS += -DHAVE_SELINUX 67 endif # HAVE_SELINUX 68 69 include $(BUILD_SHARED_LIBRARY) 70 71 include $(CLEAR_VARS) 72 73 LOCAL_SRC_FILES := $(libext4_utils_src_files) 74 LOCAL_MODULE := libext4_utils 75 LOCAL_MODULE_TAGS := optional 76 LOCAL_C_INCLUDES += external/zlib 77 78 ifeq ($(HAVE_SELINUX), true) 79 LOCAL_C_INCLUDES += external/libselinux/include 80 LOCAL_STATIC_LIBRARIES += libselinux 81 LOCAL_CFLAGS += -DHAVE_SELINUX 82 endif # HAVE_SELINUX 83 84 include $(BUILD_STATIC_LIBRARY) 85 86 include $(CLEAR_VARS) 87 88 LOCAL_SRC_FILES := make_ext4fs_main.c 89 LOCAL_MODULE := make_ext4fs 90 LOCAL_MODULE_TAGS := optional 91 LOCAL_SHARED_LIBRARIES += libext4_utils libz 92 93 ifeq ($(HAVE_SELINUX), true) 94 LOCAL_C_INCLUDES += external/libselinux/include 95 LOCAL_SHARED_LIBRARIES += libselinux 96 LOCAL_CFLAGS += -DHAVE_SELINUX 97 endif # HAVE_SELINUX 98 99 include $(BUILD_EXECUTABLE) 100 101 include $(CLEAR_VARS) 102 103 LOCAL_SRC_FILES := ext2simg.c 104 LOCAL_MODULE := ext2simg 105 LOCAL_MODULE_TAGS := optional 106 LOCAL_SHARED_LIBRARIES += libext4_utils libz 107 108 ifeq ($(HAVE_SELINUX), true) 109 LOCAL_C_INCLUDES += external/libselinux/include 110 LOCAL_SHARED_LIBRARIES += libselinux 111 LOCAL_CFLAGS += -DHAVE_SELINUX 112 endif # HAVE_SELINUX 113 114 include $(BUILD_EXECUTABLE) 115 116 include $(CLEAR_VARS) 117 118 LOCAL_SRC_FILES := ext2simg.c 119 LOCAL_MODULE := ext2simg 120 LOCAL_MODULE_TAGS := optional 121 LOCAL_STATIC_LIBRARIES += libext4_utils libz 122 123 ifeq ($(HAVE_SELINUX), true) 124 LOCAL_C_INCLUDES += external/libselinux/include 125 LOCAL_STATIC_LIBRARIES += libselinux 126 LOCAL_CFLAGS += -DHAVE_SELINUX 127 endif # HAVE_SELINUX 128 129 include $(BUILD_HOST_EXECUTABLE) 130 131 include $(CLEAR_VARS) 132 133 LOCAL_SRC_FILES := simg2img.c \ 134 sparse_crc32.c 135 LOCAL_MODULE := simg2img 136 LOCAL_MODULE_TAGS := debug 137 138 include $(BUILD_HOST_EXECUTABLE) 139 140 include $(CLEAR_VARS) 141 142 LOCAL_SRC_FILES := simg2img.c \ 143 sparse_crc32.c 144 LOCAL_MODULE := simg2img 145 LOCAL_MODULE_TAGS := optional 146 147 include $(BUILD_EXECUTABLE) 148 149 include $(CLEAR_VARS) 150 151 LOCAL_SRC_FILES := img2simg.c 152 LOCAL_MODULE := img2simg 153 LOCAL_MODULE_TAGS := debug 154 155 include $(BUILD_HOST_EXECUTABLE) 156 157 include $(CLEAR_VARS) 158 159 LOCAL_SRC_FILES := img2simg.c 160 LOCAL_MODULE := img2simg 161 LOCAL_MODULE_TAGS := optional 162 163 include $(BUILD_EXECUTABLE) 164 165 include $(CLEAR_VARS) 166 LOCAL_SRC_FILES := setup_fs.c 167 LOCAL_MODULE := setup_fs 168 LOCAL_MODULE_TAGS := optional 169 LOCAL_SHARED_LIBRARIES += libcutils 170 include $(BUILD_EXECUTABLE) 171 172 include $(CLEAR_VARS) 173 174 LOCAL_SRC_FILES := ext4fixup_main.c 175 LOCAL_MODULE := ext4fixup 176 LOCAL_MODULE_TAGS := optional 177 LOCAL_SHARED_LIBRARIES += libext4_utils libz 178 179 include $(BUILD_EXECUTABLE) 180 181 include $(CLEAR_VARS) 182 183 LOCAL_SRC_FILES := ext4fixup_main.c 184 LOCAL_MODULE := ext4fixup 185 LOCAL_MODULE_TAGS := optional 186 LOCAL_STATIC_LIBRARIES += libext4_utils libz 187 188 include $(BUILD_HOST_EXECUTABLE) 189 190 include $(CLEAR_VARS) 191 192 LOCAL_MODULE := mkuserimg.sh 193 LOCAL_SRC_FILES := mkuserimg.sh 194 LOCAL_MODULE_CLASS := EXECUTABLES 195 # We don't need any additional suffix. 196 LOCAL_MODULE_SUFFIX := 197 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES)) 198 LOCAL_IS_HOST_MODULE := true 199 200 include $(BUILD_PREBUILT) 201 202 include $(CLEAR_VARS) 203 204 LOCAL_MODULE := simg_dump.py 205 LOCAL_MODULE_TAGS := debug 206 LOCAL_SRC_FILES := simg_dump.py 207 LOCAL_MODULE_CLASS := EXECUTABLES 208 LOCAL_IS_HOST_MODULE := true 209 210 include $(BUILD_PREBUILT) 211 212 endif 213