Android.mk 2.99 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
	secontext.cpp \
33 34

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

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

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

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

73 74
include $(CLEAR_VARS)

Dan Albert's avatar
Dan Albert committed
75
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
76
LOCAL_MODULE := libvold
77
LOCAL_CLANG := true
78 79 80
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
81
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
82
LOCAL_MODULE_TAGS := eng tests
83 84
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
85 86 87 88

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
89

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

97 98
LOCAL_INIT_RC := vold.rc

99
LOCAL_C_INCLUDES := $(common_c_includes)
100 101
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
102

Ajay Dudani's avatar
Ajay Dudani committed
103 104 105 106 107 108
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

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

112 113 114
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
115

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

include $(BUILD_EXECUTABLE)
126 127 128 129 130 131 132

include $(CLEAR_VARS)

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

include $(BUILD_EXECUTABLE)