1 # Build file for libsparse and associated executables. 2 3 # Update LOCAL_PATH after saving old value. 4 LIBSPARSE_OLD_LOCAL_PATH := $(LOCAL_PATH) 5 LOCAL_PATH := $(call my-dir) 6 7 LIBSPARSE_SOURCES := \ 8 src/backed_block.c \ 9 src/output_file.c \ 10 src/sparse.c \ 11 src/sparse_crc32.c \ 12 src/sparse_err.c \ 13 src/sparse_read.c \ 14 15 LIBSPARSE_INCLUDES := $(LOCAL_PATH)/include $(ZLIB_INCLUDES) 16 17 ifeq (windows,$(HOST_OS)) 18 LIBSPARSE_CFLAGS := -DUSE_MINGW=1 19 endif 20 21 $(call start-emulator-library,emulator-libsparse) 22 LOCAL_SRC_FILES := $(LIBSPARSE_SOURCES) 23 LOCAL_C_INCLUDES := $(LIBSPARSE_INCLUDES) $(LOCAL_PATH)/src 24 LOCAL_CFLAGS := $(LIBSPARSE_CFLAGS) 25 $(call end-emulator-library) 26 27 $(call start-emulator64-library,emulator64-libsparse) 28 LOCAL_SRC_FILES := $(LIBSPARSE_SOURCES) 29 LOCAL_C_INCLUDES := $(LIBSPARSE_INCLUDES) $(LOCAL_PATH)/src 30 LOCAL_CFLAGS := $(LIBSPARSE_CFLAGS) 31 $(call end-emulator-library) 32 33 $(call start-emulator-program,emulator_img2simg) 34 LOCAL_SRC_FILES := src/img2simg.c 35 LOCAL_C_INCLUDES := $(LIBSPARSE_INCLUDES) 36 LOCAL_STATIC_LIBRARIES := emulator-libsparse emulator-zlib 37 $(call end-emulator-program) 38 39 $(call start-emulator-program,emulator_simg2img) 40 LOCAL_SRC_FILES := src/simg2img.c 41 LOCAL_C_INCLUDES := $(LIBSPARSE_INCLUDES) 42 LOCAL_STATIC_LIBRARIES := emulator-libsparse emulator-zlib 43 $(call end-emulator-program) 44 45 $(call start-emulator64-program,emulator64_img2simg) 46 LOCAL_SRC_FILES := src/img2simg.c 47 LOCAL_C_INCLUDES := $(LIBSPARSE_INCLUDES) 48 LOCAL_STATIC_LIBRARIES := emulator64-libsparse emulator64-zlib 49 #$(call end-emulator-program) 50 51 $(call start-emulator64-program,emulator64_simg2img) 52 LOCAL_SRC_FILES := src/simg2img.c 53 LOCAL_C_INCLUDES := $(LIBSPARSE_INCLUDES) 54 LOCAL_STATIC_LIBRARIES := emulator64-libsparse emulator64-zlib 55 #$(call end-emulator-program) 56 57 # Reset LOCAL_PATH before exiting this build file. 58 LOCAL_PATH := $(LIBSPARSE_OLD_LOCAL_PATH) 59