blob: f6a8da9d9936d49977c955c8f34b3c7518254777 [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 \
5 CommandListener.cpp \
Paul Lawrenced0b42952015-06-03 14:19:51 -07006 CryptCommandListener.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -07007 VoldCommand.cpp \
8 NetlinkManager.cpp \
9 NetlinkHandler.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070010 Process.cpp \
Jeff Sharkeyd0640f62015-05-21 22:35:42 -070011 fs/Ext4.cpp \
12 fs/F2fs.cpp \
13 fs/Vfat.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070014 Loop.cpp \
15 Devmapper.cpp \
16 ResponseCode.cpp \
Paul Lawrence87999172014-02-20 12:21:31 -080017 CheckBattery.cpp \
Paul Lawrence707fd6c2015-04-28 22:14:15 +000018 Ext4Crypt.cpp \
Ken Sumrall9caab762013-06-11 19:10:20 -070019 VoldUtil.c \
Wei Wang4375f1b2017-02-24 17:43:01 -080020 cryptfs.cpp \
Jeff Sharkeydeb24052015-03-02 21:01:40 -080021 Disk.cpp \
22 VolumeBase.cpp \
23 PublicVolume.cpp \
Jeff Sharkey9c484982015-03-31 10:35:33 -070024 PrivateVolume.cpp \
Jeff Sharkeydeb24052015-03-02 21:01:40 -080025 EmulatedVolume.cpp \
26 Utils.cpp \
Jeff Sharkey1d6fbcc2015-04-24 16:00:03 -070027 MoveTask.cpp \
Jeff Sharkey5a6bfca2015-05-14 20:33:55 -070028 Benchmark.cpp \
Jeff Sharkeyc86ab6f2015-06-26 14:02:09 -070029 TrimTask.cpp \
Pavel Grafove2e2d302017-08-01 17:15:53 +010030 KeyBuffer.cpp \
Paul Crowley1ef25582016-01-21 20:26:12 +000031 Keymaster.cpp \
32 KeyStorage.cpp \
Paul Crowleyf71ace32016-06-02 11:01:19 -070033 KeyUtil.cpp \
Paul Crowley63c18d32016-02-10 14:02:47 +000034 ScryptParameters.cpp \
Jeff Vander Stoepdf725752016-01-29 15:34:43 -080035 secontext.cpp \
Paul Crowleyf71ace32016-06-02 11:01:19 -070036 EncryptInplace.cpp \
Paul Crowleyd5759812016-06-02 11:04:27 -070037 MetadataCrypt.cpp \
Jeff Sharkey068c6be2017-09-06 13:47:40 -060038 binder/android/os/IVold.aidl \
39 VoldNativeService.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070040
41common_c_includes := \
Daniel Rosenberge82df162014-08-15 22:19:23 +000042 system/extras/f2fs_utils \
Paul Lawrence87999172014-02-20 12:21:31 -080043 external/scrypt/lib/crypto \
Paul Crowleyf71ace32016-06-02 11:01:19 -070044 external/f2fs-tools/include \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070045 frameworks/native/include \
46 system/security/keystore \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070047
48common_shared_libraries := \
49 libsysutils \
Paul Lawrence87999172014-02-20 12:21:31 -080050 libbinder \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070051 libcutils \
Elliott Hughesc3bda182017-05-09 17:01:04 -070052 libkeyutils \
Ying Wang741a1692013-04-09 22:05:28 -070053 liblog \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070054 libdiskconfig \
Ken Sumrall5d4c68e2011-01-30 19:06:03 -080055 libhardware_legacy \
Rom Lemarchand2ba45aa2013-01-16 12:29:28 -080056 liblogwrap \
Ken Sumrall5cf759a2013-08-14 20:15:17 -070057 libext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000058 libf2fs_sparseblock \
Mattias Nisslerdc803232016-03-31 16:32:59 +020059 libcrypto_utils \
Robert Craigb9e3ba52014-02-04 10:53:00 -050060 libcrypto \
Paul Lawrence87999172014-02-20 12:21:31 -080061 libselinux \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070062 libutils \
63 libhardware \
Paul Crowley1ef25582016-01-21 20:26:12 +000064 libbase \
Janis Danisevskis8e537b82016-10-26 14:27:10 +010065 libhwbinder \
66 libhidlbase \
67 android.hardware.keymaster@3.0 \
68 libkeystore_binder
Kenny Rootacc9e7d2010-06-18 19:06:50 -070069
Kenny Rootc4c70f12013-06-14 12:11:38 -070070common_static_libraries := \
Yabin Cui1fb59662016-06-24 14:48:49 -070071 libbootloader_message \
Kenny Rootc4c70f12013-06-14 12:11:38 -070072 libfs_mgr \
Sami Tolvanenefe67cd2015-06-01 15:38:29 +010073 libfec \
74 libfec_rs \
Mohamad Ayyashc489d7f2015-04-06 18:15:53 -070075 libsquashfs_utils \
Geremy Condrac49f0f22013-08-07 13:12:41 -070076 libscrypt_static \
Paul Crowley1ef25582016-01-21 20:26:12 +000077 libbatteryservice \
bowgotsai58bdac82017-01-07 00:44:35 +080078 libavb \
Kenny Rootc4c70f12013-06-14 12:11:38 -070079
Jeff Sharkey32ebb732017-03-27 16:18:50 -060080# TODO: include "cert-err34-c" once we move to Binder
81# TODO: include "cert-err58-cpp" once 36656327 is fixed
82common_local_tidy_flags := -warnings-as-errors=clang-analyzer-security*,cert-*
83common_local_tidy_checks := -*,clang-analyzer-security*,cert-*,-cert-err34-c,-cert-err58-cpp
84
Dan Albertc07fa3f2014-12-18 10:00:55 -080085vold_conlyflags := -std=c11
Jeff Sharkeydeb24052015-03-02 21:01:40 -080086vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
Dan Albertc07fa3f2014-12-18 10:00:55 -080087
Adrien Schildknechte0f409c2016-11-21 15:14:37 -080088required_modules :=
89ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
Jin Qianb678d7c2017-08-15 16:44:04 -070090 required_modules += mke2fs
Adrien Schildknechte0f409c2016-11-21 15:14:37 -080091endif
92
San Mehatf1b736b2009-10-10 17:22:08 -070093include $(CLEAR_VARS)
94
Dan Albertb2aaf3a2014-09-12 10:48:12 -070095LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Rootacc9e7d2010-06-18 19:06:50 -070096LOCAL_MODULE := libvold
Dan Albertc07fa3f2014-12-18 10:00:55 -080097LOCAL_CLANG := true
Jeff Sharkey32ebb732017-03-27 16:18:50 -060098LOCAL_TIDY := true
99LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
100LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700101LOCAL_SRC_FILES := $(common_src_files)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700102LOCAL_C_INCLUDES := $(common_c_includes)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700103LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -0700104LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700105LOCAL_MODULE_TAGS := eng tests
Dan Albertc07fa3f2014-12-18 10:00:55 -0800106LOCAL_CFLAGS := $(vold_cflags)
107LOCAL_CONLYFLAGS := $(vold_conlyflags)
Adrien Schildknechte0f409c2016-11-21 15:14:37 -0800108LOCAL_REQUIRED_MODULES := $(required_modules)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700109
110include $(BUILD_STATIC_LIBRARY)
111
112include $(CLEAR_VARS)
San Mehatf1b736b2009-10-10 17:22:08 -0700113
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700114LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jeff Sharkey47695b22016-02-01 17:02:29 -0700115LOCAL_MODULE := vold
Dan Albertc07fa3f2014-12-18 10:00:55 -0800116LOCAL_CLANG := true
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600117LOCAL_TIDY := true
118LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
119LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700120LOCAL_SRC_FILES := \
121 main.cpp \
122 $(common_src_files)
123
Tom Cherrya2859842015-08-14 13:06:45 -0700124LOCAL_INIT_RC := vold.rc
125
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700126LOCAL_C_INCLUDES := $(common_c_includes)
Dan Albertc07fa3f2014-12-18 10:00:55 -0800127LOCAL_CFLAGS := $(vold_cflags)
128LOCAL_CONLYFLAGS := $(vold_conlyflags)
San Mehatf1b736b2009-10-10 17:22:08 -0700129
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700130LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -0700131LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Adrien Schildknechte0f409c2016-11-21 15:14:37 -0800132LOCAL_REQUIRED_MODULES := $(required_modules)
Ken Sumrallf0679f02012-04-01 23:58:44 -0700133
Jeff Sharkey068c6be2017-09-06 13:47:40 -0600134LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder
135
San Mehatf1b736b2009-10-10 17:22:08 -0700136include $(BUILD_EXECUTABLE)
137
138include $(CLEAR_VARS)
Kenny Root7b18a7b2010-03-15 13:13:41 -0700139
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700140LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Dan Albertc07fa3f2014-12-18 10:00:55 -0800141LOCAL_CLANG := true
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600142LOCAL_TIDY := true
143LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
144LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Jeff Sharkey47695b22016-02-01 17:02:29 -0700145LOCAL_SRC_FILES := vdc.cpp
146LOCAL_MODULE := vdc
147LOCAL_SHARED_LIBRARIES := libcutils libbase
Dan Albertc07fa3f2014-12-18 10:00:55 -0800148LOCAL_CFLAGS := $(vold_cflags)
149LOCAL_CONLYFLAGS := $(vold_conlyflags)
Tom Cherrya2859842015-08-14 13:06:45 -0700150LOCAL_INIT_RC := vdc.rc
San Mehatf1b736b2009-10-10 17:22:08 -0700151
152include $(BUILD_EXECUTABLE)
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100153
154include $(CLEAR_VARS)
155
156LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
157LOCAL_CLANG := true
Jeff Sharkey32ebb732017-03-27 16:18:50 -0600158LOCAL_TIDY := true
159LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
160LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
Paul Crowley03f89d32017-06-16 09:37:31 -0700161LOCAL_SRC_FILES:= \
162 FileDeviceUtils.cpp \
163 secdiscard.cpp \
164
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100165LOCAL_MODULE:= secdiscard
Paul Crowley8bb8fcf2016-01-11 12:26:44 +0000166LOCAL_SHARED_LIBRARIES := libbase
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100167LOCAL_CFLAGS := $(vold_cflags)
168LOCAL_CONLYFLAGS := $(vold_conlyflags)
169
170include $(BUILD_EXECUTABLE)
Paul Crowley4315c6a2016-12-06 08:22:04 -0800171
172include $(LOCAL_PATH)/tests/Android.mk