• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2010 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4
5libext4_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
17#
18# -- All host/targets including windows
19#
20
21include $(CLEAR_VARS)
22LOCAL_SRC_FILES := $(libext4_utils_src_files)
23LOCAL_MODULE := libext4_utils_host
24LOCAL_C_INCLUDES += external/zlib
25LOCAL_STATIC_LIBRARIES += libsparse_host
26ifeq ($(HAVE_SELINUX), true)
27  LOCAL_C_INCLUDES += external/libselinux/include
28  LOCAL_STATIC_LIBRARIES += libselinux
29  LOCAL_CFLAGS += -DHAVE_SELINUX
30endif # HAVE_SELINUX
31include $(BUILD_HOST_STATIC_LIBRARY)
32
33
34include $(CLEAR_VARS)
35LOCAL_SRC_FILES := make_ext4fs_main.c
36LOCAL_MODULE := make_ext4fs
37LOCAL_STATIC_LIBRARIES += \
38    libext4_utils_host \
39    libsparse_host \
40    libz
41ifeq ($(HOST_OS),windows)
42  LOCAL_LDLIBS += -lws2_32
43else
44  ifeq ($(HAVE_SELINUX), true)
45    LOCAL_C_INCLUDES += external/libselinux/include
46    LOCAL_STATIC_LIBRARIES += libselinux
47    LOCAL_CFLAGS += -DHAVE_SELINUX
48  endif # HAVE_SELINUX
49endif
50include $(BUILD_HOST_EXECUTABLE)
51
52
53#
54# -- All host/targets excluding windows
55#
56
57ifneq ($(HOST_OS),windows)
58
59include $(CLEAR_VARS)
60LOCAL_SRC_FILES := $(libext4_utils_src_files)
61LOCAL_MODULE := libext4_utils
62LOCAL_C_INCLUDES += external/zlib
63LOCAL_SHARED_LIBRARIES := \
64    libsparse \
65    libz
66ifeq ($(HAVE_SELINUX), true)
67  LOCAL_C_INCLUDES += external/libselinux/include
68  LOCAL_SHARED_LIBRARIES += libselinux
69  LOCAL_CFLAGS += -DHAVE_SELINUX
70endif # HAVE_SELINUX
71include $(BUILD_SHARED_LIBRARY)
72
73
74include $(CLEAR_VARS)
75LOCAL_SRC_FILES := $(libext4_utils_src_files)
76LOCAL_MODULE := libext4_utils_static
77LOCAL_C_INCLUDES += external/zlib
78LOCAL_STATIC_LIBRARIES += \
79    libsparse_static
80ifeq ($(HAVE_SELINUX), true)
81  LOCAL_C_INCLUDES += external/libselinux/include
82  LOCAL_STATIC_LIBRARIES += libselinux
83  LOCAL_CFLAGS += -DHAVE_SELINUX
84endif # HAVE_SELINUX
85include $(BUILD_STATIC_LIBRARY)
86
87
88include $(CLEAR_VARS)
89LOCAL_SRC_FILES := make_ext4fs_main.c
90LOCAL_MODULE := make_ext4fs
91LOCAL_SHARED_LIBRARIES += libext4_utils libz
92ifeq ($(HAVE_SELINUX), true)
93  LOCAL_C_INCLUDES += external/libselinux/include
94  LOCAL_SHARED_LIBRARIES += libselinux
95  LOCAL_CFLAGS += -DHAVE_SELINUX
96endif # HAVE_SELINUX
97include $(BUILD_EXECUTABLE)
98
99
100include $(CLEAR_VARS)
101LOCAL_SRC_FILES := ext2simg.c
102LOCAL_MODULE := ext2simg
103LOCAL_SHARED_LIBRARIES += \
104    libext4_utils \
105    libsparse \
106    libz
107ifeq ($(HAVE_SELINUX), true)
108  LOCAL_C_INCLUDES += external/libselinux/include
109  LOCAL_SHARED_LIBRARIES += libselinux
110  LOCAL_CFLAGS += -DHAVE_SELINUX
111endif # HAVE_SELINUX
112include $(BUILD_EXECUTABLE)
113
114
115include $(CLEAR_VARS)
116LOCAL_SRC_FILES := ext2simg.c
117LOCAL_MODULE := ext2simg
118LOCAL_STATIC_LIBRARIES += \
119    libext4_utils_host \
120    libsparse_host \
121    libz
122ifeq ($(HAVE_SELINUX), true)
123  LOCAL_C_INCLUDES += external/libselinux/include
124  LOCAL_STATIC_LIBRARIES += libselinux
125  LOCAL_CFLAGS += -DHAVE_SELINUX
126endif # HAVE_SELINUX
127include $(BUILD_HOST_EXECUTABLE)
128
129
130include $(CLEAR_VARS)
131LOCAL_SRC_FILES := setup_fs.c
132LOCAL_MODULE := setup_fs
133LOCAL_SHARED_LIBRARIES += libcutils
134include $(BUILD_EXECUTABLE)
135
136
137include $(CLEAR_VARS)
138LOCAL_SRC_FILES := ext4fixup_main.c
139LOCAL_MODULE := ext4fixup
140LOCAL_SHARED_LIBRARIES += \
141    libext4_utils \
142    libsparse \
143    libz
144include $(BUILD_EXECUTABLE)
145
146
147include $(CLEAR_VARS)
148LOCAL_SRC_FILES := ext4fixup_main.c
149LOCAL_MODULE := ext4fixup
150LOCAL_STATIC_LIBRARIES += \
151    libext4_utils_host \
152    libsparse_host \
153    libz
154include $(BUILD_HOST_EXECUTABLE)
155
156
157include $(CLEAR_VARS)
158LOCAL_MODULE := mkuserimg.sh
159LOCAL_SRC_FILES := mkuserimg.sh
160LOCAL_MODULE_CLASS := EXECUTABLES
161# We don't need any additional suffix.
162LOCAL_MODULE_SUFFIX :=
163LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
164LOCAL_IS_HOST_MODULE := true
165include $(BUILD_PREBUILT)
166
167endif
168
169