Android.mk 2.3 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
	libscrypt_static \
50 51
	libmincrypt \
	libbatteryservice
Kenny Root's avatar
Kenny Root committed
52

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

56 57
include $(CLEAR_VARS)

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

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
72

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

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

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

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

93 94 95
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
96

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

include $(BUILD_EXECUTABLE)