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