OSDN Git Service

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