Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 1 | # Copyright (C) 2007 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 14 | |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 17 | TARGET_RECOVERY_GUI := true |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 18 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 19 | LOCAL_SRC_FILES := \ |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 20 | twrp.cpp \ |
bigbiff bigbiff | a0f8a59 | 2012-10-09 21:01:03 -0400 | [diff] [blame] | 21 | fixPermissions.cpp \ |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 22 | twrpTar.cpp \ |
bigbiff bigbiff | cdcfee4 | 2013-02-27 21:11:26 -0500 | [diff] [blame] | 23 | twrpDigest.cpp \ |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 24 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 25 | LOCAL_SRC_FILES += \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 26 | data.cpp \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 27 | partition.cpp \ |
| 28 | partitionmanager.cpp \ |
Dees_Troy | 32c8eb8 | 2012-09-11 15:28:06 -0400 | [diff] [blame] | 29 | twinstall.cpp \ |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 30 | twrp-functions.cpp \ |
Dees_Troy | e34c133 | 2013-02-06 19:13:00 +0000 | [diff] [blame] | 31 | openrecoveryscript.cpp \ |
| 32 | tarWrite.c |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 33 | |
Dees_Troy | a58bead | 2012-09-27 09:49:29 -0400 | [diff] [blame] | 34 | ifneq ($(TARGET_RECOVERY_REBOOT_SRC),) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 35 | LOCAL_SRC_FILES += $(TARGET_RECOVERY_REBOOT_SRC) |
| 36 | endif |
| 37 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 38 | LOCAL_MODULE := recovery |
| 39 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 40 | #LOCAL_FORCE_STATIC_EXECUTABLE := true |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 41 | |
Doug Zongker | e08991e | 2010-02-02 13:09:52 -0800 | [diff] [blame] | 42 | RECOVERY_API_VERSION := 3 |
Doug Zongker | fb2e3af | 2009-06-17 17:29:40 -0700 | [diff] [blame] | 43 | LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) |
| 44 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 45 | #LOCAL_STATIC_LIBRARIES := \ |
| 46 | # libext4_utils \ |
| 47 | # libminzip \ |
| 48 | # libmtdutils \ |
| 49 | # libmincrypt \ |
| 50 | # libminadbd \ |
| 51 | # libpixelflinger_static |
| 52 | |
| 53 | LOCAL_C_INCLUDES += bionic external/stlport/stlport |
| 54 | |
| 55 | LOCAL_STATIC_LIBRARIES := |
| 56 | LOCAL_SHARED_LIBRARIES := |
| 57 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 58 | LOCAL_STATIC_LIBRARIES += libcrecovery libguitwrp |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 59 | LOCAL_SHARED_LIBRARIES += libz libc libstlport libcutils libstdc++ libtar libblkid libminuitwrp libminadbd libmtdutils libminzip libaosprecovery |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 60 | |
Dees_Troy | 4546fe7 | 2013-01-10 14:33:27 +0000 | [diff] [blame] | 61 | ifneq ($(wildcard system/core/libsparse/Android.mk),) |
| 62 | LOCAL_SHARED_LIBRARIES += libsparse |
| 63 | endif |
| 64 | |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 65 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 66 | LOCAL_CFLAGS += -DUSE_EXT4 |
| 67 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 68 | LOCAL_SHARED_LIBRARIES += libext4_utils |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 69 | endif |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 70 | LOCAL_C_INCLUDES += external/libselinux/include |
Stephen Smalley | 1a11449 | 2012-01-13 07:59:51 -0500 | [diff] [blame] | 71 | ifeq ($(HAVE_SELINUX), true) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 72 | #LOCAL_C_INCLUDES += external/libselinux/include |
| 73 | #LOCAL_STATIC_LIBRARIES += libselinux |
| 74 | #LOCAL_CFLAGS += -DHAVE_SELINUX -g |
Stephen Smalley | 1a11449 | 2012-01-13 07:59:51 -0500 | [diff] [blame] | 75 | endif # HAVE_SELINUX |
Dees_Troy | e3850a3 | 2013-08-29 18:33:47 +0000 | [diff] [blame] | 76 | ifeq ($(HAVE_SELINUX), true) |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 77 | LOCAL_C_INCLUDES += external/libselinux/include |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 78 | LOCAL_SHARED_LIBRARIES += libselinux |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 79 | LOCAL_CFLAGS += -DHAVE_SELINUX -g |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 80 | ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 81 | LOCAL_CFLAGS += -DUSE_EXT4 |
| 82 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
| 83 | LOCAL_SHARED_LIBRARIES += libext4_utils |
| 84 | endif |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 85 | endif |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 86 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 87 | # This binary is in the recovery ramdisk, which is otherwise a copy of root. |
| 88 | # It gets copied there in config/Makefile. LOCAL_MODULE_TAGS suppresses |
| 89 | # a (redundant) copy of the binary in /system/bin for user builds. |
| 90 | # TODO: Build the ramdisk image in a more principled way. |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 91 | LOCAL_MODULE_TAGS := eng |
| 92 | |
Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 93 | ifeq ($(TARGET_RECOVERY_UI_LIB),) |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 94 | LOCAL_SRC_FILES += default_device.cpp |
Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 95 | else |
| 96 | LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB) |
| 97 | endif |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 98 | |
Doug Zongker | cc8cd3f | 2010-09-20 12:16:13 -0700 | [diff] [blame] | 99 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
| 100 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 101 | #TWRP Build Flags |
Ricardo Gomez | c9ecd44 | 2013-07-05 16:13:52 -0700 | [diff] [blame] | 102 | ifneq ($(TW_NO_SCREEN_TIMEOUT),) |
| 103 | LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT |
| 104 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 105 | ifeq ($(BOARD_HAS_NO_REAL_SDCARD), true) |
| 106 | LOCAL_CFLAGS += -DBOARD_HAS_NO_REAL_SDCARD |
| 107 | endif |
| 108 | ifneq ($(SP1_NAME),) |
| 109 | LOCAL_CFLAGS += -DSP1_NAME=$(SP1_NAME) -DSP1_BACKUP_METHOD=$(SP1_BACKUP_METHOD) -DSP1_MOUNTABLE=$(SP1_MOUNTABLE) |
| 110 | endif |
| 111 | ifneq ($(SP1_DISPLAY_NAME),) |
| 112 | LOCAL_CFLAGS += -DSP1_DISPLAY_NAME=$(SP1_DISPLAY_NAME) |
| 113 | endif |
| 114 | ifneq ($(SP2_NAME),) |
| 115 | LOCAL_CFLAGS += -DSP2_NAME=$(SP2_NAME) -DSP2_BACKUP_METHOD=$(SP2_BACKUP_METHOD) -DSP2_MOUNTABLE=$(SP2_MOUNTABLE) |
| 116 | endif |
| 117 | ifneq ($(SP2_DISPLAY_NAME),) |
| 118 | LOCAL_CFLAGS += -DSP2_DISPLAY_NAME=$(SP2_DISPLAY_NAME) |
| 119 | endif |
| 120 | ifneq ($(SP3_NAME),) |
| 121 | LOCAL_CFLAGS += -DSP3_NAME=$(SP3_NAME) -DSP3_BACKUP_METHOD=$(SP3_BACKUP_METHOD) -DSP3_MOUNTABLE=$(SP3_MOUNTABLE) |
| 122 | endif |
| 123 | ifneq ($(SP3_DISPLAY_NAME),) |
| 124 | LOCAL_CFLAGS += -DSP3_DISPLAY_NAME=$(SP3_DISPLAY_NAME) |
| 125 | endif |
| 126 | ifneq ($(RECOVERY_SDCARD_ON_DATA),) |
| 127 | LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA |
| 128 | endif |
| 129 | ifneq ($(TW_INCLUDE_DUMLOCK),) |
| 130 | LOCAL_CFLAGS += -DTW_INCLUDE_DUMLOCK |
| 131 | endif |
| 132 | ifneq ($(TW_INTERNAL_STORAGE_PATH),) |
| 133 | LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_PATH=$(TW_INTERNAL_STORAGE_PATH) |
| 134 | endif |
| 135 | ifneq ($(TW_INTERNAL_STORAGE_MOUNT_POINT),) |
| 136 | LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_MOUNT_POINT=$(TW_INTERNAL_STORAGE_MOUNT_POINT) |
| 137 | endif |
| 138 | ifneq ($(TW_EXTERNAL_STORAGE_PATH),) |
| 139 | LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH) |
| 140 | endif |
| 141 | ifneq ($(TW_EXTERNAL_STORAGE_MOUNT_POINT),) |
| 142 | LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_MOUNT_POINT=$(TW_EXTERNAL_STORAGE_MOUNT_POINT) |
| 143 | endif |
| 144 | ifeq ($(TW_HAS_NO_RECOVERY_PARTITION), true) |
| 145 | LOCAL_CFLAGS += -DTW_HAS_NO_RECOVERY_PARTITION |
| 146 | endif |
ChampionSwimmer | cf33e4d | 2013-02-03 13:59:22 +0530 | [diff] [blame] | 147 | ifeq ($(TW_HAS_NO_BOOT_PARTITION), true) |
| 148 | LOCAL_CFLAGS += -DTW_HAS_NO_BOOT_PARTITION |
| 149 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 150 | ifeq ($(TW_NO_REBOOT_BOOTLOADER), true) |
| 151 | LOCAL_CFLAGS += -DTW_NO_REBOOT_BOOTLOADER |
| 152 | endif |
| 153 | ifeq ($(TW_NO_REBOOT_RECOVERY), true) |
| 154 | LOCAL_CFLAGS += -DTW_NO_REBOOT_RECOVERY |
| 155 | endif |
| 156 | ifeq ($(TW_NO_BATT_PERCENT), true) |
| 157 | LOCAL_CFLAGS += -DTW_NO_BATT_PERCENT |
| 158 | endif |
| 159 | ifneq ($(TW_CUSTOM_POWER_BUTTON),) |
| 160 | LOCAL_CFLAGS += -DTW_CUSTOM_POWER_BUTTON=$(TW_CUSTOM_POWER_BUTTON) |
| 161 | endif |
| 162 | ifeq ($(TW_ALWAYS_RMRF), true) |
| 163 | LOCAL_CFLAGS += -DTW_ALWAYS_RMRF |
| 164 | endif |
| 165 | ifeq ($(TW_NEVER_UNMOUNT_SYSTEM), true) |
| 166 | LOCAL_CFLAGS += -DTW_NEVER_UNMOUNT_SYSTEM |
| 167 | endif |
| 168 | ifeq ($(TW_NO_USB_STORAGE), true) |
| 169 | LOCAL_CFLAGS += -DTW_NO_USB_STORAGE |
| 170 | endif |
| 171 | ifeq ($(TW_INCLUDE_INJECTTWRP), true) |
| 172 | LOCAL_CFLAGS += -DTW_INCLUDE_INJECTTWRP |
| 173 | endif |
| 174 | ifeq ($(TW_INCLUDE_BLOBPACK), true) |
| 175 | LOCAL_CFLAGS += -DTW_INCLUDE_BLOBPACK |
| 176 | endif |
| 177 | ifeq ($(TW_DEFAULT_EXTERNAL_STORAGE), true) |
| 178 | LOCAL_CFLAGS += -DTW_DEFAULT_EXTERNAL_STORAGE |
| 179 | endif |
| 180 | ifneq ($(TARGET_USE_CUSTOM_LUN_FILE_PATH),) |
| 181 | LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(TARGET_USE_CUSTOM_LUN_FILE_PATH)\" |
| 182 | endif |
| 183 | ifneq ($(BOARD_UMS_LUNFILE),) |
| 184 | LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(BOARD_UMS_LUNFILE)\" |
| 185 | endif |
| 186 | #ifeq ($(TW_FLASH_FROM_STORAGE), true) Making this the default behavior |
| 187 | LOCAL_CFLAGS += -DTW_FLASH_FROM_STORAGE |
| 188 | #endif |
| 189 | ifeq ($(TW_HAS_DOWNLOAD_MODE), true) |
| 190 | LOCAL_CFLAGS += -DTW_HAS_DOWNLOAD_MODE |
| 191 | endif |
bigbiff bigbiff | 8794036 | 2013-03-09 09:58:50 -0500 | [diff] [blame] | 192 | ifeq ($(TW_NO_SCREEN_BLANK), true) |
| 193 | LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK |
| 194 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 195 | ifeq ($(TW_SDEXT_NO_EXT4), true) |
| 196 | LOCAL_CFLAGS += -DTW_SDEXT_NO_EXT4 |
| 197 | endif |
Dees_Troy | fdf5fcc | 2012-09-11 10:27:01 -0400 | [diff] [blame] | 198 | ifeq ($(TW_FORCE_CPUINFO_FOR_DEVICE_ID), true) |
| 199 | LOCAL_CFLAGS += -DTW_FORCE_CPUINFO_FOR_DEVICE_ID |
| 200 | endif |
Dees_Troy | 3f5c4e8 | 2013-02-01 15:16:59 +0000 | [diff] [blame] | 201 | ifeq ($(TW_NO_EXFAT_FUSE), true) |
| 202 | LOCAL_CFLAGS += -DTW_NO_EXFAT_FUSE |
| 203 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 204 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
| 205 | LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO |
| 206 | LOCAL_CFLAGS += -DCRYPTO_FS_TYPE=\"$(TW_CRYPTO_FS_TYPE)\" |
| 207 | LOCAL_CFLAGS += -DCRYPTO_REAL_BLKDEV=\"$(TW_CRYPTO_REAL_BLKDEV)\" |
| 208 | LOCAL_CFLAGS += -DCRYPTO_MNT_POINT=\"$(TW_CRYPTO_MNT_POINT)\" |
| 209 | LOCAL_CFLAGS += -DCRYPTO_FS_OPTIONS=\"$(TW_CRYPTO_FS_OPTIONS)\" |
| 210 | LOCAL_CFLAGS += -DCRYPTO_FS_FLAGS=\"$(TW_CRYPTO_FS_FLAGS)\" |
| 211 | LOCAL_CFLAGS += -DCRYPTO_KEY_LOC=\"$(TW_CRYPTO_KEY_LOC)\" |
a3955269 | 6ff55ce | 2013-01-08 16:14:56 +0000 | [diff] [blame] | 212 | ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true) |
| 213 | LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO_SAMSUNG=\"$(TW_INCLUDE_CRYPTO_SAMSUNG)\" |
| 214 | ifdef TW_CRYPTO_SD_REAL_BLKDEV |
| 215 | LOCAL_CFLAGS += -DCRYPTO_SD_REAL_BLKDEV=\"$(TW_CRYPTO_SD_REAL_BLKDEV)\" |
| 216 | LOCAL_CFLAGS += -DCRYPTO_SD_FS_TYPE=\"$(TW_CRYPTO_SD_FS_TYPE)\" |
| 217 | endif |
| 218 | #LOCAL_LDFLAGS += -L$(TARGET_OUT_SHARED_LIBRARIES) -lsec_km |
| 219 | LOCAL_LDFLAGS += -ldl |
| 220 | LOCAL_STATIC_LIBRARIES += libcrypt_samsung |
| 221 | endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 222 | LOCAL_SHARED_LIBRARIES += libcryptfsics |
| 223 | #LOCAL_SRC_FILES += crypto/ics/cryptfs.c |
| 224 | #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 225 | endif |
| 226 | ifeq ($(TW_INCLUDE_JB_CRYPTO), true) |
| 227 | LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO |
| 228 | LOCAL_CFLAGS += -DTW_INCLUDE_JB_CRYPTO |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 229 | LOCAL_SHARED_LIBRARIES += libcryptfsjb |
| 230 | #LOCAL_SRC_FILES += crypto/jb/cryptfs.c |
| 231 | #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 232 | endif |
Anatoly Smaznov | 10c11f6 | 2013-02-12 13:33:40 +0700 | [diff] [blame] | 233 | ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true) |
| 234 | LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID |
| 235 | endif |
Dees_Troy | 2f9117a | 2013-02-17 19:52:09 -0600 | [diff] [blame] | 236 | ifneq ($(TW_BRIGHTNESS_PATH),) |
| 237 | LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH) |
| 238 | endif |
| 239 | ifneq ($(TW_MAX_BRIGHTNESS),) |
| 240 | LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS) |
| 241 | endif |
Dees_Troy | f33b490 | 2013-03-01 00:51:39 +0000 | [diff] [blame] | 242 | ifneq ($(TW_CUSTOM_BATTERY_PATH),) |
| 243 | LOCAL_CFLAGS += -DTW_CUSTOM_BATTERY_PATH=$(TW_CUSTOM_BATTERY_PATH) |
| 244 | endif |
Sergey 'Jin' Bostandzhyan | 80a90ed | 2013-01-04 02:29:03 +0100 | [diff] [blame] | 245 | ifeq ($(TARGET_BOARD_PLATFORM),rk30xx) |
Anatoly Smaznov | 10c11f6 | 2013-02-12 13:33:40 +0700 | [diff] [blame] | 246 | LOCAL_CFLAGS += -DRK3066 |
Sergey 'Jin' Bostandzhyan | 80a90ed | 2013-01-04 02:29:03 +0100 | [diff] [blame] | 247 | endif |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 248 | ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) |
| 249 | LOCAL_SHARED_LIBRARIES += libopenaes |
| 250 | else |
| 251 | LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS |
| 252 | endif |
Sergey 'Jin' Bostandzhyan | 80a90ed | 2013-01-04 02:29:03 +0100 | [diff] [blame] | 253 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 254 | include $(BUILD_EXECUTABLE) |
| 255 | |
Doug Zongker | 73ae31c | 2009-12-09 17:01:45 -0800 | [diff] [blame] | 256 | include $(CLEAR_VARS) |
Dees_Troy | c04dcf7 | 2012-10-02 10:46:37 -0400 | [diff] [blame] | 257 | # Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead |
| 258 | BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links) |
| 259 | exclude := tune2fs mke2fs mkdosfs gzip gunzip |
| 260 | RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS)))) |
| 261 | $(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox |
| 262 | $(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 263 | @echo "Symlink: $@ -> $(BUSYBOX_BINARY)" |
| 264 | @mkdir -p $(dir $@) |
| 265 | @rm -rf $@ |
| 266 | $(hide) ln -sf $(BUSYBOX_BINARY) $@ |
| 267 | |
| 268 | ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS) |
| 269 | |
| 270 | include $(CLEAR_VARS) |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 271 | LOCAL_MODULE := verifier_test |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 272 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 273 | LOCAL_MODULE_TAGS := tests |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 274 | LOCAL_SRC_FILES := \ |
| 275 | verifier_test.cpp \ |
| 276 | verifier.cpp \ |
| 277 | ui.cpp |
| 278 | LOCAL_STATIC_LIBRARIES := \ |
| 279 | libmincrypt \ |
| 280 | libminui \ |
| 281 | libcutils \ |
| 282 | libstdc++ \ |
| 283 | libc |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 284 | include $(BUILD_EXECUTABLE) |
Doug Zongker | 73ae31c | 2009-12-09 17:01:45 -0800 | [diff] [blame] | 285 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 286 | include $(CLEAR_VARS) |
| 287 | |
| 288 | LOCAL_MODULE := libaosprecovery |
| 289 | LOCAL_MODULE_TAGS := eng |
| 290 | LOCAL_MODULES_TAGS = optional |
| 291 | LOCAL_CFLAGS = |
Dees_Troy | 76543db | 2013-06-19 16:24:30 +0000 | [diff] [blame] | 292 | LOCAL_SRC_FILES = adb_install.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 293 | LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils |
| 294 | LOCAL_STATIC_LIBRARIES += libmincrypt |
| 295 | |
| 296 | include $(BUILD_SHARED_LIBRARY) |
| 297 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 298 | commands_recovery_local_path := $(LOCAL_PATH) |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 299 | include $(LOCAL_PATH)/minui/Android.mk \ |
| 300 | $(LOCAL_PATH)/minelf/Android.mk \ |
| 301 | $(LOCAL_PATH)/minzip/Android.mk \ |
| 302 | $(LOCAL_PATH)/minadbd/Android.mk \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 303 | $(LOCAL_PATH)/tools/Android.mk \ |
| 304 | $(LOCAL_PATH)/edify/Android.mk \ |
| 305 | $(LOCAL_PATH)/updater/Android.mk \ |
| 306 | $(LOCAL_PATH)/applypatch/Android.mk |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 307 | |
| 308 | #includes for TWRP |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 309 | include $(commands_recovery_local_path)/injecttwrp/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 310 | $(commands_recovery_local_path)/htcdumlock/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 311 | $(commands_recovery_local_path)/gui/Android.mk \ |
| 312 | $(commands_recovery_local_path)/mmcutils/Android.mk \ |
| 313 | $(commands_recovery_local_path)/bmlutils/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 314 | $(commands_recovery_local_path)/prebuilt/Android.mk \ |
| 315 | $(commands_recovery_local_path)/mtdutils/Android.mk \ |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 316 | $(commands_recovery_local_path)/flashutils/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 317 | $(commands_recovery_local_path)/pigz/Android.mk \ |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 318 | $(commands_recovery_local_path)/dosfstools/Android.mk \ |
| 319 | $(commands_recovery_local_path)/libtar/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 320 | $(commands_recovery_local_path)/crypto/cryptsettings/Android.mk \ |
a3955269 | 6ff55ce | 2013-01-08 16:14:56 +0000 | [diff] [blame] | 321 | $(commands_recovery_local_path)/crypto/cryptfs/Android.mk \ |
Dees_Troy | b9d88ac | 2012-09-14 14:34:19 -0400 | [diff] [blame] | 322 | $(commands_recovery_local_path)/libcrecovery/Android.mk \ |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 323 | $(commands_recovery_local_path)/libblkid/Android.mk \ |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 324 | $(commands_recovery_local_path)/minuitwrp/Android.mk \ |
| 325 | $(commands_recovery_local_path)/openaes/Android.mk |
Dees_Troy | b9d88ac | 2012-09-14 14:34:19 -0400 | [diff] [blame] | 326 | |
a3955269 | 6ff55ce | 2013-01-08 16:14:56 +0000 | [diff] [blame] | 327 | ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true) |
| 328 | include $(commands_recovery_local_path)/crypto/libcrypt_samsung/Android.mk |
| 329 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 330 | |
| 331 | ifeq ($(TW_INCLUDE_JB_CRYPTO), true) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 332 | include $(commands_recovery_local_path)/crypto/jb/Android.mk |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 333 | include $(commands_recovery_local_path)/crypto/fs_mgr/Android.mk |
| 334 | endif |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 335 | ifeq ($(BUILD_ID), GINGERBREAD) |
| 336 | TW_NO_EXFAT := true |
| 337 | endif |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 338 | ifneq ($(TW_NO_EXFAT), true) |
| 339 | include $(commands_recovery_local_path)/exfat/exfat-fuse/Android.mk \ |
| 340 | $(commands_recovery_local_path)/exfat/mkfs/Android.mk \ |
| 341 | $(commands_recovery_local_path)/fuse/Android.mk \ |
| 342 | $(commands_recovery_local_path)/exfat/libexfat/Android.mk |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 343 | endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 344 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
| 345 | include $(commands_recovery_local_path)/crypto/ics/Android.mk |
| 346 | endif |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 347 | |
Talustus | 3019a91 | 2013-04-06 11:50:07 +0200 | [diff] [blame] | 348 | # FB2PNG |
| 349 | ifeq ($(TW_INCLUDE_FB2PNG), true) |
| 350 | include $(commands_recovery_local_path)/fb2png/Android.mk |
| 351 | endif |
| 352 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 353 | commands_recovery_local_path := |