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