Android.mk revision 4605b3fb8a00fa37f617a8d0fe3a095d0503a845
1# Copyright 2010 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4include $(CLEAR_VARS)
5
6libext4_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
23LOCAL_SRC_FILES := $(libext4_utils_src_files)
24LOCAL_MODULE := libext4_utils
25LOCAL_MODULE_TAGS := optional
26LOCAL_C_INCLUDES += external/zlib
27
28include $(BUILD_HOST_STATIC_LIBRARY)
29
30include $(CLEAR_VARS)
31
32LOCAL_SRC_FILES := make_ext4fs_main.c
33LOCAL_MODULE := make_ext4fs
34LOCAL_STATIC_LIBRARIES += libext4_utils libz
35ifeq ($(HOST_OS),windows)
36LOCAL_LDLIBS += -lws2_32
37endif
38
39include $(BUILD_HOST_EXECUTABLE)
40
41include $(CLEAR_VARS)
42
43# -- All host/targets excluding windows
44
45ifneq ($(HOST_OS),windows)
46
47LOCAL_SRC_FILES := $(libext4_utils_src_files)
48LOCAL_MODULE := libext4_utils
49LOCAL_MODULE_TAGS := optional
50LOCAL_C_INCLUDES += external/zlib
51LOCAL_SHARED_LIBRARIES := libz
52
53include $(BUILD_SHARED_LIBRARY)
54
55include $(CLEAR_VARS)
56
57LOCAL_SRC_FILES := $(libext4_utils_src_files)
58LOCAL_MODULE := libext4_utils
59LOCAL_MODULE_TAGS := optional
60LOCAL_C_INCLUDES += external/zlib
61
62include $(BUILD_STATIC_LIBRARY)
63
64include $(CLEAR_VARS)
65
66LOCAL_SRC_FILES := make_ext4fs_main.c
67LOCAL_MODULE := make_ext4fs
68LOCAL_MODULE_TAGS := optional
69LOCAL_SHARED_LIBRARIES += libext4_utils libz
70
71include $(BUILD_EXECUTABLE)
72
73include $(CLEAR_VARS)
74
75LOCAL_SRC_FILES := ext2simg.c
76LOCAL_MODULE := ext2simg
77LOCAL_MODULE_TAGS := optional
78LOCAL_SHARED_LIBRARIES += libext4_utils libz
79
80include $(BUILD_EXECUTABLE)
81
82include $(CLEAR_VARS)
83
84LOCAL_SRC_FILES := ext2simg.c
85LOCAL_MODULE := ext2simg
86LOCAL_MODULE_TAGS := optional
87LOCAL_STATIC_LIBRARIES += libext4_utils libz
88
89include $(BUILD_HOST_EXECUTABLE)
90
91include $(CLEAR_VARS)
92
93LOCAL_SRC_FILES := simg2img.c \
94	sparse_crc32.c
95LOCAL_MODULE := simg2img
96
97include $(BUILD_HOST_EXECUTABLE)
98
99include $(CLEAR_VARS)
100
101LOCAL_SRC_FILES := simg2img.c \
102	sparse_crc32.c
103LOCAL_MODULE := simg2img
104
105include $(BUILD_EXECUTABLE)
106
107ifeq ($(HOST_OS),linux)
108# Darwin doesn't have endian.h, and img2simg is just a convenience
109include $(CLEAR_VARS)
110
111LOCAL_SRC_FILES := img2simg.c
112LOCAL_MODULE := img2simg
113LOCAL_MODULE_TAGS := optional
114
115include $(BUILD_HOST_EXECUTABLE)
116endif
117
118include $(CLEAR_VARS)
119
120LOCAL_SRC_FILES := img2simg.c
121LOCAL_MODULE := img2simg
122LOCAL_MODULE_TAGS := optional
123
124include $(BUILD_EXECUTABLE)
125
126include $(CLEAR_VARS)
127LOCAL_SRC_FILES := setup_fs.c
128LOCAL_MODULE := setup_fs
129LOCAL_MODULE_TAGS := optional
130LOCAL_SHARED_LIBRARIES += libcutils
131include $(BUILD_EXECUTABLE)
132
133include $(CLEAR_VARS)
134
135LOCAL_SRC_FILES := ext4fixup_main.c
136LOCAL_MODULE := ext4fixup
137LOCAL_MODULE_TAGS := optional
138LOCAL_SHARED_LIBRARIES += libext4_utils libz
139
140include $(BUILD_EXECUTABLE)
141
142include $(CLEAR_VARS)
143
144LOCAL_SRC_FILES := ext4fixup_main.c
145LOCAL_MODULE := ext4fixup
146LOCAL_MODULE_TAGS := optional
147LOCAL_STATIC_LIBRARIES += libext4_utils libz
148
149include $(BUILD_HOST_EXECUTABLE)
150
151include $(CLEAR_VARS)
152
153LOCAL_MODULE := mkuserimg.sh
154LOCAL_SRC_FILES := mkuserimg.sh
155LOCAL_MODULE_CLASS := EXECUTABLES
156# We don't need any additional suffix.
157LOCAL_MODULE_SUFFIX :=
158LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
159LOCAL_IS_HOST_MODULE := true
160
161include $(BUILD_PREBUILT)
162
163include $(CLEAR_VARS)
164
165LOCAL_MODULE := simg_dump.py
166LOCAL_MODULE_TAGS := debug
167LOCAL_SRC_FILES := simg_dump.py
168LOCAL_MODULE_CLASS := EXECUTABLES
169LOCAL_IS_HOST_MODULE := true
170
171include $(BUILD_PREBUILT)
172
173endif
174