blob: 8cbc1d4331e6b0ae20ef6a3992360b05cf053989 [file] [log] [blame]
San Mehatf1b736b2009-10-10 17:22:08 -07001LOCAL_PATH:= $(call my-dir)
2
Kenny Rootacc9e7d2010-06-18 19:06:50 -07003common_src_files := \
4 VolumeManager.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -07005 NetlinkManager.cpp \
6 NetlinkHandler.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -07007 Process.cpp \
Jeff Sharkeyd0640f62015-05-21 22:35:42 -07008 fs/Ext4.cpp \
9 fs/F2fs.cpp \
10 fs/Vfat.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070011 Loop.cpp \
12 Devmapper.cpp \
Paul Lawrence707fd6c2015-04-28 22:14:15 +000013 Ext4Crypt.cpp \
Paul Crowleye2ee1522017-09-26 14:05:26 -070014 VoldUtil.cpp \
Wei Wang4375f1b2017-02-24 17:43:01 -080015 cryptfs.cpp \
Jeff Sharkey11c2d382017-09-11 10:32:01 -060016 model/Disk.cpp \
17 model/VolumeBase.cpp \
18 model/PublicVolume.cpp \
19 model/PrivateVolume.cpp \
20 model/EmulatedVolume.cpp \
21 model/ObbVolume.cpp \
Jeff Sharkeydeb24052015-03-02 21:01:40 -080022 Utils.cpp \
Jeff Sharkey01a0e7f2017-10-17 16:06:32 -060023 MoveStorage.cpp \
24 Benchmark.cpp \
25 IdleMaint.cpp \
Pavel Grafove2e2d302017-08-01 17:15:53 +010026 KeyBuffer.cpp \
Paul Crowley1ef25582016-01-21 20:26:12 +000027 Keymaster.cpp \
28 KeyStorage.cpp \
Paul Crowleyf71ace32016-06-02 11:01:19 -070029 KeyUtil.cpp \
Paul Crowley63c18d32016-02-10 14:02:47 +000030 ScryptParameters.cpp \
Jeff Vander Stoepdf725752016-01-29 15:34:43 -080031 secontext.cpp \
Paul Crowleyf71ace32016-06-02 11:01:19 -070032 EncryptInplace.cpp \
Paul Crowleyd5759812016-06-02 11:04:27 -070033 MetadataCrypt.cpp \
Jeff Sharkey52f7a912017-09-15 12:57:44 -060034 VoldNativeService.cpp \
35
36common_aidl_files := \
Jeff Sharkey068c6be2017-09-06 13:47:40 -060037 binder/android/os/IVold.aidl \
Jeff Sharkey814e9d32017-09-13 11:49:44 -060038 binder/android/os/IVoldListener.aidl \
Jeff Sharkey52f7a912017-09-15 12:57:44 -060039 binder/android/os/IVoldTaskListener.aidl \
40
41common_aidl_includes := \
42 $(LOCAL_PATH)/binder \
43 frameworks/native/aidl/binder \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070044
45common_c_includes := \
Daniel Rosenberge82df162014-08-15 22:19:23 +000046 system/extras/f2fs_utils \
Paul Lawrence87999172014-02-20 12:21:31 -080047 external/scrypt/lib/crypto \
Paul Crowleyf71ace32016-06-02 11:01:19 -070048 external/f2fs-tools/include \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070049 frameworks/native/include \
50 system/security/keystore \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070051
52common_shared_libraries := \
53 libsysutils \
Paul Lawrence87999172014-02-20 12:21:31 -080054 libbinder \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070055 libcutils \
Elliott Hughesc3bda182017-05-09 17:01:04 -070056 libkeyutils \
Ying Wang741a1692013-04-09 22:05:28 -070057 liblog \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070058 libdiskconfig \
Ken Sumrall5d4c68e2011-01-30 19:06:03 -080059 libhardware_legacy \
Rom Lemarchand2ba45aa2013-01-16 12:29:28 -080060 liblogwrap \
Ken Sumrall5cf759a2013-08-14 20:15:17 -070061 libext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000062 libf2fs_sparseblock \
Mattias Nisslerdc803232016-03-31 16:32:59 +020063 libcrypto_utils \
Robert Craigb9e3ba52014-02-04 10:53:00 -050064 libcrypto \
Paul Lawrence87999172014-02-20 12:21:31 -080065 libselinux \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070066 libutils \
67 libhardware \
Paul Crowley1ef25582016-01-21 20:26:12 +000068 libbase \
Janis Danisevskis8e537b82016-10-26 14:27:10 +010069 libhwbinder \
70 libhidlbase \
71 android.hardware.keymaster@3.0 \
72 libkeystore_binder
Kenny Rootacc9e7d2010-06-18 19:06:50 -070073
Kenny Rootc4c70f12013-06-14 12:11:38 -070074common_static_libraries := \
Yabin Cui1fb59662016-06-24 14:48:49 -070075 libbootloader_message \
Kenny Rootc4c70f12013-06-14 12:11:38 -070076 libfs_mgr \
Sami Tolvanenefe67cd2015-06-01 15:38:29 +010077 libfec \
78 libfec_rs \
Mohamad Ayyashc489d7f2015-04-06 18:15:53 -070079 libsquashfs_utils \
Geremy Condrac49f0f22013-08-07 13:12:41 -070080 libscrypt_static \
bowgotsai58bdac82017-01-07 00:44:35 +080081 libavb \
Kenny Rootc4c70f12013-06-14 12:11:38 -070082
Jeff Sharkey32ebb732017-03-27 16:18:50 -060083# TODO: include "cert-err58-cpp" once 36656327 is fixed
Jeff Sharkey83b559c2017-09-12 16:30:52 -060084common_local_tidy_enabled := true
Jeff Sharkey32ebb732017-03-27 16:18:50 -060085common_local_tidy_flags := -warnings-as-errors=clang-analyzer-security*,cert-*
Jeff Sharkey95440eb2017-09-18 18:19:28 -060086common_local_tidy_checks := -*,clang-analyzer-security*,cert-*,-cert-err58-cpp
Jeff Sharkey32ebb732017-03-27 16:18:50 -060087
Dan Albertc07fa3f2014-12-18 10:00:55 -080088vold_conlyflags := -std=c11
Jeff Sharkeydeb24052015-03-02 21:01:40 -080089vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
Dan Albertc07fa3f2014-12-18 10:00:55 -080090
Paul Crowley1a965262017-10-13 13:49:50 -070091required_modules := vold_prepare_subdirs
Adrien Schildknechte0f409c2016-11-21 15:14:37 -080092ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
Jin Qianb678d7c2017-08-15 16:44:04 -070093 required_modules += mke2fs
Adrien Schildknechte0f409c2016-11-21 15:14:37 -080094endif
95
San Mehatf1b736b2009-10-10 17:22:08 -070096include $(CLEAR_VARS)
97
Dan Albertb2aaf3a2014-09-12 10:48:12 -070098LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Rootacc9e7d2010-06-18 19:06:50 -070099LOCAL_MODULE := libvold
Dan Albertc07fa3f2014-12-18 10:00:55 -0800100LOCAL_CLANG := true
Jeff Sharkey83b559c2017-09-12 16:30:52 -0600101LOCAL_TIDY := $(common_local_tidy_enabled)
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600102LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
103LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Jeff Sharkey52f7a912017-09-15 12:57:44 -0600104LOCAL_SRC_FILES := $(common_src_files) $(common_aidl_files)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700105LOCAL_C_INCLUDES := $(common_c_includes)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700106LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -0700107LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700108LOCAL_MODULE_TAGS := eng tests
Dan Albertc07fa3f2014-12-18 10:00:55 -0800109LOCAL_CFLAGS := $(vold_cflags)
110LOCAL_CONLYFLAGS := $(vold_conlyflags)
Adrien Schildknechte0f409c2016-11-21 15:14:37 -0800111LOCAL_REQUIRED_MODULES := $(required_modules)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700112
Jeff Sharkey52f7a912017-09-15 12:57:44 -0600113LOCAL_AIDL_INCLUDES := $(common_aidl_includes)
Jeff Sharkey814e9d32017-09-13 11:49:44 -0600114
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700115include $(BUILD_STATIC_LIBRARY)
116
117include $(CLEAR_VARS)
San Mehatf1b736b2009-10-10 17:22:08 -0700118
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700119LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jeff Sharkey47695b22016-02-01 17:02:29 -0700120LOCAL_MODULE := vold
Dan Albertc07fa3f2014-12-18 10:00:55 -0800121LOCAL_CLANG := true
Jeff Sharkey83b559c2017-09-12 16:30:52 -0600122LOCAL_TIDY := $(common_local_tidy_enabled)
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600123LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
124LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700125LOCAL_SRC_FILES := \
126 main.cpp \
Jeff Sharkey52f7a912017-09-15 12:57:44 -0600127 $(common_src_files) \
128 $(common_aidl_files) \
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700129
Tom Cherrya2859842015-08-14 13:06:45 -0700130LOCAL_INIT_RC := vold.rc
131
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700132LOCAL_C_INCLUDES := $(common_c_includes)
Dan Albertc07fa3f2014-12-18 10:00:55 -0800133LOCAL_CFLAGS := $(vold_cflags)
134LOCAL_CONLYFLAGS := $(vold_conlyflags)
San Mehatf1b736b2009-10-10 17:22:08 -0700135
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700136LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -0700137LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Adrien Schildknechte0f409c2016-11-21 15:14:37 -0800138LOCAL_REQUIRED_MODULES := $(required_modules)
Ken Sumrallf0679f02012-04-01 23:58:44 -0700139
Jeff Sharkey52f7a912017-09-15 12:57:44 -0600140LOCAL_AIDL_INCLUDES := $(common_aidl_includes)
Jeff Sharkey068c6be2017-09-06 13:47:40 -0600141
San Mehatf1b736b2009-10-10 17:22:08 -0700142include $(BUILD_EXECUTABLE)
143
144include $(CLEAR_VARS)
Kenny Root7b18a7b2010-03-15 13:13:41 -0700145
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700146LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Dan Albertc07fa3f2014-12-18 10:00:55 -0800147LOCAL_CLANG := true
Jeff Sharkey83b559c2017-09-12 16:30:52 -0600148LOCAL_TIDY := $(common_local_tidy_enabled)
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600149LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
150LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Jeff Sharkey0990b692017-09-14 17:24:26 -0600151
152LOCAL_SRC_FILES := \
153 vdc.cpp \
Jeff Sharkey52f7a912017-09-15 12:57:44 -0600154 $(common_aidl_files) \
Jeff Sharkey0990b692017-09-14 17:24:26 -0600155
Jeff Sharkey47695b22016-02-01 17:02:29 -0700156LOCAL_MODULE := vdc
Jeff Sharkey99f92682017-09-13 18:43:44 -0600157LOCAL_SHARED_LIBRARIES := libbase libbinder libcutils libutils
Dan Albertc07fa3f2014-12-18 10:00:55 -0800158LOCAL_CFLAGS := $(vold_cflags)
159LOCAL_CONLYFLAGS := $(vold_conlyflags)
Tom Cherrya2859842015-08-14 13:06:45 -0700160LOCAL_INIT_RC := vdc.rc
San Mehatf1b736b2009-10-10 17:22:08 -0700161
Jeff Sharkey52f7a912017-09-15 12:57:44 -0600162LOCAL_AIDL_INCLUDES := $(common_aidl_includes)
Jeff Sharkey99f92682017-09-13 18:43:44 -0600163
San Mehatf1b736b2009-10-10 17:22:08 -0700164include $(BUILD_EXECUTABLE)
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100165
166include $(CLEAR_VARS)
167
168LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
169LOCAL_CLANG := true
Jeff Sharkey83b559c2017-09-12 16:30:52 -0600170LOCAL_TIDY := $(common_local_tidy_enabled)
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600171LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
172LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Paul Crowley03f89d32017-06-16 09:37:31 -0700173LOCAL_SRC_FILES:= \
174 FileDeviceUtils.cpp \
175 secdiscard.cpp \
176
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100177LOCAL_MODULE:= secdiscard
Paul Crowley8bb8fcf2016-01-11 12:26:44 +0000178LOCAL_SHARED_LIBRARIES := libbase
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100179LOCAL_CFLAGS := $(vold_cflags)
180LOCAL_CONLYFLAGS := $(vold_conlyflags)
181
182include $(BUILD_EXECUTABLE)
Paul Crowley4315c6a2016-12-06 08:22:04 -0800183
Paul Crowley1a965262017-10-13 13:49:50 -0700184include $(CLEAR_VARS)
185
186LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
187LOCAL_CLANG := true
188LOCAL_TIDY := $(common_local_tidy_enabled)
189LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
190LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
191LOCAL_SRC_FILES:= \
192 prepare_dir.cpp \
193
194LOCAL_MODULE:= prepare_dir
195LOCAL_SHARED_LIBRARIES := libbase libcutils libselinux
196LOCAL_CFLAGS := $(vold_cflags)
197LOCAL_CONLYFLAGS := $(vold_conlyflags)
198
199include $(BUILD_EXECUTABLE)
200
201include $(CLEAR_VARS)
202
203LOCAL_MODULE:= vold_prepare_subdirs
204LOCAL_MODULE_CLASS := EXECUTABLES
205LOCAL_SRC_FILES := vold_prepare_subdirs
206LOCAL_REQUIRED_MODULES := prepare_dir
207
208include $(BUILD_PREBUILT)
209
Paul Crowley4315c6a2016-12-06 08:22:04 -0800210include $(LOCAL_PATH)/tests/Android.mk