OSDN Git Service

Merge "Simpleperf: add --max-stack and --percent-limit options for report cmd."
[android-x86/system-extras.git] / ext4_utils / Android.mk
1 # Copyright 2010 The Android Open Source Project
2
3 LOCAL_PATH:= $(call my-dir)
4
5 libext4_utils_src_files := \
6     make_ext4fs.c \
7     ext4fixup.c \
8     ext4_utils.c \
9     allocate.c \
10     contents.c \
11     extent.c \
12     indirect.c \
13     sha1.c \
14     wipe.c \
15     crc16.c \
16     ext4_sb.c
17
18 #
19 # -- All host/targets including windows
20 #
21
22 include $(CLEAR_VARS)
23 LOCAL_SRC_FILES := $(libext4_utils_src_files)
24 LOCAL_MODULE := libext4_utils_host
25 # Various instances of dereferencing a type-punned pointer in extent.c
26 LOCAL_CFLAGS += -fno-strict-aliasing
27 LOCAL_C_INCLUDES := \
28     $(LOCAL_PATH)/include
29 LOCAL_EXPORT_C_INCLUDE_DIRS := \
30     $(LOCAL_PATH)/include
31 LOCAL_STATIC_LIBRARIES := \
32     libsparse_host \
33     libz
34 LOCAL_STATIC_LIBRARIES_darwin += libselinux
35 LOCAL_STATIC_LIBRARIES_linux += libselinux
36 LOCAL_MODULE_HOST_OS := darwin linux windows
37 include $(BUILD_HOST_STATIC_LIBRARY)
38
39
40 include $(CLEAR_VARS)
41 LOCAL_SRC_FILES := make_ext4fs_main.c
42 LOCAL_MODULE := make_ext4fs
43 LOCAL_C_INCLUDES := \
44     $(LOCAL_PATH)/include
45 LOCAL_SHARED_LIBRARIES += libcutils
46 LOCAL_STATIC_LIBRARIES += \
47     libext4_utils_host \
48     libsparse_host \
49     libz
50 LOCAL_LDLIBS_windows += -lws2_32
51 LOCAL_SHARED_LIBRARIES_darwin += libselinux
52 LOCAL_SHARED_LIBRARIES_linux += libselinux
53 LOCAL_CFLAGS_darwin := -DHOST
54 LOCAL_CFLAGS_linux := -DHOST
55 include $(BUILD_HOST_EXECUTABLE)
56
57
58 include $(CLEAR_VARS)
59 LOCAL_SRC_FILES := blk_alloc_to_base_fs.c
60 LOCAL_MODULE := blk_alloc_to_base_fs
61 LOCAL_SHARED_LIBRARIES := libcutils
62 LOCAL_CFLAGS_darwin := -DHOST
63 LOCAL_CFLAGS_linux := -DHOST
64 include $(BUILD_HOST_EXECUTABLE)
65
66 #
67 # -- All host/targets excluding windows
68 #
69
70 libext4_utils_src_files += \
71     key_control.cpp \
72     ext4_crypt.cpp
73
74 ifneq ($(HOST_OS),windows)
75
76 include $(CLEAR_VARS)
77 LOCAL_SRC_FILES := $(libext4_utils_src_files)
78 LOCAL_MODULE := libext4_utils
79 LOCAL_C_INCLUDES := \
80     $(LOCAL_PATH)/include \
81     system/core/logwrapper/include
82 # Various instances of dereferencing a type-punned pointer in extent.c
83 LOCAL_CFLAGS += -fno-strict-aliasing
84 LOCAL_CFLAGS += -DREAL_UUID
85 LOCAL_EXPORT_C_INCLUDE_DIRS := \
86     $(LOCAL_PATH)/include
87 LOCAL_SHARED_LIBRARIES := \
88     libbase \
89     libcutils \
90     libext2_uuid \
91     libselinux \
92     libsparse \
93     libz
94 include $(BUILD_SHARED_LIBRARY)
95
96
97 include $(CLEAR_VARS)
98 LOCAL_SRC_FILES := \
99     $(libext4_utils_src_files) \
100     ext4_crypt_init_extensions.cpp
101 LOCAL_MODULE := libext4_utils_static
102 LOCAL_C_INCLUDES := \
103     $(LOCAL_PATH)/include
104 # Various instances of dereferencing a type-punned pointer in extent.c
105 LOCAL_CFLAGS += -fno-strict-aliasing
106 LOCAL_EXPORT_C_INCLUDE_DIRS := \
107     $(LOCAL_PATH)/include
108 LOCAL_STATIC_LIBRARIES := \
109     liblogwrap \
110     libsparse_static \
111     libselinux \
112     libbase
113 include $(BUILD_STATIC_LIBRARY)
114
115
116 include $(CLEAR_VARS)
117 LOCAL_SRC_FILES := make_ext4fs_main.c
118 LOCAL_MODULE := make_ext4fs
119 LOCAL_C_INCLUDES := \
120     $(LOCAL_PATH)/include
121 LOCAL_SHARED_LIBRARIES := \
122     libcutils \
123     libext2_uuid \
124     libext4_utils \
125     libselinux \
126     libz
127 LOCAL_CFLAGS := -DREAL_UUID
128 include $(BUILD_EXECUTABLE)
129
130
131 include $(CLEAR_VARS)
132 LOCAL_SRC_FILES := ext2simg.c
133 LOCAL_MODULE := ext2simg
134 LOCAL_C_INCLUDES := \
135     $(LOCAL_PATH)/include
136 LOCAL_SHARED_LIBRARIES += \
137     libext4_utils \
138     libselinux \
139     libsparse \
140     libz
141 include $(BUILD_EXECUTABLE)
142
143
144 include $(CLEAR_VARS)
145 LOCAL_SRC_FILES := ext2simg.c
146 LOCAL_MODULE := ext2simg
147 LOCAL_C_INCLUDES := \
148     $(LOCAL_PATH)/include
149 LOCAL_SHARED_LIBRARIES += \
150     libselinux
151 LOCAL_STATIC_LIBRARIES += \
152     libext4_utils_host \
153     libsparse_host \
154     libz
155 include $(BUILD_HOST_EXECUTABLE)
156
157
158 include $(CLEAR_VARS)
159 LOCAL_SRC_FILES := setup_fs.c
160 LOCAL_MODULE := setup_fs
161 LOCAL_SHARED_LIBRARIES += libcutils
162 include $(BUILD_EXECUTABLE)
163
164
165 include $(CLEAR_VARS)
166 LOCAL_SRC_FILES := ext4fixup_main.c
167 LOCAL_MODULE := ext4fixup
168 LOCAL_SHARED_LIBRARIES += \
169     libext4_utils \
170     libsparse \
171     libz
172 include $(BUILD_EXECUTABLE)
173
174
175 include $(CLEAR_VARS)
176 LOCAL_SRC_FILES := ext4fixup_main.c
177 LOCAL_MODULE := ext4fixup
178 LOCAL_STATIC_LIBRARIES += \
179     libext4_utils_host \
180     libsparse_host \
181     libz
182 include $(BUILD_HOST_EXECUTABLE)
183
184
185 include $(CLEAR_VARS)
186 LOCAL_MODULE := mkuserimg.sh
187 LOCAL_SRC_FILES := mkuserimg.sh
188 LOCAL_MODULE_CLASS := EXECUTABLES
189 # We don't need any additional suffix.
190 LOCAL_MODULE_SUFFIX :=
191 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
192 LOCAL_IS_HOST_MODULE := true
193 include $(BUILD_PREBUILT)
194
195 endif