summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-05 21:24:24 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-05 21:24:31 +0200
commit51a0e82eb29a6dfc79f93479883383fbdbf8bcc2 (patch)
tree52fc18206eb0feba9f50dc3b0ede9fdc5e40f35e /Android.mk
parentInitial stub of partitions.hpp (diff)
downloadandroid_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.tar
android_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.tar.gz
android_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.tar.bz2
android_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.tar.lz
android_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.tar.xz
android_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.tar.zst
android_bootable_recovery-51a0e82eb29a6dfc79f93479883383fbdbf8bcc2.zip
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk192
1 files changed, 168 insertions, 24 deletions
diff --git a/Android.mk b/Android.mk
index 1c78b4287..03ba4cf31 100644
--- a/Android.mk
+++ b/Android.mk
@@ -14,6 +14,7 @@
LOCAL_PATH := $(call my-dir)
+TARGET_RECOVERY_GUI := true
include $(CLEAR_VARS)
@@ -27,32 +28,50 @@ LOCAL_SRC_FILES := \
verifier.cpp \
adb_install.cpp
+LOCAL_SRC_FILES += \
+ extra-functions.c \
+ data.cpp \
+ makelist.c \
+ firmware.c \
+ partition.cpp \
+ partitionmanager.cpp \
+ mtdutils/mtdutils.c
+
+ifeq ($(TARGET_RECOVERY_REBOOT_SRC),)
+ LOCAL_SRC_FILES += reboot.c
+else
+ LOCAL_SRC_FILES += $(TARGET_RECOVERY_REBOOT_SRC)
+endif
+
LOCAL_MODULE := recovery
-LOCAL_FORCE_STATIC_EXECUTABLE := true
+#LOCAL_FORCE_STATIC_EXECUTABLE := true
RECOVERY_API_VERSION := 3
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
-LOCAL_STATIC_LIBRARIES := \
- libext4_utils_static \
- libsparse_static \
- libminzip \
- libz \
- libmtdutils \
- libmincrypt \
- libminadbd \
- libminui \
- libpixelflinger_static \
- libpng \
- libcutils \
- libstdc++ \
- libc
+#LOCAL_STATIC_LIBRARIES := \
+# libext4_utils \
+# libminzip \
+# libmtdutils \
+# libmincrypt \
+# libminadbd \
+# libpixelflinger_static
+
+LOCAL_C_INCLUDES += bionic external/stlport/stlport
+
+LOCAL_STATIC_LIBRARIES :=
+LOCAL_SHARED_LIBRARIES :=
+
+LOCAL_STATIC_LIBRARIES += libmtdutils
+LOCAL_STATIC_LIBRARIES += libext4_utils libminadbd libminzip libunz libmincrypt
+LOCAL_STATIC_LIBRARIES += libminuitwrp libpixelflinger_static libpng libjpegtwrp
+LOCAL_SHARED_LIBRARIES += libz libc libstlport libcutils libstdc++
ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
LOCAL_CFLAGS += -DUSE_EXT4
LOCAL_C_INCLUDES += system/extras/ext4_utils
- LOCAL_STATIC_LIBRARIES += libext4_utils_static libz
+ LOCAL_STATIC_LIBRARIES += libext4_utils
endif
ifeq ($(HAVE_SELINUX), true)
@@ -73,14 +92,118 @@ else
LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif
-ifeq ($(HAVE_SELINUX),true)
- LOCAL_C_INCLUDES += external/libselinux/include
- LOCAL_STATIC_LIBRARIES += libselinux
- LOCAL_CFLAGS += -DHAVE_SELINUX
-endif # HAVE_SELINUX
-
LOCAL_C_INCLUDES += system/extras/ext4_utils
+#TWRP Build Flags
+ifeq ($(BOARD_HAS_NO_REAL_SDCARD), true)
+ LOCAL_CFLAGS += -DBOARD_HAS_NO_REAL_SDCARD
+endif
+ifneq ($(SP1_NAME),)
+ LOCAL_CFLAGS += -DSP1_NAME=$(SP1_NAME) -DSP1_BACKUP_METHOD=$(SP1_BACKUP_METHOD) -DSP1_MOUNTABLE=$(SP1_MOUNTABLE)
+endif
+ifneq ($(SP1_DISPLAY_NAME),)
+ LOCAL_CFLAGS += -DSP1_DISPLAY_NAME=$(SP1_DISPLAY_NAME)
+endif
+ifneq ($(SP2_NAME),)
+ LOCAL_CFLAGS += -DSP2_NAME=$(SP2_NAME) -DSP2_BACKUP_METHOD=$(SP2_BACKUP_METHOD) -DSP2_MOUNTABLE=$(SP2_MOUNTABLE)
+endif
+ifneq ($(SP2_DISPLAY_NAME),)
+ LOCAL_CFLAGS += -DSP2_DISPLAY_NAME=$(SP2_DISPLAY_NAME)
+endif
+ifneq ($(SP3_NAME),)
+ LOCAL_CFLAGS += -DSP3_NAME=$(SP3_NAME) -DSP3_BACKUP_METHOD=$(SP3_BACKUP_METHOD) -DSP3_MOUNTABLE=$(SP3_MOUNTABLE)
+endif
+ifneq ($(SP3_DISPLAY_NAME),)
+ LOCAL_CFLAGS += -DSP3_DISPLAY_NAME=$(SP3_DISPLAY_NAME)
+endif
+ifneq ($(RECOVERY_SDCARD_ON_DATA),)
+ LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
+endif
+ifneq ($(TW_INCLUDE_DUMLOCK),)
+ LOCAL_CFLAGS += -DTW_INCLUDE_DUMLOCK
+endif
+ifneq ($(TW_INTERNAL_STORAGE_PATH),)
+ LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_PATH=$(TW_INTERNAL_STORAGE_PATH)
+endif
+ifneq ($(TW_INTERNAL_STORAGE_MOUNT_POINT),)
+ LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_MOUNT_POINT=$(TW_INTERNAL_STORAGE_MOUNT_POINT)
+endif
+ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
+ LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
+endif
+ifneq ($(TW_EXTERNAL_STORAGE_MOUNT_POINT),)
+ LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_MOUNT_POINT=$(TW_EXTERNAL_STORAGE_MOUNT_POINT)
+endif
+ifeq ($(TW_HAS_NO_RECOVERY_PARTITION), true)
+ LOCAL_CFLAGS += -DTW_HAS_NO_RECOVERY_PARTITION
+endif
+ifeq ($(TW_NO_REBOOT_BOOTLOADER), true)
+ LOCAL_CFLAGS += -DTW_NO_REBOOT_BOOTLOADER
+endif
+ifeq ($(TW_NO_REBOOT_RECOVERY), true)
+ LOCAL_CFLAGS += -DTW_NO_REBOOT_RECOVERY
+endif
+ifeq ($(TW_NO_BATT_PERCENT), true)
+ LOCAL_CFLAGS += -DTW_NO_BATT_PERCENT
+endif
+ifneq ($(TW_CUSTOM_POWER_BUTTON),)
+ LOCAL_CFLAGS += -DTW_CUSTOM_POWER_BUTTON=$(TW_CUSTOM_POWER_BUTTON)
+endif
+ifeq ($(TW_ALWAYS_RMRF), true)
+ LOCAL_CFLAGS += -DTW_ALWAYS_RMRF
+endif
+ifeq ($(TW_NEVER_UNMOUNT_SYSTEM), true)
+ LOCAL_CFLAGS += -DTW_NEVER_UNMOUNT_SYSTEM
+endif
+ifeq ($(TW_NO_USB_STORAGE), true)
+ LOCAL_CFLAGS += -DTW_NO_USB_STORAGE
+endif
+ifeq ($(TW_INCLUDE_INJECTTWRP), true)
+ LOCAL_CFLAGS += -DTW_INCLUDE_INJECTTWRP
+endif
+ifeq ($(TW_INCLUDE_BLOBPACK), true)
+ LOCAL_CFLAGS += -DTW_INCLUDE_BLOBPACK
+endif
+ifeq ($(TW_DEFAULT_EXTERNAL_STORAGE), true)
+ LOCAL_CFLAGS += -DTW_DEFAULT_EXTERNAL_STORAGE
+endif
+ifneq ($(TARGET_USE_CUSTOM_LUN_FILE_PATH),)
+ LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(TARGET_USE_CUSTOM_LUN_FILE_PATH)\"
+endif
+ifneq ($(BOARD_UMS_LUNFILE),)
+ LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(BOARD_UMS_LUNFILE)\"
+endif
+#ifeq ($(TW_FLASH_FROM_STORAGE), true) Making this the default behavior
+ LOCAL_CFLAGS += -DTW_FLASH_FROM_STORAGE
+#endif
+ifeq ($(TW_HAS_DOWNLOAD_MODE), true)
+ LOCAL_CFLAGS += -DTW_HAS_DOWNLOAD_MODE
+endif
+ifeq ($(TW_SDEXT_NO_EXT4), true)
+ LOCAL_CFLAGS += -DTW_SDEXT_NO_EXT4
+endif
+ifeq ($(TW_INCLUDE_CRYPTO), true)
+ LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO
+ LOCAL_CFLAGS += -DCRYPTO_FS_TYPE=\"$(TW_CRYPTO_FS_TYPE)\"
+ LOCAL_CFLAGS += -DCRYPTO_REAL_BLKDEV=\"$(TW_CRYPTO_REAL_BLKDEV)\"
+ LOCAL_CFLAGS += -DCRYPTO_MNT_POINT=\"$(TW_CRYPTO_MNT_POINT)\"
+ LOCAL_CFLAGS += -DCRYPTO_FS_OPTIONS=\"$(TW_CRYPTO_FS_OPTIONS)\"
+ LOCAL_CFLAGS += -DCRYPTO_FS_FLAGS=\"$(TW_CRYPTO_FS_FLAGS)\"
+ LOCAL_CFLAGS += -DCRYPTO_KEY_LOC=\"$(TW_CRYPTO_KEY_LOC)\"
+ LOCAL_SHARED_LIBRARIES += libcrypto
+ LOCAL_SRC_FILES += crypto/ics/cryptfs.c
+ LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include
+endif
+ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
+ LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO
+ LOCAL_CFLAGS += -DTW_INCLUDE_JB_CRYPTO
+ LOCAL_SHARED_LIBRARIES += libcrypto
+ LOCAL_STATIC_LIBRARIES += libfs_mgrtwrp
+ LOCAL_SRC_FILES += crypto/jb/cryptfs.c
+ LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include
+endif
+
+
include $(BUILD_EXECUTABLE)
@@ -101,13 +224,34 @@ LOCAL_STATIC_LIBRARIES := \
libc
include $(BUILD_EXECUTABLE)
-
+commands_recovery_local_path := $(LOCAL_PATH)
include $(LOCAL_PATH)/minui/Android.mk \
$(LOCAL_PATH)/minelf/Android.mk \
$(LOCAL_PATH)/minzip/Android.mk \
$(LOCAL_PATH)/minadbd/Android.mk \
- $(LOCAL_PATH)/mtdutils/Android.mk \
$(LOCAL_PATH)/tools/Android.mk \
$(LOCAL_PATH)/edify/Android.mk \
$(LOCAL_PATH)/updater/Android.mk \
$(LOCAL_PATH)/applypatch/Android.mk
+
+#includes for TWRP
+include $(commands_recovery_local_path)/libjpegtwrp/Android.mk \
+ $(commands_recovery_local_path)/injecttwrp/Android.mk \
+ $(commands_recovery_local_path)/htcdumlock/Android.mk \
+ $(commands_recovery_local_path)/minuitwrp/Android.mk \
+ $(commands_recovery_local_path)/gui/Android.mk \
+ $(commands_recovery_local_path)/mmcutils/Android.mk \
+ $(commands_recovery_local_path)/bmlutils/Android.mk \
+ $(commands_recovery_local_path)/flashutils/Android.mk \
+ $(commands_recovery_local_path)/prebuilt/Android.mk \
+ $(commands_recovery_local_path)/mtdutils/Android.mk \
+ $(commands_recovery_local_path)/pigz/Android.mk \
+ $(commands_recovery_local_path)/crypto/cryptsettings/Android.mk \
+ $(commands_recovery_local_path)/libcrecovery/Android.mk
+
+ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
+ include $(commands_recovery_local_path)/crypto/fs_mgr/Android.mk
+endif
+
+commands_recovery_local_path :=
+