San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
2 | |||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 3 | common_src_files := \ |
4 | VolumeManager.cpp \ | ||||
5 | CommandListener.cpp \ | ||||
Paul Lawrence | d0b4295 | 2015-06-03 14:19:51 -0700 | [diff] [blame] | 6 | CryptCommandListener.cpp \ |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 7 | VoldCommand.cpp \ |
8 | NetlinkManager.cpp \ | ||||
9 | NetlinkHandler.cpp \ | ||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 10 | Process.cpp \ |
Jeff Sharkey | d0640f6 | 2015-05-21 22:35:42 -0700 | [diff] [blame] | 11 | fs/Ext4.cpp \ |
12 | fs/F2fs.cpp \ | ||||
13 | fs/Vfat.cpp \ | ||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 14 | Loop.cpp \ |
15 | Devmapper.cpp \ | ||||
16 | ResponseCode.cpp \ | ||||
Paul Lawrence | 8799917 | 2014-02-20 12:21:31 -0800 | [diff] [blame] | 17 | CheckBattery.cpp \ |
Paul Lawrence | 707fd6c | 2015-04-28 22:14:15 +0000 | [diff] [blame] | 18 | Ext4Crypt.cpp \ |
Ken Sumrall | 9caab76 | 2013-06-11 19:10:20 -0700 | [diff] [blame] | 19 | VoldUtil.c \ |
Wei Wang | 4375f1b | 2017-02-24 17:43:01 -0800 | [diff] [blame] | 20 | cryptfs.cpp \ |
Jeff Sharkey | 11c2d38 | 2017-09-11 10:32:01 -0600 | [diff] [blame] | 21 | model/Disk.cpp \ |
22 | model/VolumeBase.cpp \ | ||||
23 | model/PublicVolume.cpp \ | ||||
24 | model/PrivateVolume.cpp \ | ||||
25 | model/EmulatedVolume.cpp \ | ||||
26 | model/ObbVolume.cpp \ | ||||
Jeff Sharkey | deb2405 | 2015-03-02 21:01:40 -0800 | [diff] [blame] | 27 | Utils.cpp \ |
Jeff Sharkey | 1d6fbcc | 2015-04-24 16:00:03 -0700 | [diff] [blame] | 28 | MoveTask.cpp \ |
Jeff Sharkey | 5a6bfca | 2015-05-14 20:33:55 -0700 | [diff] [blame] | 29 | Benchmark.cpp \ |
Jeff Sharkey | c86ab6f | 2015-06-26 14:02:09 -0700 | [diff] [blame] | 30 | TrimTask.cpp \ |
Pavel Grafov | e2e2d30 | 2017-08-01 17:15:53 +0100 | [diff] [blame] | 31 | KeyBuffer.cpp \ |
Paul Crowley | 1ef2558 | 2016-01-21 20:26:12 +0000 | [diff] [blame] | 32 | Keymaster.cpp \ |
33 | KeyStorage.cpp \ | ||||
Paul Crowley | f71ace3 | 2016-06-02 11:01:19 -0700 | [diff] [blame] | 34 | KeyUtil.cpp \ |
Paul Crowley | 63c18d3 | 2016-02-10 14:02:47 +0000 | [diff] [blame] | 35 | ScryptParameters.cpp \ |
Jeff Vander Stoep | df72575 | 2016-01-29 15:34:43 -0800 | [diff] [blame] | 36 | secontext.cpp \ |
Paul Crowley | f71ace3 | 2016-06-02 11:01:19 -0700 | [diff] [blame] | 37 | EncryptInplace.cpp \ |
Paul Crowley | d575981 | 2016-06-02 11:04:27 -0700 | [diff] [blame] | 38 | MetadataCrypt.cpp \ |
Jeff Sharkey | 068c6be | 2017-09-06 13:47:40 -0600 | [diff] [blame] | 39 | binder/android/os/IVold.aidl \ |
Jeff Sharkey | 814e9d3 | 2017-09-13 11:49:44 -0600 | [diff] [blame] | 40 | binder/android/os/IVoldListener.aidl \ |
Jeff Sharkey | 068c6be | 2017-09-06 13:47:40 -0600 | [diff] [blame] | 41 | VoldNativeService.cpp \ |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 42 | |
43 | common_c_includes := \ | ||||
Daniel Rosenberg | e82df16 | 2014-08-15 22:19:23 +0000 | [diff] [blame] | 44 | system/extras/f2fs_utils \ |
Paul Lawrence | 8799917 | 2014-02-20 12:21:31 -0800 | [diff] [blame] | 45 | external/scrypt/lib/crypto \ |
Paul Crowley | f71ace3 | 2016-06-02 11:01:19 -0700 | [diff] [blame] | 46 | external/f2fs-tools/include \ |
Paul Lawrence | 69f4ebd | 2014-04-14 12:17:14 -0700 | [diff] [blame] | 47 | frameworks/native/include \ |
48 | system/security/keystore \ | ||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 49 | |
50 | common_shared_libraries := \ | ||||
51 | libsysutils \ | ||||
Paul Lawrence | 8799917 | 2014-02-20 12:21:31 -0800 | [diff] [blame] | 52 | libbinder \ |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 53 | libcutils \ |
Elliott Hughes | c3bda18 | 2017-05-09 17:01:04 -0700 | [diff] [blame] | 54 | libkeyutils \ |
Ying Wang | 741a169 | 2013-04-09 22:05:28 -0700 | [diff] [blame] | 55 | liblog \ |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 56 | libdiskconfig \ |
Ken Sumrall | 5d4c68e | 2011-01-30 19:06:03 -0800 | [diff] [blame] | 57 | libhardware_legacy \ |
Rom Lemarchand | 2ba45aa | 2013-01-16 12:29:28 -0800 | [diff] [blame] | 58 | liblogwrap \ |
Ken Sumrall | 5cf759a | 2013-08-14 20:15:17 -0700 | [diff] [blame] | 59 | libext4_utils \ |
Daniel Rosenberg | e82df16 | 2014-08-15 22:19:23 +0000 | [diff] [blame] | 60 | libf2fs_sparseblock \ |
Mattias Nissler | dc80323 | 2016-03-31 16:32:59 +0200 | [diff] [blame] | 61 | libcrypto_utils \ |
Robert Craig | b9e3ba5 | 2014-02-04 10:53:00 -0500 | [diff] [blame] | 62 | libcrypto \ |
Paul Lawrence | 8799917 | 2014-02-20 12:21:31 -0800 | [diff] [blame] | 63 | libselinux \ |
Paul Lawrence | 69f4ebd | 2014-04-14 12:17:14 -0700 | [diff] [blame] | 64 | libutils \ |
65 | libhardware \ | ||||
Paul Crowley | 1ef2558 | 2016-01-21 20:26:12 +0000 | [diff] [blame] | 66 | libbase \ |
Janis Danisevskis | 8e537b8 | 2016-10-26 14:27:10 +0100 | [diff] [blame] | 67 | libhwbinder \ |
68 | libhidlbase \ | ||||
69 | android.hardware.keymaster@3.0 \ | ||||
70 | libkeystore_binder | ||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 71 | |
Kenny Root | c4c70f1 | 2013-06-14 12:11:38 -0700 | [diff] [blame] | 72 | common_static_libraries := \ |
Yabin Cui | 1fb5966 | 2016-06-24 14:48:49 -0700 | [diff] [blame] | 73 | libbootloader_message \ |
Kenny Root | c4c70f1 | 2013-06-14 12:11:38 -0700 | [diff] [blame] | 74 | libfs_mgr \ |
Sami Tolvanen | efe67cd | 2015-06-01 15:38:29 +0100 | [diff] [blame] | 75 | libfec \ |
76 | libfec_rs \ | ||||
Mohamad Ayyash | c489d7f | 2015-04-06 18:15:53 -0700 | [diff] [blame] | 77 | libsquashfs_utils \ |
Geremy Condra | c49f0f2 | 2013-08-07 13:12:41 -0700 | [diff] [blame] | 78 | libscrypt_static \ |
Paul Crowley | 1ef2558 | 2016-01-21 20:26:12 +0000 | [diff] [blame] | 79 | libbatteryservice \ |
bowgotsai | 58bdac8 | 2017-01-07 00:44:35 +0800 | [diff] [blame] | 80 | libavb \ |
Kenny Root | c4c70f1 | 2013-06-14 12:11:38 -0700 | [diff] [blame] | 81 | |
Jeff Sharkey | 32ebb73 | 2017-03-27 16:18:50 -0600 | [diff] [blame] | 82 | # TODO: include "cert-err34-c" once we move to Binder |
83 | # TODO: include "cert-err58-cpp" once 36656327 is fixed | ||||
Jeff Sharkey | 83b559c | 2017-09-12 16:30:52 -0600 | [diff] [blame] | 84 | common_local_tidy_enabled := true |
Jeff Sharkey | 32ebb73 | 2017-03-27 16:18:50 -0600 | [diff] [blame] | 85 | common_local_tidy_flags := -warnings-as-errors=clang-analyzer-security*,cert-* |
86 | common_local_tidy_checks := -*,clang-analyzer-security*,cert-*,-cert-err34-c,-cert-err58-cpp | ||||
87 | |||||
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 88 | vold_conlyflags := -std=c11 |
Jeff Sharkey | deb2405 | 2015-03-02 21:01:40 -0800 | [diff] [blame] | 89 | vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 90 | |
Adrien Schildknecht | e0f409c | 2016-11-21 15:14:37 -0800 | [diff] [blame] | 91 | required_modules := |
92 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) | ||||
Jin Qian | b678d7c | 2017-08-15 16:44:04 -0700 | [diff] [blame] | 93 | required_modules += mke2fs |
Adrien Schildknecht | e0f409c | 2016-11-21 15:14:37 -0800 | [diff] [blame] | 94 | endif |
95 | |||||
San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 96 | include $(CLEAR_VARS) |
97 | |||||
Dan Albert | b2aaf3a | 2014-09-12 10:48:12 -0700 | [diff] [blame] | 98 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 99 | LOCAL_MODULE := libvold |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 100 | LOCAL_CLANG := true |
Jeff Sharkey | 83b559c | 2017-09-12 16:30:52 -0600 | [diff] [blame] | 101 | LOCAL_TIDY := $(common_local_tidy_enabled) |
Jeff Sharkey | 32ebb73 | 2017-03-27 16:18:50 -0600 | [diff] [blame] | 102 | LOCAL_TIDY_FLAGS := $(common_local_tidy_flags) |
103 | LOCAL_TIDY_CHECKS := $(common_local_tidy_checks) | ||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 104 | LOCAL_SRC_FILES := $(common_src_files) |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 105 | LOCAL_C_INCLUDES := $(common_c_includes) |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 106 | LOCAL_SHARED_LIBRARIES := $(common_shared_libraries) |
Kenny Root | c4c70f1 | 2013-06-14 12:11:38 -0700 | [diff] [blame] | 107 | LOCAL_STATIC_LIBRARIES := $(common_static_libraries) |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 108 | LOCAL_MODULE_TAGS := eng tests |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 109 | LOCAL_CFLAGS := $(vold_cflags) |
110 | LOCAL_CONLYFLAGS := $(vold_conlyflags) | ||||
Adrien Schildknecht | e0f409c | 2016-11-21 15:14:37 -0800 | [diff] [blame] | 111 | LOCAL_REQUIRED_MODULES := $(required_modules) |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 112 | |
Jeff Sharkey | 814e9d3 | 2017-09-13 11:49:44 -0600 | [diff] [blame] | 113 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder |
114 | |||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 115 | include $(BUILD_STATIC_LIBRARY) |
116 | |||||
117 | include $(CLEAR_VARS) | ||||
San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 118 | |
Dan Albert | b2aaf3a | 2014-09-12 10:48:12 -0700 | [diff] [blame] | 119 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Jeff Sharkey | 47695b2 | 2016-02-01 17:02:29 -0700 | [diff] [blame] | 120 | LOCAL_MODULE := vold |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 121 | LOCAL_CLANG := true |
Jeff Sharkey | 83b559c | 2017-09-12 16:30:52 -0600 | [diff] [blame] | 122 | LOCAL_TIDY := $(common_local_tidy_enabled) |
Jeff Sharkey | 32ebb73 | 2017-03-27 16:18:50 -0600 | [diff] [blame] | 123 | LOCAL_TIDY_FLAGS := $(common_local_tidy_flags) |
124 | LOCAL_TIDY_CHECKS := $(common_local_tidy_checks) | ||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 125 | LOCAL_SRC_FILES := \ |
126 | main.cpp \ | ||||
127 | $(common_src_files) | ||||
128 | |||||
Tom Cherry | a285984 | 2015-08-14 13:06:45 -0700 | [diff] [blame] | 129 | LOCAL_INIT_RC := vold.rc |
130 | |||||
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 131 | LOCAL_C_INCLUDES := $(common_c_includes) |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 132 | LOCAL_CFLAGS := $(vold_cflags) |
133 | LOCAL_CONLYFLAGS := $(vold_conlyflags) | ||||
San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 134 | |
Kenny Root | acc9e7d | 2010-06-18 19:06:50 -0700 | [diff] [blame] | 135 | LOCAL_SHARED_LIBRARIES := $(common_shared_libraries) |
Kenny Root | c4c70f1 | 2013-06-14 12:11:38 -0700 | [diff] [blame] | 136 | LOCAL_STATIC_LIBRARIES := $(common_static_libraries) |
Adrien Schildknecht | e0f409c | 2016-11-21 15:14:37 -0800 | [diff] [blame] | 137 | LOCAL_REQUIRED_MODULES := $(required_modules) |
Ken Sumrall | f0679f0 | 2012-04-01 23:58:44 -0700 | [diff] [blame] | 138 | |
Jeff Sharkey | 068c6be | 2017-09-06 13:47:40 -0600 | [diff] [blame] | 139 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder |
140 | |||||
San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 141 | include $(BUILD_EXECUTABLE) |
142 | |||||
143 | include $(CLEAR_VARS) | ||||
Kenny Root | 7b18a7b | 2010-03-15 13:13:41 -0700 | [diff] [blame] | 144 | |
Dan Albert | b2aaf3a | 2014-09-12 10:48:12 -0700 | [diff] [blame] | 145 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 146 | LOCAL_CLANG := true |
Jeff Sharkey | 83b559c | 2017-09-12 16:30:52 -0600 | [diff] [blame] | 147 | LOCAL_TIDY := $(common_local_tidy_enabled) |
Jeff Sharkey | 32ebb73 | 2017-03-27 16:18:50 -0600 | [diff] [blame] | 148 | LOCAL_TIDY_FLAGS := $(common_local_tidy_flags) |
149 | LOCAL_TIDY_CHECKS := $(common_local_tidy_checks) | ||||
Jeff Sharkey | 0990b69 | 2017-09-14 17:24:26 -0600 | [diff] [blame^] | 150 | |
151 | LOCAL_SRC_FILES := \ | ||||
152 | vdc.cpp \ | ||||
153 | binder/android/os/IVold.aidl \ | ||||
154 | binder/android/os/IVoldListener.aidl \ | ||||
155 | |||||
Jeff Sharkey | 47695b2 | 2016-02-01 17:02:29 -0700 | [diff] [blame] | 156 | LOCAL_MODULE := vdc |
Jeff Sharkey | 99f9268 | 2017-09-13 18:43:44 -0600 | [diff] [blame] | 157 | LOCAL_SHARED_LIBRARIES := libbase libbinder libcutils libutils |
Dan Albert | c07fa3f | 2014-12-18 10:00:55 -0800 | [diff] [blame] | 158 | LOCAL_CFLAGS := $(vold_cflags) |
159 | LOCAL_CONLYFLAGS := $(vold_conlyflags) | ||||
Tom Cherry | a285984 | 2015-08-14 13:06:45 -0700 | [diff] [blame] | 160 | LOCAL_INIT_RC := vdc.rc |
San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 161 | |
Jeff Sharkey | 99f9268 | 2017-09-13 18:43:44 -0600 | [diff] [blame] | 162 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder |
163 | |||||
San Mehat | f1b736b | 2009-10-10 17:22:08 -0700 | [diff] [blame] | 164 | include $(BUILD_EXECUTABLE) |
Paul Crowley | 5bd0daf | 2015-05-19 17:31:39 +0100 | [diff] [blame] | 165 | |
166 | include $(CLEAR_VARS) | ||||
167 | |||||
168 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | ||||
169 | LOCAL_CLANG := true | ||||
Jeff Sharkey | 83b559c | 2017-09-12 16:30:52 -0600 | [diff] [blame] | 170 | LOCAL_TIDY := $(common_local_tidy_enabled) |
Jeff Sharkey | 32ebb73 | 2017-03-27 16:18:50 -0600 | [diff] [blame] | 171 | LOCAL_TIDY_FLAGS := $(common_local_tidy_flags) |
172 | LOCAL_TIDY_CHECKS := $(common_local_tidy_checks) | ||||
Paul Crowley | 03f89d3 | 2017-06-16 09:37:31 -0700 | [diff] [blame] | 173 | LOCAL_SRC_FILES:= \ |
174 | FileDeviceUtils.cpp \ | ||||
175 | secdiscard.cpp \ | ||||
176 | |||||
Paul Crowley | 5bd0daf | 2015-05-19 17:31:39 +0100 | [diff] [blame] | 177 | LOCAL_MODULE:= secdiscard |
Paul Crowley | 8bb8fcf | 2016-01-11 12:26:44 +0000 | [diff] [blame] | 178 | LOCAL_SHARED_LIBRARIES := libbase |
Paul Crowley | 5bd0daf | 2015-05-19 17:31:39 +0100 | [diff] [blame] | 179 | LOCAL_CFLAGS := $(vold_cflags) |
180 | LOCAL_CONLYFLAGS := $(vold_conlyflags) | ||||
181 | |||||
182 | include $(BUILD_EXECUTABLE) | ||||
Paul Crowley | 4315c6a | 2016-12-06 08:22:04 -0800 | [diff] [blame] | 183 | |
184 | include $(LOCAL_PATH)/tests/Android.mk |