OSDN Git Service

am 1f55c074: am d258e0fd: am 83eeed92: emmc test: fix counter overflow
[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 canned_fs_config.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
52 #
53 # -- All host/targets excluding windows
54 #
55
56 libext4_utils_src_files += \
57     key_control.cpp \
58     ext4_crypt.cpp \
59     unencrypted_properties.cpp
60
61 ifneq ($(HOST_OS),windows)
62
63 include $(CLEAR_VARS)
64 LOCAL_SRC_FILES := $(libext4_utils_src_files)
65 LOCAL_MODULE := libext4_utils
66 LOCAL_C_INCLUDES += system/core/logwrapper/include
67 # Various instances of dereferencing a type-punned pointer in extent.c
68 LOCAL_CFLAGS += -fno-strict-aliasing
69 LOCAL_SHARED_LIBRARIES := \
70     libcutils \
71     libext2_uuid \
72     libselinux \
73     libsparse \
74     libz
75 LOCAL_CFLAGS := -DREAL_UUID
76 include $(BUILD_SHARED_LIBRARY)
77
78
79 include $(CLEAR_VARS)
80 LOCAL_SRC_FILES := $(libext4_utils_src_files) \
81     ext4_crypt_init_extensions.cpp
82 LOCAL_MODULE := libext4_utils_static
83 # Various instances of dereferencing a type-punned pointer in extent.c
84 LOCAL_CFLAGS += -fno-strict-aliasing
85 LOCAL_STATIC_LIBRARIES := \
86     libsparse_static
87 include $(BUILD_STATIC_LIBRARY)
88
89
90 include $(CLEAR_VARS)
91 LOCAL_SRC_FILES := make_ext4fs_main.c canned_fs_config.c
92 LOCAL_MODULE := make_ext4fs
93 LOCAL_SHARED_LIBRARIES := \
94     libcutils \
95     libext2_uuid \
96     libext4_utils \
97     libselinux \
98     libz
99 LOCAL_CFLAGS := -DREAL_UUID
100 include $(BUILD_EXECUTABLE)
101
102
103 include $(CLEAR_VARS)
104 LOCAL_SRC_FILES := ext2simg.c
105 LOCAL_MODULE := ext2simg
106 LOCAL_SHARED_LIBRARIES += \
107     libext4_utils \
108     libselinux \
109     libsparse \
110     libz
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     libselinux
119 LOCAL_STATIC_LIBRARIES += \
120     libext4_utils_host \
121     libsparse_host \
122     libz
123 include $(BUILD_HOST_EXECUTABLE)
124
125
126 include $(CLEAR_VARS)
127 LOCAL_SRC_FILES := setup_fs.c
128 LOCAL_MODULE := setup_fs
129 LOCAL_SHARED_LIBRARIES += libcutils
130 include $(BUILD_EXECUTABLE)
131
132
133 include $(CLEAR_VARS)
134 LOCAL_SRC_FILES := ext4fixup_main.c
135 LOCAL_MODULE := ext4fixup
136 LOCAL_SHARED_LIBRARIES += \
137     libext4_utils \
138     libsparse \
139     libz
140 include $(BUILD_EXECUTABLE)
141
142
143 include $(CLEAR_VARS)
144 LOCAL_SRC_FILES := ext4fixup_main.c
145 LOCAL_MODULE := ext4fixup
146 LOCAL_STATIC_LIBRARIES += \
147     libext4_utils_host \
148     libsparse_host \
149     libz
150 include $(BUILD_HOST_EXECUTABLE)
151
152
153 include $(CLEAR_VARS)
154 LOCAL_MODULE := mkuserimg.sh
155 LOCAL_SRC_FILES := mkuserimg.sh
156 LOCAL_MODULE_CLASS := EXECUTABLES
157 # We don't need any additional suffix.
158 LOCAL_MODULE_SUFFIX :=
159 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
160 LOCAL_IS_HOST_MODULE := true
161 include $(BUILD_PREBUILT)
162
163 endif