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

3 4 5 6 7 8 9 10 11
common_src_files := \
	VolumeManager.cpp \
	CommandListener.cpp \
	VoldCommand.cpp \
	NetlinkManager.cpp \
	NetlinkHandler.cpp \
	Volume.cpp \
	DirectVolume.cpp \
	Process.cpp \
12
	Ext4.cpp \
13 14 15 16
	Fat.cpp \
	Loop.cpp \
	Devmapper.cpp \
	ResponseCode.cpp \
17
	CheckBattery.cpp \
18
	Ext4Crypt.cpp \
19
	VoldUtil.c \
20
	fstrim.c \
21
	cryptfs.c
22 23

common_c_includes := \
24
	system/extras/ext4_utils \
25
	system/extras/f2fs_utils \
26
	external/scrypt/lib/crypto \
27 28 29 30
	frameworks/native/include \
	system/security/keystore \
	hardware/libhardware/include/hardware \
	system/security/softkeymaster/include/keymaster
31 32 33

common_shared_libraries := \
	libsysutils \
34
	libbinder \
35
	libcutils \
Ying Wang's avatar
Ying Wang committed
36
	liblog \
37
	libdiskconfig \
38
	libhardware_legacy \
39
	liblogwrap \
40
	libext4_utils \
41
	libf2fs_sparseblock \
42
	libcrypto \
43
	libselinux \
44 45 46
	libutils \
	libhardware \
	libsoftkeymaster
47

Kenny Root's avatar
Kenny Root committed
48 49
common_static_libraries := \
	libfs_mgr \
50
	libsquashfs_utils \
51
	libscrypt_static \
52 53
	libmincrypt \
	libbatteryservice
Kenny Root's avatar
Kenny Root committed
54

55 56 57
vold_conlyflags := -std=c11
vold_cflags := -Werror -Wall -Wno-missing-field-initializers

58 59
include $(CLEAR_VARS)

Dan Albert's avatar
Dan Albert committed
60
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
61
LOCAL_MODULE := libvold
62
LOCAL_CLANG := true
63 64 65
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
66
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
67
LOCAL_MODULE_TAGS := eng tests
68 69
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
70 71 72 73

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
74

Dan Albert's avatar
Dan Albert committed
75
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
76
LOCAL_MODULE:= vold
77
LOCAL_CLANG := true
78 79 80 81 82
LOCAL_SRC_FILES := \
	main.cpp \
	$(common_src_files)

LOCAL_C_INCLUDES := $(common_c_includes)
83 84
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
85

Ajay Dudani's avatar
Ajay Dudani committed
86 87 88 89 90 91
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

92
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Root's avatar
Kenny Root committed
93
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
94

95 96 97
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
98

Dan Albert's avatar
Dan Albert committed
99
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
100
LOCAL_CLANG := true
101
LOCAL_SRC_FILES:= vdc.c
102 103
LOCAL_MODULE:= vdc
LOCAL_SHARED_LIBRARIES := libcutils
104 105
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
106 107

include $(BUILD_EXECUTABLE)