blob: cf2b291f4f486bfe13507f9a4ec283bdb46d4eb9 [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 \
Ken Sumrall9caab762013-06-11 19:10:20 -070018 VoldUtil.c \
Ken Sumrallb87937c2013-03-19 21:46:39 -070019 fstrim.c \
Ken Sumrall8f869aa2010-12-03 03:47:09 -080020 cryptfs.c
Kenny Rootacc9e7d2010-06-18 19:06:50 -070021
22common_c_includes := \
Ken Sumrall3ed82362011-01-28 23:31:16 -080023 system/extras/ext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000024 system/extras/f2fs_utils \
Paul Lawrence87999172014-02-20 12:21:31 -080025 external/scrypt/lib/crypto \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070026 frameworks/native/include \
27 system/security/keystore \
28 hardware/libhardware/include/hardware \
29 system/security/softkeymaster/include/keymaster
Kenny Rootacc9e7d2010-06-18 19:06:50 -070030
31common_shared_libraries := \
32 libsysutils \
Paul Lawrence87999172014-02-20 12:21:31 -080033 libbinder \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070034 libcutils \
Ying Wang741a1692013-04-09 22:05:28 -070035 liblog \
Kenny Rootacc9e7d2010-06-18 19:06:50 -070036 libdiskconfig \
Ken Sumrall5d4c68e2011-01-30 19:06:03 -080037 libhardware_legacy \
Rom Lemarchand2ba45aa2013-01-16 12:29:28 -080038 liblogwrap \
Ken Sumrall5cf759a2013-08-14 20:15:17 -070039 libext4_utils \
Daniel Rosenberge82df162014-08-15 22:19:23 +000040 libf2fs_sparseblock \
Robert Craigb9e3ba52014-02-04 10:53:00 -050041 libcrypto \
Paul Lawrence87999172014-02-20 12:21:31 -080042 libselinux \
Paul Lawrence69f4ebd2014-04-14 12:17:14 -070043 libutils \
44 libhardware \
45 libsoftkeymaster
Kenny Rootacc9e7d2010-06-18 19:06:50 -070046
Kenny Rootc4c70f12013-06-14 12:11:38 -070047common_static_libraries := \
48 libfs_mgr \
Geremy Condrac49f0f22013-08-07 13:12:41 -070049 libscrypt_static \
Paul Lawrence87999172014-02-20 12:21:31 -080050 libmincrypt \
51 libbatteryservice
Kenny Rootc4c70f12013-06-14 12:11:38 -070052
Dan Albertc07fa3f2014-12-18 10:00:55 -080053vold_conlyflags := -std=c11
54vold_cflags := -Werror -Wall -Wno-missing-field-initializers
55
San Mehatf1b736b2009-10-10 17:22:08 -070056include $(CLEAR_VARS)
57
Dan Albertb2aaf3a2014-09-12 10:48:12 -070058LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Kenny Rootacc9e7d2010-06-18 19:06:50 -070059LOCAL_MODULE := libvold
Dan Albertc07fa3f2014-12-18 10:00:55 -080060LOCAL_CLANG := true
Kenny Rootacc9e7d2010-06-18 19:06:50 -070061LOCAL_SRC_FILES := $(common_src_files)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070062LOCAL_C_INCLUDES := $(common_c_includes)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070063LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -070064LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070065LOCAL_MODULE_TAGS := eng tests
Dan Albertc07fa3f2014-12-18 10:00:55 -080066LOCAL_CFLAGS := $(vold_cflags)
67LOCAL_CONLYFLAGS := $(vold_conlyflags)
Kenny Rootacc9e7d2010-06-18 19:06:50 -070068
69include $(BUILD_STATIC_LIBRARY)
70
71include $(CLEAR_VARS)
San Mehatf1b736b2009-10-10 17:22:08 -070072
Dan Albertb2aaf3a2014-09-12 10:48:12 -070073LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
San Mehatf1b736b2009-10-10 17:22:08 -070074LOCAL_MODULE:= vold
Dan Albertc07fa3f2014-12-18 10:00:55 -080075LOCAL_CLANG := true
Kenny Rootacc9e7d2010-06-18 19:06:50 -070076LOCAL_SRC_FILES := \
77 main.cpp \
78 $(common_src_files)
79
80LOCAL_C_INCLUDES := $(common_c_includes)
Dan Albertc07fa3f2014-12-18 10:00:55 -080081LOCAL_CFLAGS := $(vold_cflags)
82LOCAL_CONLYFLAGS := $(vold_conlyflags)
San Mehatf1b736b2009-10-10 17:22:08 -070083
Ajay Dudani87701e22014-09-17 21:02:52 -070084ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
85LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH)
86common_shared_libraries += libcryptfs_hw
87LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
88endif
89
Kenny Rootacc9e7d2010-06-18 19:06:50 -070090LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
Kenny Rootc4c70f12013-06-14 12:11:38 -070091LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
Ken Sumrallf0679f02012-04-01 23:58:44 -070092
San Mehatf1b736b2009-10-10 17:22:08 -070093include $(BUILD_EXECUTABLE)
94
95include $(CLEAR_VARS)
Kenny Root7b18a7b2010-03-15 13:13:41 -070096
Dan Albertb2aaf3a2014-09-12 10:48:12 -070097LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Dan Albertc07fa3f2014-12-18 10:00:55 -080098LOCAL_CLANG := true
Kenny Root7b18a7b2010-03-15 13:13:41 -070099LOCAL_SRC_FILES:= vdc.c
San Mehatf1b736b2009-10-10 17:22:08 -0700100LOCAL_MODULE:= vdc
San Mehatf1b736b2009-10-10 17:22:08 -0700101LOCAL_SHARED_LIBRARIES := libcutils
Dan Albertc07fa3f2014-12-18 10:00:55 -0800102LOCAL_CFLAGS := $(vold_cflags)
103LOCAL_CONLYFLAGS := $(vold_conlyflags)
San Mehatf1b736b2009-10-10 17:22:08 -0700104
105include $(BUILD_EXECUTABLE)