OSDN Git Service

vold: add support for more filesystems for public storage
[android-x86/system-vold.git] / Android.mk
1 LOCAL_PATH:= $(call my-dir)
2
3 common_src_files := \
4         VolumeManager.cpp \
5         CommandListener.cpp \
6         CryptCommandListener.cpp \
7         VoldCommand.cpp \
8         NetlinkManager.cpp \
9         NetlinkHandler.cpp \
10         Process.cpp \
11         fs/Exfat.cpp \
12         fs/Ext4.cpp \
13         fs/F2fs.cpp \
14         fs/Ntfs.cpp \
15         fs/Vfat.cpp \
16         Loop.cpp \
17         Devmapper.cpp \
18         ResponseCode.cpp \
19         CheckBattery.cpp \
20         Ext4Crypt.cpp \
21         VoldUtil.c \
22         cryptfs.cpp \
23         Disk.cpp \
24         VolumeBase.cpp \
25         PublicVolume.cpp \
26         PrivateVolume.cpp \
27         EmulatedVolume.cpp \
28         Utils.cpp \
29         MoveTask.cpp \
30         Benchmark.cpp \
31         TrimTask.cpp \
32         Keymaster.cpp \
33         KeyStorage.cpp \
34         ScryptParameters.cpp \
35         secontext.cpp \
36
37 common_c_includes := \
38         system/extras/f2fs_utils \
39         external/scrypt/lib/crypto \
40         frameworks/native/include \
41         system/security/keystore \
42
43 common_shared_libraries := \
44         libsysutils \
45         libbinder \
46         libcutils \
47         liblog \
48         libdiskconfig \
49         libhardware_legacy \
50         liblogwrap \
51         libext4_utils \
52         libf2fs_sparseblock \
53         libcrypto_utils \
54         libcrypto \
55         libselinux \
56         libutils \
57         libhardware \
58         libbase \
59         libhwbinder \
60         libhidlbase \
61         android.hardware.keymaster@3.0 \
62         libkeystore_binder
63
64 common_static_libraries := \
65         libbootloader_message \
66         libfs_mgr \
67         libfec \
68         libfec_rs \
69         libsquashfs_utils \
70         libscrypt_static \
71         libbatteryservice \
72         libavb \
73
74 vold_conlyflags := -std=c11
75 vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
76
77 required_modules :=
78 ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
79   ifeq ($(TARGET_USES_MKE2FS), true)
80     vold_cflags += -DTARGET_USES_MKE2FS
81     required_modules += mke2fs
82   else
83     required_modules += make_ext4fs
84   endif
85 endif
86
87 include $(CLEAR_VARS)
88
89 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
90 LOCAL_MODULE := libvold
91 LOCAL_CLANG := true
92 LOCAL_SRC_FILES := $(common_src_files)
93 LOCAL_C_INCLUDES := $(common_c_includes)
94 LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
95 LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
96 LOCAL_MODULE_TAGS := eng tests
97 LOCAL_CFLAGS := $(vold_cflags)
98 LOCAL_CONLYFLAGS := $(vold_conlyflags)
99 LOCAL_REQUIRED_MODULES := $(required_modules)
100
101 include $(BUILD_STATIC_LIBRARY)
102
103 include $(CLEAR_VARS)
104
105 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
106 LOCAL_MODULE := vold
107 LOCAL_CLANG := true
108 LOCAL_SRC_FILES := \
109         main.cpp \
110         $(common_src_files)
111
112 LOCAL_INIT_RC := vold.rc
113
114 LOCAL_C_INCLUDES := $(common_c_includes)
115 LOCAL_CFLAGS := $(vold_cflags)
116 LOCAL_CONLYFLAGS := $(vold_conlyflags)
117
118 LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
119 LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
120 LOCAL_REQUIRED_MODULES := $(required_modules)
121
122 include $(BUILD_EXECUTABLE)
123
124 include $(CLEAR_VARS)
125
126 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
127 LOCAL_CLANG := true
128 LOCAL_SRC_FILES := vdc.cpp
129 LOCAL_MODULE := vdc
130 LOCAL_SHARED_LIBRARIES := libcutils libbase
131 LOCAL_CFLAGS := $(vold_cflags)
132 LOCAL_CONLYFLAGS := $(vold_conlyflags)
133 LOCAL_INIT_RC := vdc.rc
134
135 include $(BUILD_EXECUTABLE)
136
137 include $(CLEAR_VARS)
138
139 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
140 LOCAL_CLANG := true
141 LOCAL_SRC_FILES:= secdiscard.cpp
142 LOCAL_MODULE:= secdiscard
143 LOCAL_SHARED_LIBRARIES := libbase
144 LOCAL_CFLAGS := $(vold_cflags)
145 LOCAL_CONLYFLAGS := $(vold_conlyflags)
146
147 include $(BUILD_EXECUTABLE)
148
149 include $(LOCAL_PATH)/tests/Android.mk