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 | |
Matt Mower | 55c75ca | 2014-08-31 11:30:15 -0500 | [diff] [blame] | 17 | ifeq ($(RECOVERY_VARIANT),) |
| 18 | ifeq ($(LOCAL_PATH),bootable/recovery) |
| 19 | RECOVERY_VARIANT := twrp |
| 20 | endif |
| 21 | endif |
| 22 | |
| 23 | ifeq ($(RECOVERY_VARIANT),twrp) |
| 24 | |
Motorhead1991 | 75b6f66 | 2014-06-12 15:58:33 -0700 | [diff] [blame] | 25 | include $(CLEAR_VARS) |
| 26 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 27 | TARGET_RECOVERY_GUI := true |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 28 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 29 | LOCAL_SRC_FILES := \ |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 30 | twrp.cpp \ |
bigbiff bigbiff | a0f8a59 | 2012-10-09 21:01:03 -0400 | [diff] [blame] | 31 | fixPermissions.cpp \ |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 32 | twrpTar.cpp \ |
bigbiff bigbiff | 34684ff | 2013-12-01 21:03:45 -0500 | [diff] [blame] | 33 | twrpDU.cpp \ |
bigbiff bigbiff | cdcfee4 | 2013-02-27 21:11:26 -0500 | [diff] [blame] | 34 | twrpDigest.cpp \ |
Ethan Yonker | 1b7a31b | 2014-07-03 15:09:22 -0500 | [diff] [blame] | 35 | find_file.cpp \ |
| 36 | infomanager.cpp |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 37 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 38 | LOCAL_SRC_FILES += \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 39 | data.cpp \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 40 | partition.cpp \ |
| 41 | partitionmanager.cpp \ |
Dees_Troy | 32c8eb8 | 2012-09-11 15:28:06 -0400 | [diff] [blame] | 42 | twinstall.cpp \ |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 43 | twrp-functions.cpp \ |
Dees_Troy | e34c133 | 2013-02-06 19:13:00 +0000 | [diff] [blame] | 44 | openrecoveryscript.cpp \ |
| 45 | tarWrite.c |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 46 | |
Dees_Troy | a58bead | 2012-09-27 09:49:29 -0400 | [diff] [blame] | 47 | ifneq ($(TARGET_RECOVERY_REBOOT_SRC),) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 48 | LOCAL_SRC_FILES += $(TARGET_RECOVERY_REBOOT_SRC) |
| 49 | endif |
| 50 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 51 | LOCAL_MODULE := recovery |
| 52 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 53 | #LOCAL_FORCE_STATIC_EXECUTABLE := true |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 54 | |
Doug Zongker | e08991e | 2010-02-02 13:09:52 -0800 | [diff] [blame] | 55 | RECOVERY_API_VERSION := 3 |
Ken Sumrall | f35d1ce | 2013-02-13 12:59:35 -0800 | [diff] [blame] | 56 | RECOVERY_FSTAB_VERSION := 2 |
Doug Zongker | fb2e3af | 2009-06-17 17:29:40 -0700 | [diff] [blame] | 57 | LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) |
| 58 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 59 | #LOCAL_STATIC_LIBRARIES := \ |
Dees_Troy | 1669f89 | 2013-09-04 18:35:08 +0000 | [diff] [blame] | 60 | # libext4_utils_static \ |
| 61 | # libsparse_static \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 62 | # libminzip \ |
Dees_Troy | 1669f89 | 2013-09-04 18:35:08 +0000 | [diff] [blame] | 63 | # libz \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 64 | # libmtdutils \ |
| 65 | # libmincrypt \ |
| 66 | # libminadbd \ |
Dees_Troy | 1669f89 | 2013-09-04 18:35:08 +0000 | [diff] [blame] | 67 | # libminui \ |
| 68 | # libpixelflinger_static \ |
| 69 | # libpng \ |
| 70 | # libfs_mgr \ |
| 71 | # libcutils \ |
| 72 | # liblog \ |
| 73 | # libselinux \ |
| 74 | # libstdc++ \ |
| 75 | # libm \ |
| 76 | # libc |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 77 | |
| 78 | LOCAL_C_INCLUDES += bionic external/stlport/stlport |
| 79 | |
| 80 | LOCAL_STATIC_LIBRARIES := |
| 81 | LOCAL_SHARED_LIBRARIES := |
| 82 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 83 | LOCAL_STATIC_LIBRARIES += libcrecovery libguitwrp |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 84 | LOCAL_SHARED_LIBRARIES += libz libc libstlport libcutils libstdc++ libtar libblkid libminuitwrp libminadbd libmtdutils libminzip libaosprecovery libcorkscrew |
| 85 | LOCAL_SHARED_LIBRARIES += libgccdemangle |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 86 | |
Dees_Troy | 4546fe7 | 2013-01-10 14:33:27 +0000 | [diff] [blame] | 87 | ifneq ($(wildcard system/core/libsparse/Android.mk),) |
| 88 | LOCAL_SHARED_LIBRARIES += libsparse |
| 89 | endif |
| 90 | |
Ethan Yonker | 7af51ce | 2014-04-04 13:33:30 -0500 | [diff] [blame] | 91 | ifeq ($(TW_OEM_BUILD),true) |
| 92 | LOCAL_CFLAGS += -DTW_OEM_BUILD |
| 93 | BOARD_HAS_NO_REAL_SDCARD := true |
| 94 | TW_USE_TOOLBOX := true |
| 95 | TW_EXCLUDE_SUPERSU := true |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 96 | TW_EXCLUDE_MTP := true |
Ethan Yonker | 7af51ce | 2014-04-04 13:33:30 -0500 | [diff] [blame] | 97 | endif |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 98 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 99 | LOCAL_CFLAGS += -DUSE_EXT4 |
| 100 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 101 | LOCAL_SHARED_LIBRARIES += libext4_utils |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 102 | endif |
Dees Troy | 4bf3b0d | 2013-09-11 19:12:49 +0000 | [diff] [blame] | 103 | ifneq ($(wildcard external/libselinux/Android.mk),) |
| 104 | TWHAVE_SELINUX := true |
| 105 | endif |
| 106 | ifeq ($(TWHAVE_SELINUX), true) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 107 | #LOCAL_C_INCLUDES += external/libselinux/include |
| 108 | #LOCAL_STATIC_LIBRARIES += libselinux |
| 109 | #LOCAL_CFLAGS += -DHAVE_SELINUX -g |
Stephen Smalley | 1a11449 | 2012-01-13 07:59:51 -0500 | [diff] [blame] | 110 | endif # HAVE_SELINUX |
Dees Troy | 4bf3b0d | 2013-09-11 19:12:49 +0000 | [diff] [blame] | 111 | ifeq ($(TWHAVE_SELINUX), true) |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 112 | LOCAL_C_INCLUDES += external/libselinux/include |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 113 | LOCAL_SHARED_LIBRARIES += libselinux |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 114 | LOCAL_CFLAGS += -DHAVE_SELINUX -g |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 115 | ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 116 | LOCAL_CFLAGS += -DUSE_EXT4 |
| 117 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
| 118 | LOCAL_SHARED_LIBRARIES += libext4_utils |
| 119 | endif |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 120 | endif |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 121 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 122 | # This binary is in the recovery ramdisk, which is otherwise a copy of root. |
| 123 | # It gets copied there in config/Makefile. LOCAL_MODULE_TAGS suppresses |
| 124 | # a (redundant) copy of the binary in /system/bin for user builds. |
| 125 | # 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] | 126 | LOCAL_MODULE_TAGS := eng |
| 127 | |
Dees_Troy | 1669f89 | 2013-09-04 18:35:08 +0000 | [diff] [blame] | 128 | #ifeq ($(TARGET_RECOVERY_UI_LIB),) |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 129 | LOCAL_SRC_FILES += default_device.cpp |
Dees_Troy | 1669f89 | 2013-09-04 18:35:08 +0000 | [diff] [blame] | 130 | #else |
| 131 | # LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB) |
| 132 | #endif |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 133 | |
Doug Zongker | cc8cd3f | 2010-09-20 12:16:13 -0700 | [diff] [blame] | 134 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
| 135 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 136 | #TWRP Build Flags |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 137 | ifeq ($(TW_EXCLUDE_MTP),) |
| 138 | LOCAL_SHARED_LIBRARIES += libtwrpmtp |
| 139 | LOCAL_CFLAGS += -DTW_HAS_MTP |
| 140 | endif |
Ricardo Gomez | c9ecd44 | 2013-07-05 16:13:52 -0700 | [diff] [blame] | 141 | ifneq ($(TW_NO_SCREEN_TIMEOUT),) |
| 142 | LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT |
| 143 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 144 | ifeq ($(BOARD_HAS_NO_REAL_SDCARD), true) |
| 145 | LOCAL_CFLAGS += -DBOARD_HAS_NO_REAL_SDCARD |
| 146 | endif |
| 147 | ifneq ($(SP1_NAME),) |
| 148 | LOCAL_CFLAGS += -DSP1_NAME=$(SP1_NAME) -DSP1_BACKUP_METHOD=$(SP1_BACKUP_METHOD) -DSP1_MOUNTABLE=$(SP1_MOUNTABLE) |
| 149 | endif |
| 150 | ifneq ($(SP1_DISPLAY_NAME),) |
| 151 | LOCAL_CFLAGS += -DSP1_DISPLAY_NAME=$(SP1_DISPLAY_NAME) |
| 152 | endif |
| 153 | ifneq ($(SP2_NAME),) |
| 154 | LOCAL_CFLAGS += -DSP2_NAME=$(SP2_NAME) -DSP2_BACKUP_METHOD=$(SP2_BACKUP_METHOD) -DSP2_MOUNTABLE=$(SP2_MOUNTABLE) |
| 155 | endif |
| 156 | ifneq ($(SP2_DISPLAY_NAME),) |
| 157 | LOCAL_CFLAGS += -DSP2_DISPLAY_NAME=$(SP2_DISPLAY_NAME) |
| 158 | endif |
| 159 | ifneq ($(SP3_NAME),) |
| 160 | LOCAL_CFLAGS += -DSP3_NAME=$(SP3_NAME) -DSP3_BACKUP_METHOD=$(SP3_BACKUP_METHOD) -DSP3_MOUNTABLE=$(SP3_MOUNTABLE) |
| 161 | endif |
| 162 | ifneq ($(SP3_DISPLAY_NAME),) |
| 163 | LOCAL_CFLAGS += -DSP3_DISPLAY_NAME=$(SP3_DISPLAY_NAME) |
| 164 | endif |
| 165 | ifneq ($(RECOVERY_SDCARD_ON_DATA),) |
| 166 | LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA |
| 167 | endif |
| 168 | ifneq ($(TW_INCLUDE_DUMLOCK),) |
| 169 | LOCAL_CFLAGS += -DTW_INCLUDE_DUMLOCK |
| 170 | endif |
| 171 | ifneq ($(TW_INTERNAL_STORAGE_PATH),) |
| 172 | LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_PATH=$(TW_INTERNAL_STORAGE_PATH) |
| 173 | endif |
| 174 | ifneq ($(TW_INTERNAL_STORAGE_MOUNT_POINT),) |
| 175 | LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_MOUNT_POINT=$(TW_INTERNAL_STORAGE_MOUNT_POINT) |
| 176 | endif |
| 177 | ifneq ($(TW_EXTERNAL_STORAGE_PATH),) |
| 178 | LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH) |
| 179 | endif |
| 180 | ifneq ($(TW_EXTERNAL_STORAGE_MOUNT_POINT),) |
| 181 | LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_MOUNT_POINT=$(TW_EXTERNAL_STORAGE_MOUNT_POINT) |
| 182 | endif |
| 183 | ifeq ($(TW_HAS_NO_RECOVERY_PARTITION), true) |
| 184 | LOCAL_CFLAGS += -DTW_HAS_NO_RECOVERY_PARTITION |
| 185 | endif |
ChampionSwimmer | cf33e4d | 2013-02-03 13:59:22 +0530 | [diff] [blame] | 186 | ifeq ($(TW_HAS_NO_BOOT_PARTITION), true) |
| 187 | LOCAL_CFLAGS += -DTW_HAS_NO_BOOT_PARTITION |
| 188 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 189 | ifeq ($(TW_NO_REBOOT_BOOTLOADER), true) |
| 190 | LOCAL_CFLAGS += -DTW_NO_REBOOT_BOOTLOADER |
| 191 | endif |
| 192 | ifeq ($(TW_NO_REBOOT_RECOVERY), true) |
| 193 | LOCAL_CFLAGS += -DTW_NO_REBOOT_RECOVERY |
| 194 | endif |
| 195 | ifeq ($(TW_NO_BATT_PERCENT), true) |
| 196 | LOCAL_CFLAGS += -DTW_NO_BATT_PERCENT |
| 197 | endif |
| 198 | ifneq ($(TW_CUSTOM_POWER_BUTTON),) |
| 199 | LOCAL_CFLAGS += -DTW_CUSTOM_POWER_BUTTON=$(TW_CUSTOM_POWER_BUTTON) |
| 200 | endif |
| 201 | ifeq ($(TW_ALWAYS_RMRF), true) |
| 202 | LOCAL_CFLAGS += -DTW_ALWAYS_RMRF |
| 203 | endif |
| 204 | ifeq ($(TW_NEVER_UNMOUNT_SYSTEM), true) |
| 205 | LOCAL_CFLAGS += -DTW_NEVER_UNMOUNT_SYSTEM |
| 206 | endif |
| 207 | ifeq ($(TW_NO_USB_STORAGE), true) |
| 208 | LOCAL_CFLAGS += -DTW_NO_USB_STORAGE |
| 209 | endif |
| 210 | ifeq ($(TW_INCLUDE_INJECTTWRP), true) |
| 211 | LOCAL_CFLAGS += -DTW_INCLUDE_INJECTTWRP |
| 212 | endif |
| 213 | ifeq ($(TW_INCLUDE_BLOBPACK), true) |
| 214 | LOCAL_CFLAGS += -DTW_INCLUDE_BLOBPACK |
| 215 | endif |
| 216 | ifeq ($(TW_DEFAULT_EXTERNAL_STORAGE), true) |
| 217 | LOCAL_CFLAGS += -DTW_DEFAULT_EXTERNAL_STORAGE |
| 218 | endif |
| 219 | ifneq ($(TARGET_USE_CUSTOM_LUN_FILE_PATH),) |
| 220 | LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(TARGET_USE_CUSTOM_LUN_FILE_PATH)\" |
| 221 | endif |
| 222 | ifneq ($(BOARD_UMS_LUNFILE),) |
| 223 | LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(BOARD_UMS_LUNFILE)\" |
| 224 | endif |
| 225 | #ifeq ($(TW_FLASH_FROM_STORAGE), true) Making this the default behavior |
| 226 | LOCAL_CFLAGS += -DTW_FLASH_FROM_STORAGE |
| 227 | #endif |
| 228 | ifeq ($(TW_HAS_DOWNLOAD_MODE), true) |
| 229 | LOCAL_CFLAGS += -DTW_HAS_DOWNLOAD_MODE |
| 230 | endif |
bigbiff bigbiff | 8794036 | 2013-03-09 09:58:50 -0500 | [diff] [blame] | 231 | ifeq ($(TW_NO_SCREEN_BLANK), true) |
| 232 | LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK |
| 233 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 234 | ifeq ($(TW_SDEXT_NO_EXT4), true) |
| 235 | LOCAL_CFLAGS += -DTW_SDEXT_NO_EXT4 |
| 236 | endif |
Dees_Troy | fdf5fcc | 2012-09-11 10:27:01 -0400 | [diff] [blame] | 237 | ifeq ($(TW_FORCE_CPUINFO_FOR_DEVICE_ID), true) |
| 238 | LOCAL_CFLAGS += -DTW_FORCE_CPUINFO_FOR_DEVICE_ID |
| 239 | endif |
Dees_Troy | 3f5c4e8 | 2013-02-01 15:16:59 +0000 | [diff] [blame] | 240 | ifeq ($(TW_NO_EXFAT_FUSE), true) |
| 241 | LOCAL_CFLAGS += -DTW_NO_EXFAT_FUSE |
| 242 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 243 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
| 244 | LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO |
| 245 | LOCAL_CFLAGS += -DCRYPTO_FS_TYPE=\"$(TW_CRYPTO_FS_TYPE)\" |
| 246 | LOCAL_CFLAGS += -DCRYPTO_REAL_BLKDEV=\"$(TW_CRYPTO_REAL_BLKDEV)\" |
| 247 | LOCAL_CFLAGS += -DCRYPTO_MNT_POINT=\"$(TW_CRYPTO_MNT_POINT)\" |
| 248 | LOCAL_CFLAGS += -DCRYPTO_FS_OPTIONS=\"$(TW_CRYPTO_FS_OPTIONS)\" |
| 249 | LOCAL_CFLAGS += -DCRYPTO_FS_FLAGS=\"$(TW_CRYPTO_FS_FLAGS)\" |
| 250 | LOCAL_CFLAGS += -DCRYPTO_KEY_LOC=\"$(TW_CRYPTO_KEY_LOC)\" |
a3955269 | 6ff55ce | 2013-01-08 16:14:56 +0000 | [diff] [blame] | 251 | ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true) |
| 252 | LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO_SAMSUNG=\"$(TW_INCLUDE_CRYPTO_SAMSUNG)\" |
| 253 | ifdef TW_CRYPTO_SD_REAL_BLKDEV |
| 254 | LOCAL_CFLAGS += -DCRYPTO_SD_REAL_BLKDEV=\"$(TW_CRYPTO_SD_REAL_BLKDEV)\" |
| 255 | LOCAL_CFLAGS += -DCRYPTO_SD_FS_TYPE=\"$(TW_CRYPTO_SD_FS_TYPE)\" |
| 256 | endif |
| 257 | #LOCAL_LDFLAGS += -L$(TARGET_OUT_SHARED_LIBRARIES) -lsec_km |
| 258 | LOCAL_LDFLAGS += -ldl |
| 259 | LOCAL_STATIC_LIBRARIES += libcrypt_samsung |
| 260 | endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 261 | LOCAL_SHARED_LIBRARIES += libcryptfsics |
| 262 | #LOCAL_SRC_FILES += crypto/ics/cryptfs.c |
| 263 | #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 264 | endif |
| 265 | ifeq ($(TW_INCLUDE_JB_CRYPTO), true) |
| 266 | LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO |
| 267 | LOCAL_CFLAGS += -DTW_INCLUDE_JB_CRYPTO |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 268 | LOCAL_SHARED_LIBRARIES += libcryptfsjb |
| 269 | #LOCAL_SRC_FILES += crypto/jb/cryptfs.c |
| 270 | #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 271 | endif |
Anatoly Smaznov | 10c11f6 | 2013-02-12 13:33:40 +0700 | [diff] [blame] | 272 | ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true) |
| 273 | LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID |
| 274 | endif |
Dees_Troy | 2f9117a | 2013-02-17 19:52:09 -0600 | [diff] [blame] | 275 | ifneq ($(TW_BRIGHTNESS_PATH),) |
| 276 | LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH) |
| 277 | endif |
xNUTx | e85f02d | 2014-07-18 01:30:58 +0200 | [diff] [blame] | 278 | ifneq ($(TW_SECONDARY_BRIGHTNESS_PATH),) |
| 279 | LOCAL_CFLAGS += -DTW_SECONDARY_BRIGHTNESS_PATH=$(TW_SECONDARY_BRIGHTNESS_PATH) |
| 280 | endif |
Dees_Troy | 2f9117a | 2013-02-17 19:52:09 -0600 | [diff] [blame] | 281 | ifneq ($(TW_MAX_BRIGHTNESS),) |
| 282 | LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS) |
| 283 | endif |
Dees_Troy | f33b490 | 2013-03-01 00:51:39 +0000 | [diff] [blame] | 284 | ifneq ($(TW_CUSTOM_BATTERY_PATH),) |
| 285 | LOCAL_CFLAGS += -DTW_CUSTOM_BATTERY_PATH=$(TW_CUSTOM_BATTERY_PATH) |
| 286 | endif |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 287 | ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) |
| 288 | LOCAL_SHARED_LIBRARIES += libopenaes |
| 289 | else |
| 290 | LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS |
| 291 | endif |
Vojtech Bocek | d0e38bc | 2014-02-03 23:36:57 +0100 | [diff] [blame] | 292 | ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),) |
| 293 | ifeq ($(TARGET_CPU_VARIANT),krait) |
| 294 | LOCAL_CFLAGS += -DQCOM_RTC_FIX |
| 295 | endif |
| 296 | else ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),true) |
| 297 | LOCAL_CFLAGS += -DQCOM_RTC_FIX |
| 298 | endif |
Matt Mower | 6883d73 | 2014-03-20 17:28:13 -0500 | [diff] [blame] | 299 | ifneq ($(TW_NO_LEGACY_PROPS),) |
| 300 | LOCAL_CFLAGS += -DTW_NO_LEGACY_PROPS |
| 301 | endif |
Dees Troy | 4159aed | 2014-02-28 17:24:43 +0000 | [diff] [blame] | 302 | ifneq ($(wildcard bionic/libc/include/sys/capability.h),) |
| 303 | LOCAL_CFLAGS += -DHAVE_CAPABILITIES |
| 304 | endif |
Sergey 'Jin' Bostandzhyan | 80a90ed | 2013-01-04 02:29:03 +0100 | [diff] [blame] | 305 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 306 | include $(BUILD_EXECUTABLE) |
| 307 | |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 308 | ifneq ($(TW_USE_TOOLBOX), true) |
Doug Zongker | 73ae31c | 2009-12-09 17:01:45 -0800 | [diff] [blame] | 309 | include $(CLEAR_VARS) |
Dees_Troy | c04dcf7 | 2012-10-02 10:46:37 -0400 | [diff] [blame] | 310 | # Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead |
| 311 | BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links) |
| 312 | exclude := tune2fs mke2fs mkdosfs gzip gunzip |
Matt Mower | 81742fb | 2014-09-01 14:40:52 -0500 | [diff] [blame] | 313 | |
| 314 | # If busybox does not have restorecon, assume it does not have SELinux support. |
| 315 | # Then, let toolbox provide 'ls' so -Z is available to list SELinux contexts. |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 316 | ifeq ($(TWHAVE_SELINUX), true) |
Matt Mower | 81742fb | 2014-09-01 14:40:52 -0500 | [diff] [blame] | 317 | ifeq ($(filter restorecon, $(notdir $(BUSYBOX_LINKS))),) |
| 318 | exclude += ls |
| 319 | endif |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 320 | endif |
Matt Mower | 81742fb | 2014-09-01 14:40:52 -0500 | [diff] [blame] | 321 | |
| 322 | RECOVERY_BUSYBOX_TOOLS := $(filter-out $(exclude), $(notdir $(BUSYBOX_LINKS))) |
| 323 | RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/, $(RECOVERY_BUSYBOX_TOOLS)) |
Dees_Troy | c04dcf7 | 2012-10-02 10:46:37 -0400 | [diff] [blame] | 324 | $(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox |
| 325 | $(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 326 | @echo "Symlink: $@ -> $(BUSYBOX_BINARY)" |
| 327 | @mkdir -p $(dir $@) |
| 328 | @rm -rf $@ |
| 329 | $(hide) ln -sf $(BUSYBOX_BINARY) $@ |
| 330 | |
| 331 | ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS) |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 332 | endif |
Dees_Troy | c04dcf7 | 2012-10-02 10:46:37 -0400 | [diff] [blame] | 333 | |
| 334 | include $(CLEAR_VARS) |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 335 | LOCAL_MODULE := verifier_test |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 336 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 337 | LOCAL_MODULE_TAGS := tests |
Matt Mower | 55c75ca | 2014-08-31 11:30:15 -0500 | [diff] [blame] | 338 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 339 | LOCAL_SRC_FILES := \ |
| 340 | verifier_test.cpp \ |
| 341 | verifier.cpp \ |
| 342 | ui.cpp |
| 343 | LOCAL_STATIC_LIBRARIES := \ |
Dees Troy | d63c764 | 2013-11-03 13:03:55 +0000 | [diff] [blame] | 344 | libmincrypttwrp \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 345 | libminui \ |
| 346 | libcutils \ |
| 347 | libstdc++ \ |
| 348 | libc |
Doug Zongker | daefc1d | 2011-10-31 09:34:15 -0700 | [diff] [blame] | 349 | include $(BUILD_EXECUTABLE) |
Doug Zongker | 73ae31c | 2009-12-09 17:01:45 -0800 | [diff] [blame] | 350 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 351 | include $(CLEAR_VARS) |
| 352 | |
| 353 | LOCAL_MODULE := libaosprecovery |
| 354 | LOCAL_MODULE_TAGS := eng |
| 355 | LOCAL_MODULES_TAGS = optional |
Matt Mower | 55c75ca | 2014-08-31 11:30:15 -0500 | [diff] [blame] | 356 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes |
that | 7e303cf | 2014-03-06 07:57:43 +0100 | [diff] [blame] | 357 | LOCAL_SRC_FILES = adb_install.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c legacy_property_service.c |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 358 | LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils |
Dees Troy | bb4c0cb | 2013-11-02 20:25:14 +0000 | [diff] [blame] | 359 | LOCAL_STATIC_LIBRARIES += libmincrypttwrp |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 360 | |
Matt Mower | fb60a94 | 2014-07-08 22:25:38 -0500 | [diff] [blame] | 361 | ifneq ($(BOARD_RECOVERY_BLDRMSG_OFFSET),) |
| 362 | LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOARD_RECOVERY_BLDRMSG_OFFSET) |
| 363 | endif |
| 364 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 365 | include $(BUILD_SHARED_LIBRARY) |
| 366 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 367 | commands_recovery_local_path := $(LOCAL_PATH) |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 368 | include $(LOCAL_PATH)/minui/Android.mk \ |
| 369 | $(LOCAL_PATH)/minelf/Android.mk \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 370 | $(LOCAL_PATH)/minadbd/Android.mk \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 371 | $(LOCAL_PATH)/tools/Android.mk \ |
| 372 | $(LOCAL_PATH)/edify/Android.mk \ |
| 373 | $(LOCAL_PATH)/updater/Android.mk \ |
| 374 | $(LOCAL_PATH)/applypatch/Android.mk |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 375 | |
| 376 | #includes for TWRP |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 377 | include $(commands_recovery_local_path)/injecttwrp/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 378 | $(commands_recovery_local_path)/htcdumlock/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 379 | $(commands_recovery_local_path)/gui/Android.mk \ |
| 380 | $(commands_recovery_local_path)/mmcutils/Android.mk \ |
| 381 | $(commands_recovery_local_path)/bmlutils/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 382 | $(commands_recovery_local_path)/prebuilt/Android.mk \ |
| 383 | $(commands_recovery_local_path)/mtdutils/Android.mk \ |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 384 | $(commands_recovery_local_path)/flashutils/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 385 | $(commands_recovery_local_path)/pigz/Android.mk \ |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 386 | $(commands_recovery_local_path)/dosfstools/Android.mk \ |
| 387 | $(commands_recovery_local_path)/libtar/Android.mk \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 388 | $(commands_recovery_local_path)/crypto/cryptsettings/Android.mk \ |
a3955269 | 6ff55ce | 2013-01-08 16:14:56 +0000 | [diff] [blame] | 389 | $(commands_recovery_local_path)/crypto/cryptfs/Android.mk \ |
Dees_Troy | b9d88ac | 2012-09-14 14:34:19 -0400 | [diff] [blame] | 390 | $(commands_recovery_local_path)/libcrecovery/Android.mk \ |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 391 | $(commands_recovery_local_path)/libblkid/Android.mk \ |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 392 | $(commands_recovery_local_path)/minuitwrp/Android.mk \ |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 393 | $(commands_recovery_local_path)/openaes/Android.mk \ |
Dees Troy | bb4c0cb | 2013-11-02 20:25:14 +0000 | [diff] [blame] | 394 | $(commands_recovery_local_path)/toolbox/Android.mk \ |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 395 | $(commands_recovery_local_path)/libmincrypt/Android.mk \ |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 396 | $(commands_recovery_local_path)/twrpTarMain/Android.mk \ |
| 397 | $(commands_recovery_local_path)/mtp/Android.mk |
Dees_Troy | b9d88ac | 2012-09-14 14:34:19 -0400 | [diff] [blame] | 398 | |
a3955269 | 6ff55ce | 2013-01-08 16:14:56 +0000 | [diff] [blame] | 399 | ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true) |
| 400 | include $(commands_recovery_local_path)/crypto/libcrypt_samsung/Android.mk |
| 401 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 402 | |
| 403 | ifeq ($(TW_INCLUDE_JB_CRYPTO), true) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 404 | include $(commands_recovery_local_path)/crypto/jb/Android.mk |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 405 | include $(commands_recovery_local_path)/crypto/fs_mgr/Android.mk |
Dees Troy | 4dff2e6 | 2013-11-10 04:11:43 +0000 | [diff] [blame] | 406 | include $(commands_recovery_local_path)/crypto/logwrapper/Android.mk |
| 407 | include $(commands_recovery_local_path)/crypto/scrypt/Android.mk |
Dees Troy | 8931007 | 2013-11-11 15:14:14 +0000 | [diff] [blame] | 408 | include $(commands_recovery_local_path)/crypto/crypttools/Android.mk |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 409 | endif |
Ethan Yonker | 3d2baac | 2014-01-27 22:03:00 -0600 | [diff] [blame] | 410 | ifeq ($(TWHAVE_SELINUX), true) |
Dees Troy | b7ae098 | 2013-09-10 20:47:35 +0000 | [diff] [blame] | 411 | include $(commands_recovery_local_path)/minzip/Android.mk |
| 412 | else |
| 413 | include $(commands_recovery_local_path)/minzipold/Android.mk |
| 414 | endif |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 415 | ifeq ($(BUILD_ID), GINGERBREAD) |
| 416 | TW_NO_EXFAT := true |
| 417 | endif |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 418 | ifneq ($(TW_NO_EXFAT), true) |
Captain Throwback | 6a1acf2 | 2014-09-18 12:46:35 -0400 | [diff] [blame] | 419 | include $(commands_recovery_local_path)/exfat/mkfs/Android.mk \ |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 420 | $(commands_recovery_local_path)/fuse/Android.mk \ |
| 421 | $(commands_recovery_local_path)/exfat/libexfat/Android.mk |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 422 | endif |
Captain Throwback | 6a1acf2 | 2014-09-18 12:46:35 -0400 | [diff] [blame] | 423 | ifneq ($(TW_NO_EXFAT_FUSE), true) |
| 424 | include $(commands_recovery_local_path)/exfat/exfat-fuse/Android.mk |
| 425 | endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 426 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
| 427 | include $(commands_recovery_local_path)/crypto/ics/Android.mk |
| 428 | endif |
Ethan Yonker | 03a42f6 | 2014-08-08 11:03:51 -0500 | [diff] [blame] | 429 | ifneq ($(TW_OEM_BUILD),true) |
| 430 | include $(commands_recovery_local_path)/orscmd/Android.mk |
| 431 | endif |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 432 | |
Talustus | 3019a91 | 2013-04-06 11:50:07 +0200 | [diff] [blame] | 433 | # FB2PNG |
| 434 | ifeq ($(TW_INCLUDE_FB2PNG), true) |
| 435 | include $(commands_recovery_local_path)/fb2png/Android.mk |
| 436 | endif |
Matt Mower | 55c75ca | 2014-08-31 11:30:15 -0500 | [diff] [blame] | 437 | |
| 438 | commands_recovery_local_path := |
| 439 | |
| 440 | endif |