summaryrefslogtreecommitdiffstats
path: root/libsparse/Android.mk
blob: 0abe33d490baff8114b5e38cbbf41499e2ce35ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Copyright 2010 The Android Open Source Project

LOCAL_PATH:= $(call my-dir)

libsparse_src_files := \
        backed_block.c \
        output_file.c \
        sparse.c \
        sparse_crc32.c \
        sparse_err.c \
        sparse_read.c


include $(CLEAR_VARS)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := $(libsparse_src_files)
LOCAL_MODULE := libsparse_host
LOCAL_STATIC_LIBRARIES := libz
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include external/zlib
LOCAL_CFLAGS := -Werror
include $(BUILD_HOST_STATIC_LIBRARY)


include $(CLEAR_VARS)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := $(libsparse_src_files)
LOCAL_MODULE := libsparse
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include external/zlib
LOCAL_SHARED_LIBRARIES := \
    libz
LOCAL_CFLAGS := -Werror
include $(BUILD_SHARED_LIBRARY)


include $(CLEAR_VARS)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := $(libsparse_src_files)
LOCAL_MODULE := libsparse_static
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include external/zlib
LOCAL_STATIC_LIBRARIES := libz
LOCAL_CFLAGS := -Werror
include $(BUILD_STATIC_LIBRARY)


include $(CLEAR_VARS)
LOCAL_SRC_FILES := simg2img.c \
	sparse_crc32.c
LOCAL_MODULE := simg2img_host
# Need a unique module name, but exe should still be called simg2img
LOCAL_MODULE_STEM := simg2img
LOCAL_STATIC_LIBRARIES := \
    libsparse_host \
    libz
LOCAL_CFLAGS := -Werror
include $(BUILD_HOST_EXECUTABLE)


include $(CLEAR_VARS)
LOCAL_SRC_FILES := simg2img.c \
	sparse_crc32.c
LOCAL_MODULE := simg2img
LOCAL_STATIC_LIBRARIES := \
    libsparse_static \
    libz
LOCAL_CFLAGS := -Werror
include $(BUILD_EXECUTABLE)


include $(CLEAR_VARS)
LOCAL_SRC_FILES := img2simg.c
LOCAL_MODULE := img2simg_host
# Need a unique module name, but exe should still be called simg2img
LOCAL_MODULE_STEM := img2simg
LOCAL_STATIC_LIBRARIES := \
    libsparse_host \
    libz
LOCAL_CFLAGS := -Werror
include $(BUILD_HOST_EXECUTABLE)


include $(CLEAR_VARS)
LOCAL_SRC_FILES := img2simg.c
LOCAL_MODULE := img2simg
LOCAL_STATIC_LIBRARIES := \
    libsparse_static \
    libz
LOCAL_CFLAGS := -Werror
include $(BUILD_EXECUTABLE)


ifneq ($(HOST_OS),windows)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := append2simg.c
LOCAL_MODULE := append2simg
LOCAL_STATIC_LIBRARIES := \
    libsparse_host \
    libz
LOCAL_CFLAGS := -Werror
include $(BUILD_HOST_EXECUTABLE)

endif

include $(CLEAR_VARS)
LOCAL_MODULE := simg_dump.py
LOCAL_SRC_FILES := simg_dump.py
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_IS_HOST_MODULE := true
LOCAL_CFLAGS := -Werror
include $(BUILD_PREBUILT)