blob: e5eb89dbea61ce139ffd74000a54c81ae660a6c8 [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 \
Jeff Sharkeydeb24052015-03-02 21:01:40 -080020 cryptfs.c \
21 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 \
Paul Crowley1ef25582016-01-21 20:26:12 +000030 Keymaster.cpp \
31 KeyStorage.cpp \
Paul Crowley63c18d32016-02-10 14:02:47 +000032 ScryptParameters.cpp \
Jeff Vander Stoepdf725752016-01-29 15:34:43 -080033 secontext.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070034
35common_c_includes := \
Daniel Rosenberge82df162014-08-15 22:19:23 +000036 system/extras/f2fs_utils \
Paul Lawrence87999172014-02-20 12:21:31 -080037 external/scrypt/lib/crypto \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070038 frameworks/native/include \
39 system/security/keystore \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070040
41common_shared_libraries := \
42 libsysutils \
Paul Lawrence87999172014-02-20 12:21:31 -080043 libbinder \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070044 libcutils \
Ying Wang741a1692013-04-09 22:05:28 -070045 liblog \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070046 libdiskconfig \
Ken Sumrall5d4c68e2011-01-30 19:06:03 -080047 libhardware_legacy \
Rom Lemarchand2ba45aa2013-01-16 12:29:28 -080048 liblogwrap \
Ken Sumrall5cf759a2013-08-14 20:15:17 -070049 libext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000050 libf2fs_sparseblock \
Mattias Nisslerdc803232016-03-31 16:32:59 +020051 libcrypto_utils \
Robert Craigb9e3ba52014-02-04 10:53:00 -050052 libcrypto \
Paul Lawrence87999172014-02-20 12:21:31 -080053 libselinux \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070054 libutils \
55 libhardware \
Dan Albertae9e8902015-03-16 10:35:17 -070056 libsoftkeymaster \
Paul Crowley1ef25582016-01-21 20:26:12 +000057 libbase \
Paul Crowleydff8c722016-05-16 08:14:56 -070058 libsoftkeymasterdevice \
Paul Crowley1ef25582016-01-21 20:26:12 +000059 libkeymaster_messages \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070060
Kenny Rootc4c70f12013-06-14 12:11:38 -070061common_static_libraries := \
Yabin Cui1fb59662016-06-24 14:48:49 -070062 libbootloader_message \
Kenny Rootc4c70f12013-06-14 12:11:38 -070063 libfs_mgr \
Sami Tolvanenefe67cd2015-06-01 15:38:29 +010064 libfec \
65 libfec_rs \
Mohamad Ayyashc489d7f2015-04-06 18:15:53 -070066 libsquashfs_utils \
Geremy Condrac49f0f22013-08-07 13:12:41 -070067 libscrypt_static \
Paul Crowley1ef25582016-01-21 20:26:12 +000068 libbatteryservice \
Kenny Rootc4c70f12013-06-14 12:11:38 -070069
Dan Albertc07fa3f2014-12-18 10:00:55 -080070vold_conlyflags := -std=c11
Jeff Sharkeydeb24052015-03-02 21:01:40 -080071vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
Dan Albertc07fa3f2014-12-18 10:00:55 -080072
Adrien Schildknechte0f409c2016-11-21 15:14:37 -080073required_modules :=
74ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
75 ifeq ($(TARGET_USES_MKE2FS), true)
76 vold_cflags += -DTARGET_USES_MKE2FS
77 required_modules += mke2fs
78 else
79 required_modules += make_ext4fs
80 endif
81endif
82
San Mehatf1b736b2009-10-10 17:22:08 -070083include $(CLEAR_VARS)
84
Dan Albertb2aaf3a2014-09-12 10:48:12 -070085LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Rootacc9e7d2010-06-18 19:06:50 -070086LOCAL_MODULE := libvold
Dan Albertc07fa3f2014-12-18 10:00:55 -080087LOCAL_CLANG := true
Kenny Rootacc9e7d2010-06-18 19:06:50 -070088LOCAL_SRC_FILES := $(common_src_files)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070089LOCAL_C_INCLUDES := $(common_c_includes)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070090LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -070091LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070092LOCAL_MODULE_TAGS := eng tests
Dan Albertc07fa3f2014-12-18 10:00:55 -080093LOCAL_CFLAGS := $(vold_cflags)
94LOCAL_CONLYFLAGS := $(vold_conlyflags)
Adrien Schildknechte0f409c2016-11-21 15:14:37 -080095LOCAL_REQUIRED_MODULES := $(required_modules)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070096
97include $(BUILD_STATIC_LIBRARY)
98
99include $(CLEAR_VARS)
San Mehatf1b736b2009-10-10 17:22:08 -0700100
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700101LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jeff Sharkey47695b22016-02-01 17:02:29 -0700102LOCAL_MODULE := vold
Dan Albertc07fa3f2014-12-18 10:00:55 -0800103LOCAL_CLANG := true
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700104LOCAL_SRC_FILES := \
105 main.cpp \
106 $(common_src_files)
107
Tom Cherrya2859842015-08-14 13:06:45 -0700108LOCAL_INIT_RC := vold.rc
109
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700110LOCAL_C_INCLUDES := $(common_c_includes)
Dan Albertc07fa3f2014-12-18 10:00:55 -0800111LOCAL_CFLAGS := $(vold_cflags)
112LOCAL_CONLYFLAGS := $(vold_conlyflags)
San Mehatf1b736b2009-10-10 17:22:08 -0700113
Ajay Dudani87701e22014-09-17 21:02:52 -0700114ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
115LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH)
116common_shared_libraries += libcryptfs_hw
117LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
118endif
119
Kenny Rootacc9e7d2010-06-18 19:06:50 -0700120LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -0700121LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Adrien Schildknechte0f409c2016-11-21 15:14:37 -0800122LOCAL_REQUIRED_MODULES := $(required_modules)
Ken Sumrallf0679f02012-04-01 23:58:44 -0700123
San Mehatf1b736b2009-10-10 17:22:08 -0700124include $(BUILD_EXECUTABLE)
125
126include $(CLEAR_VARS)
Kenny Root7b18a7b2010-03-15 13:13:41 -0700127
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700128LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Dan Albertc07fa3f2014-12-18 10:00:55 -0800129LOCAL_CLANG := true
Jeff Sharkey47695b22016-02-01 17:02:29 -0700130LOCAL_SRC_FILES := vdc.cpp
131LOCAL_MODULE := vdc
132LOCAL_SHARED_LIBRARIES := libcutils libbase
Dan Albertc07fa3f2014-12-18 10:00:55 -0800133LOCAL_CFLAGS := $(vold_cflags)
134LOCAL_CONLYFLAGS := $(vold_conlyflags)
Tom Cherrya2859842015-08-14 13:06:45 -0700135LOCAL_INIT_RC := vdc.rc
San Mehatf1b736b2009-10-10 17:22:08 -0700136
137include $(BUILD_EXECUTABLE)
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100138
139include $(CLEAR_VARS)
140
141LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
142LOCAL_CLANG := true
143LOCAL_SRC_FILES:= secdiscard.cpp
144LOCAL_MODULE:= secdiscard
Paul Crowley8bb8fcf2016-01-11 12:26:44 +0000145LOCAL_SHARED_LIBRARIES := libbase
Paul Crowley5bd0daf2015-05-19 17:31:39 +0100146LOCAL_CFLAGS := $(vold_cflags)
147LOCAL_CONLYFLAGS := $(vold_conlyflags)
148
149include $(BUILD_EXECUTABLE)
Paul Crowley4315c6a2016-12-06 08:22:04 -0800150
151include $(LOCAL_PATH)/tests/Android.mk