Import make_ext4fs sources
[project/make_ext4fs.git] / 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     uuid.c \
14     sha1.c \
15     wipe.c \
16     crc16.c \
17     ext4_sb.c
18
19 #
20 # -- All host/targets including windows
21 #
22
23 include $(CLEAR_VARS)
24 LOCAL_SRC_FILES := $(libext4_utils_src_files)
25 LOCAL_MODULE := libext4_utils_host
26 LOCAL_STATIC_LIBRARIES := \
27     libsparse_host \
28     libz
29 ifneq ($(HOST_OS),windows)
30   LOCAL_STATIC_LIBRARIES += libselinux
31 endif
32 include $(BUILD_HOST_STATIC_LIBRARY)
33
34
35 include $(CLEAR_VARS)
36 LOCAL_SRC_FILES := make_ext4fs_main.c canned_fs_config.c
37 LOCAL_MODULE := make_ext4fs
38 LOCAL_STATIC_LIBRARIES += \
39     libcutils \
40     libext4_utils_host \
41     libsparse_host \
42     libz
43 ifeq ($(HOST_OS),windows)
44   LOCAL_LDLIBS += -lws2_32
45 else
46   LOCAL_STATIC_LIBRARIES += libselinux
47   LOCAL_CFLAGS := -DHOST
48 endif
49 include $(BUILD_HOST_EXECUTABLE)
50
51
52 #
53 # -- All host/targets excluding windows
54 #
55
56 libext4_utils_src_files += \
57     ext4_crypt.cpp \
58     e4crypt_static.c \
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 LOCAL_SHARED_LIBRARIES := \
68     libcutils \
69     libselinux \
70     libsparse \
71     libz
72 include $(BUILD_SHARED_LIBRARY)
73
74
75 include $(CLEAR_VARS)
76 LOCAL_SRC_FILES := $(libext4_utils_src_files) \
77     ext4_crypt_init_extensions.cpp
78 LOCAL_MODULE := libext4_utils_static
79 LOCAL_STATIC_LIBRARIES := \
80     libsparse_static
81 include $(BUILD_STATIC_LIBRARY)
82
83
84 include $(CLEAR_VARS)
85 LOCAL_SRC_FILES := make_ext4fs_main.c canned_fs_config.c
86 LOCAL_MODULE := make_ext4fs
87 LOCAL_SHARED_LIBRARIES := \
88     libcutils \
89     libext4_utils \
90     libselinux \
91     libz
92 include $(BUILD_EXECUTABLE)
93
94
95 include $(CLEAR_VARS)
96 LOCAL_SRC_FILES := ext2simg.c
97 LOCAL_MODULE := ext2simg
98 LOCAL_SHARED_LIBRARIES += \
99     libext4_utils \
100     libselinux \
101     libsparse \
102     libz
103 include $(BUILD_EXECUTABLE)
104
105
106 include $(CLEAR_VARS)
107 LOCAL_SRC_FILES := ext2simg.c
108 LOCAL_MODULE := ext2simg
109 LOCAL_STATIC_LIBRARIES += \
110     libext4_utils_host \
111     libselinux \
112     libsparse_host \
113     libz
114 include $(BUILD_HOST_EXECUTABLE)
115
116
117 include $(CLEAR_VARS)
118 LOCAL_SRC_FILES := setup_fs.c
119 LOCAL_MODULE := setup_fs
120 LOCAL_SHARED_LIBRARIES += libcutils
121 include $(BUILD_EXECUTABLE)
122
123
124 include $(CLEAR_VARS)
125 LOCAL_SRC_FILES := ext4fixup_main.c
126 LOCAL_MODULE := ext4fixup
127 LOCAL_SHARED_LIBRARIES += \
128     libext4_utils \
129     libsparse \
130     libz
131 include $(BUILD_EXECUTABLE)
132
133
134 include $(CLEAR_VARS)
135 LOCAL_SRC_FILES := ext4fixup_main.c
136 LOCAL_MODULE := ext4fixup
137 LOCAL_STATIC_LIBRARIES += \
138     libext4_utils_host \
139     libsparse_host \
140     libz
141 include $(BUILD_HOST_EXECUTABLE)
142
143
144 include $(CLEAR_VARS)
145 LOCAL_MODULE := mkuserimg.sh
146 LOCAL_SRC_FILES := mkuserimg.sh
147 LOCAL_MODULE_CLASS := EXECUTABLES
148 # We don't need any additional suffix.
149 LOCAL_MODULE_SUFFIX :=
150 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
151 LOCAL_IS_HOST_MODULE := true
152 include $(BUILD_PREBUILT)
153
154 endif