Android.mk 3.05 KB
Newer Older
1 2
LOCAL_PATH:= $(call my-dir)

3 4 5
common_src_files := \
	VolumeManager.cpp \
	CommandListener.cpp \
6
	CryptCommandListener.cpp \
7 8 9 10
	VoldCommand.cpp \
	NetlinkManager.cpp \
	NetlinkHandler.cpp \
	Process.cpp \
11 12 13
	fs/Ext4.cpp \
	fs/F2fs.cpp \
	fs/Vfat.cpp \
14 15 16
	Loop.cpp \
	Devmapper.cpp \
	ResponseCode.cpp \
17
	CheckBattery.cpp \
18
	Ext4Crypt.cpp \
19
	VoldUtil.c \
20 21 22 23
	cryptfs.c \
	Disk.cpp \
	VolumeBase.cpp \
	PublicVolume.cpp \
24
	PrivateVolume.cpp \
25 26
	EmulatedVolume.cpp \
	Utils.cpp \
27
	MoveTask.cpp \
28
	Benchmark.cpp \
29
	TrimTask.cpp \
30 31
	Keymaster.cpp \
	KeyStorage.cpp \
32
	ScryptParameters.cpp \
33
	secontext.cpp \
34 35

common_c_includes := \
36
	system/extras/ext4_utils \
37
	system/extras/f2fs_utils \
38
	external/scrypt/lib/crypto \
39 40 41 42
	frameworks/native/include \
	system/security/keystore \
	hardware/libhardware/include/hardware \
	system/security/softkeymaster/include/keymaster
43 44 45

common_shared_libraries := \
	libsysutils \
46
	libbinder \
47
	libcutils \
Ying Wang's avatar
Ying Wang committed
48
	liblog \
49
	libdiskconfig \
50
	libhardware_legacy \
51
	liblogwrap \
52
	libext4_utils \
53
	libf2fs_sparseblock \
54
	libcrypto \
55
	libselinux \
56 57
	libutils \
	libhardware \
Dan Albert's avatar
Dan Albert committed
58
	libsoftkeymaster \
59 60
	libbase \
	libkeymaster_messages \
61

Kenny Root's avatar
Kenny Root committed
62
common_static_libraries := \
63
	libbootloader_message_writer \
Kenny Root's avatar
Kenny Root committed
64
	libfs_mgr \
65 66
	libfec \
	libfec_rs \
67
	libsquashfs_utils \
68
	libscrypt_static \
69
	libmincrypt \
70
	libbatteryservice \
Kenny Root's avatar
Kenny Root committed
71

72
vold_conlyflags := -std=c11
73
vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
74

75 76
include $(CLEAR_VARS)

Dan Albert's avatar
Dan Albert committed
77
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
78
LOCAL_MODULE := libvold
79
LOCAL_CLANG := true
80 81 82
LOCAL_SRC_FILES := $(common_src_files)
LOCAL_C_INCLUDES := $(common_c_includes)
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Root's avatar
Kenny Root committed
83
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
84
LOCAL_MODULE_TAGS := eng tests
85 86
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
87 88 89 90

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
91

Dan Albert's avatar
Dan Albert committed
92
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
93
LOCAL_MODULE := vold
94
LOCAL_CLANG := true
95 96 97 98
LOCAL_SRC_FILES := \
	main.cpp \
	$(common_src_files)

99 100
LOCAL_INIT_RC := vold.rc

101
LOCAL_C_INCLUDES := $(common_c_includes)
102 103
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
104

Ajay Dudani's avatar
Ajay Dudani committed
105 106 107 108 109 110
ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH)
common_shared_libraries += libcryptfs_hw
LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
endif

111
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Root's avatar
Kenny Root committed
112
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
113

114 115 116
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
117

Dan Albert's avatar
Dan Albert committed
118
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
119
LOCAL_CLANG := true
120 121 122
LOCAL_SRC_FILES := vdc.cpp
LOCAL_MODULE := vdc
LOCAL_SHARED_LIBRARIES := libcutils libbase
123 124
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
125
LOCAL_INIT_RC := vdc.rc
126 127

include $(BUILD_EXECUTABLE)
128 129 130 131 132 133 134

include $(CLEAR_VARS)

LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_CLANG := true
LOCAL_SRC_FILES:= secdiscard.cpp
LOCAL_MODULE:= secdiscard
135
LOCAL_SHARED_LIBRARIES := libbase
136 137 138 139
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)

include $(BUILD_EXECUTABLE)