Android.mk 2.32 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
	VoldUtil.c \
19
	fstrim.c \
20
	cryptfs.c
21 22

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

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

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

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

57 58
include $(CLEAR_VARS)

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

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
73

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

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

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

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

94 95 96
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
97

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

include $(BUILD_EXECUTABLE)