blob: febaac2ef70830a11cf09d8b59221c62f3dbe03e [file] [log] [blame]
San Mehatf1b736b2009-10-10 17:22:08 -07001LOCAL_PATH:= $(call my-dir)
2
Kenny Rootacc9e7d2010-06-18 19:06:50 -07003common_src_files := \
4 VolumeManager.cpp \
5 CommandListener.cpp \
6 VoldCommand.cpp \
7 NetlinkManager.cpp \
8 NetlinkHandler.cpp \
9 Volume.cpp \
10 DirectVolume.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070011 Process.cpp \
Kenny Root344ca102012-04-03 17:23:01 -070012 Ext4.cpp \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070013 Fat.cpp \
14 Loop.cpp \
15 Devmapper.cpp \
16 ResponseCode.cpp \
Paul Lawrence87999172014-02-20 12:21:31 -080017 CheckBattery.cpp \
Paul Lawrence707fd6c2015-04-28 22:14:15 +000018 Ext4Crypt.cpp \
Ken Sumrall9caab762013-06-11 19:10:20 -070019 VoldUtil.c \
Ken Sumrallb87937c2013-03-19 21:46:39 -070020 fstrim.c \
Ken Sumrall8f869aa2010-12-03 03:47:09 -080021 cryptfs.c
Kenny Rootacc9e7d2010-06-18 19:06:50 -070022
23common_c_includes := \
Ken Sumrall3ed82362011-01-28 23:31:16 -080024 system/extras/ext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000025 system/extras/f2fs_utils \
Paul Lawrence87999172014-02-20 12:21:31 -080026 external/scrypt/lib/crypto \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070027 frameworks/native/include \
28 system/security/keystore \
29 hardware/libhardware/include/hardware \
30 system/security/softkeymaster/include/keymaster
Kenny Rootacc9e7d2010-06-18 19:06:50 -070031
32common_shared_libraries := \
33 libsysutils \
Paul Lawrence87999172014-02-20 12:21:31 -080034 libbinder \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070035 libcutils \
Ying Wang741a1692013-04-09 22:05:28 -070036 liblog \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070037 libdiskconfig \
Ken Sumrall5d4c68e2011-01-30 19:06:03 -080038 libhardware_legacy \
Rom Lemarchand2ba45aa2013-01-16 12:29:28 -080039 liblogwrap \
Ken Sumrall5cf759a2013-08-14 20:15:17 -070040 libext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000041 libf2fs_sparseblock \
Robert Craigb9e3ba52014-02-04 10:53:00 -050042 libcrypto \
Paul Lawrence87999172014-02-20 12:21:31 -080043 libselinux \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070044 libutils \
45 libhardware \
Paul Crowley75a52022015-05-06 15:04:43 +010046 libsoftkeymaster \
47 libbase
Kenny Rootacc9e7d2010-06-18 19:06:50 -070048
Kenny Rootc4c70f12013-06-14 12:11:38 -070049common_static_libraries := \
50 libfs_mgr \
Sami Tolvanenefe67cd2015-06-01 15:38:29 +010051 libfec \
52 libfec_rs \
Mohamad Ayyashc489d7f2015-04-06 18:15:53 -070053 libsquashfs_utils \
Geremy Condrac49f0f22013-08-07 13:12:41 -070054 libscrypt_static \
Paul Lawrence87999172014-02-20 12:21:31 -080055 libmincrypt \
56 libbatteryservice
Kenny Rootc4c70f12013-06-14 12:11:38 -070057
Dan Albertc07fa3f2014-12-18 10:00:55 -080058vold_conlyflags := -std=c11
59vold_cflags := -Werror -Wall -Wno-missing-field-initializers
60
San Mehatf1b736b2009-10-10 17:22:08 -070061include $(CLEAR_VARS)
62
Dan Albertb2aaf3a2014-09-12 10:48:12 -070063LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Rootacc9e7d2010-06-18 19:06:50 -070064LOCAL_MODULE := libvold
Dan Albertc07fa3f2014-12-18 10:00:55 -080065LOCAL_CLANG := true
Kenny Rootacc9e7d2010-06-18 19:06:50 -070066LOCAL_SRC_FILES := $(common_src_files)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070067LOCAL_C_INCLUDES := $(common_c_includes)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070068LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -070069LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070070LOCAL_MODULE_TAGS := eng tests
Dan Albertc07fa3f2014-12-18 10:00:55 -080071LOCAL_CFLAGS := $(vold_cflags)
72LOCAL_CONLYFLAGS := $(vold_conlyflags)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070073
74include $(BUILD_STATIC_LIBRARY)
75
76include $(CLEAR_VARS)
San Mehatf1b736b2009-10-10 17:22:08 -070077
Dan Albertb2aaf3a2014-09-12 10:48:12 -070078LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
San Mehatf1b736b2009-10-10 17:22:08 -070079LOCAL_MODULE:= vold
Dan Albertc07fa3f2014-12-18 10:00:55 -080080LOCAL_CLANG := true
Kenny Rootacc9e7d2010-06-18 19:06:50 -070081LOCAL_SRC_FILES := \
82 main.cpp \
83 $(common_src_files)
84
Tom Cherrya2859842015-08-14 13:06:45 -070085LOCAL_INIT_RC := vold.rc
86
Kenny Rootacc9e7d2010-06-18 19:06:50 -070087LOCAL_C_INCLUDES := $(common_c_includes)
Dan Albertc07fa3f2014-12-18 10:00:55 -080088LOCAL_CFLAGS := $(vold_cflags)
89LOCAL_CONLYFLAGS := $(vold_conlyflags)
San Mehatf1b736b2009-10-10 17:22:08 -070090
Ajay Dudani87701e22014-09-17 21:02:52 -070091ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
92LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH)
93common_shared_libraries += libcryptfs_hw
94LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
95endif
96
Kenny Rootacc9e7d2010-06-18 19:06:50 -070097LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -070098LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Ken Sumrallf0679f02012-04-01 23:58:44 -070099
San Mehatf1b736b2009-10-10 17:22:08 -0700100include $(BUILD_EXECUTABLE)
101
102include $(CLEAR_VARS)
Kenny Root7b18a7b2010-03-15 13:13:41 -0700103
Dan Albertb2aaf3a2014-09-12 10:48:12 -0700104LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Dan Albertc07fa3f2014-12-18 10:00:55 -0800105LOCAL_CLANG := true
Paul Crowleyfde9cd82015-05-06 11:27:44 +0100106LOCAL_SRC_FILES:= vdc.cpp
San Mehatf1b736b2009-10-10 17:22:08 -0700107LOCAL_MODULE:= vdc
San Mehatf1b736b2009-10-10 17:22:08 -0700108LOCAL_SHARED_LIBRARIES := libcutils
Dan Albertc07fa3f2014-12-18 10:00:55 -0800109LOCAL_CFLAGS := $(vold_cflags)
110LOCAL_CONLYFLAGS := $(vold_conlyflags)
Tom Cherrya2859842015-08-14 13:06:45 -0700111LOCAL_INIT_RC := vdc.rc
San Mehatf1b736b2009-10-10 17:22:08 -0700112
113include $(BUILD_EXECUTABLE)