OSDN Git Service

Merge "simpleperf: use Dso::IsHit() to mark hit binaries."
[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 LOCAL_STATIC_LIBRARIES_darwin += libselinux
34 LOCAL_STATIC_LIBRARIES_linux += libselinux
35 LOCAL_MODULE_HOST_OS := darwin linux windows
36 include $(BUILD_HOST_STATIC_LIBRARY)
37
38
39 include $(CLEAR_VARS)
40 LOCAL_SRC_FILES := make_ext4fs_main.c
41 LOCAL_MODULE := make_ext4fs
42 LOCAL_C_INCLUDES := \
43     $(LOCAL_PATH)/include
44 LOCAL_SHARED_LIBRARIES += libcutils
45 LOCAL_STATIC_LIBRARIES += \
46     libext4_utils_host \
47     libsparse_host \
48     libz
49 LOCAL_LDLIBS_windows += -lws2_32
50 LOCAL_SHARED_LIBRARIES_darwin += libselinux
51 LOCAL_SHARED_LIBRARIES_linux += libselinux
52 LOCAL_CFLAGS_darwin := -DHOST
53 LOCAL_CFLAGS_linux := -DHOST
54 include $(BUILD_HOST_EXECUTABLE)
55
56
57 include $(CLEAR_VARS)
58 LOCAL_SRC_FILES := blk_alloc_to_base_fs.c
59 LOCAL_MODULE := blk_alloc_to_base_fs
60 LOCAL_SHARED_LIBRARIES := libcutils
61 LOCAL_CFLAGS_darwin := -DHOST
62 LOCAL_CFLAGS_linux := -DHOST
63 include $(BUILD_HOST_EXECUTABLE)
64
65 #
66 # -- All host/targets excluding windows
67 #
68
69 libext4_utils_src_files += \
70     key_control.cpp \
71     ext4_crypt.cpp
72
73 ifneq ($(HOST_OS),windows)
74
75 include $(CLEAR_VARS)
76 LOCAL_SRC_FILES := $(libext4_utils_src_files)
77 LOCAL_MODULE := libext4_utils
78 LOCAL_C_INCLUDES := \
79     $(LOCAL_PATH)/include \
80     system/core/logwrapper/include
81 # Various instances of dereferencing a type-punned pointer in extent.c
82 LOCAL_CFLAGS += -fno-strict-aliasing
83 LOCAL_CFLAGS += -DREAL_UUID
84 LOCAL_EXPORT_C_INCLUDE_DIRS := \
85     $(LOCAL_PATH)/include
86 LOCAL_SHARED_LIBRARIES := \
87     libbase \
88     libcutils \
89     libext2_uuid \
90     libselinux \
91     libsparse
92 include $(BUILD_SHARED_LIBRARY)
93
94
95 include $(CLEAR_VARS)
96 LOCAL_SRC_FILES := \
97     $(libext4_utils_src_files) \
98     ext4_crypt_init_extensions.cpp
99 LOCAL_MODULE := libext4_utils_static
100 LOCAL_C_INCLUDES := \
101     $(LOCAL_PATH)/include
102 # Various instances of dereferencing a type-punned pointer in extent.c
103 LOCAL_CFLAGS += -fno-strict-aliasing
104 LOCAL_EXPORT_C_INCLUDE_DIRS := \
105     $(LOCAL_PATH)/include
106 LOCAL_STATIC_LIBRARIES := \
107     liblogwrap \
108     libsparse_static \
109     libselinux \
110     libbase
111 include $(BUILD_STATIC_LIBRARY)
112
113
114 include $(CLEAR_VARS)
115 LOCAL_SRC_FILES := make_ext4fs_main.c
116 LOCAL_MODULE := make_ext4fs
117 LOCAL_C_INCLUDES := \
118     $(LOCAL_PATH)/include
119 LOCAL_SHARED_LIBRARIES := \
120     libcutils \
121     libext2_uuid \
122     libext4_utils \
123     libselinux \
124     libz
125 LOCAL_CFLAGS := -DREAL_UUID
126 include $(BUILD_EXECUTABLE)
127
128
129 include $(CLEAR_VARS)
130 LOCAL_SRC_FILES := ext2simg.c
131 LOCAL_MODULE := ext2simg
132 LOCAL_C_INCLUDES := \
133     $(LOCAL_PATH)/include
134 LOCAL_SHARED_LIBRARIES += \
135     libext4_utils \
136     libselinux \
137     libsparse \
138     libz
139 include $(BUILD_EXECUTABLE)
140
141
142 include $(CLEAR_VARS)
143 LOCAL_SRC_FILES := ext2simg.c
144 LOCAL_MODULE := ext2simg
145 LOCAL_C_INCLUDES := \
146     $(LOCAL_PATH)/include
147 LOCAL_SHARED_LIBRARIES += \
148     libselinux
149 LOCAL_STATIC_LIBRARIES += \
150     libext4_utils_host \
151     libsparse_host \
152     libz
153 include $(BUILD_HOST_EXECUTABLE)
154
155
156 include $(CLEAR_VARS)
157 LOCAL_SRC_FILES := setup_fs.c
158 LOCAL_MODULE := setup_fs
159 LOCAL_SHARED_LIBRARIES += libcutils
160 include $(BUILD_EXECUTABLE)
161
162
163 include $(CLEAR_VARS)
164 LOCAL_SRC_FILES := ext4fixup_main.c
165 LOCAL_MODULE := ext4fixup
166 LOCAL_SHARED_LIBRARIES += \
167     libext4_utils \
168     libsparse \
169     libz
170 include $(BUILD_EXECUTABLE)
171
172
173 include $(CLEAR_VARS)
174 LOCAL_SRC_FILES := ext4fixup_main.c
175 LOCAL_MODULE := ext4fixup
176 LOCAL_STATIC_LIBRARIES += \
177     libext4_utils_host \
178     libsparse_host \
179     libz
180 include $(BUILD_HOST_EXECUTABLE)
181
182
183 include $(CLEAR_VARS)
184 LOCAL_MODULE := mkuserimg.sh
185 LOCAL_SRC_FILES := mkuserimg.sh
186 LOCAL_MODULE_CLASS := EXECUTABLES
187 # We don't need any additional suffix.
188 LOCAL_MODULE_SUFFIX :=
189 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
190 LOCAL_IS_HOST_MODULE := true
191 include $(BUILD_PREBUILT)
192
193 endif