Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | RELINK := $(LOCAL_PATH)/relink.sh |
| 4 | |
| 5 | #dummy file to trigger required modules |
| 6 | include $(CLEAR_VARS) |
| 7 | LOCAL_MODULE := teamwin |
| 8 | LOCAL_MODULE_TAGS := eng |
| 9 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 10 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 11 | |
| 12 | # Manage list |
| 13 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dump_image |
| 14 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/flash_image |
| 15 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image |
| 16 | RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox |
| 17 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 18 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck |
| 19 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel |
| 20 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkdosfs |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 21 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck |
| 22 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs |
| 23 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs |
| 24 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker |
| 25 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so |
| 26 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so |
| 27 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so |
| 28 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so |
| 29 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so |
| 30 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so |
| 31 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so |
| 32 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so |
| 33 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so |
| 34 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so |
| 35 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so |
| 36 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so |
| 37 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 38 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so |
| 39 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so |
| 40 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so |
| 41 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 42 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 43 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 44 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so |
| 45 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so |
| 46 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so |
| 47 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so |
Vojtech Bocek | 8593234 | 2013-04-01 22:11:33 +0200 | [diff] [blame] | 48 | #RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 49 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 50 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so |
| 51 | endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 52 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 53 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 54 | ifneq ($(wildcard external/libselinux/Android.mk),) |
| 55 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so |
| 56 | endif |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 57 | ifeq ($(BUILD_ID), GINGERBREAD) |
| 58 | TW_NO_EXFAT := true |
| 59 | endif |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 60 | ifneq ($(TW_NO_EXFAT), true) |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 61 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 62 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 63 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 64 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 65 | ifeq ($(TW_INCLUDE_BLOBPACK), true) |
| 66 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack |
| 67 | endif |
| 68 | ifeq ($(TW_INCLUDE_INJECTTWRP), true) |
| 69 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp |
| 70 | endif |
| 71 | ifeq ($(TW_INCLUDE_DUMLOCK), true) |
| 72 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock |
| 73 | endif |
| 74 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 75 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 76 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so |
| 77 | endif |
| 78 | ifeq ($(TW_INCLUDE_JB_CRYPTO), true) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 79 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 80 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so |
| 81 | endif |
Dees_Troy | 38bd760 | 2012-09-14 13:33:53 -0400 | [diff] [blame] | 82 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 83 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs |
| 84 | endif |
Dees_Troy | 4546fe7 | 2013-01-10 14:33:27 +0000 | [diff] [blame] | 85 | ifneq ($(wildcard system/core/libsparse/Android.mk),) |
| 86 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so |
| 87 | endif |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 88 | ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) |
| 89 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes |
| 90 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so |
| 91 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 92 | |
| 93 | TWRP_AUTOGEN := $(intermediates)/teamwin |
| 94 | |
| 95 | GEN := $(intermediates)/teamwin |
| 96 | $(GEN): $(RELINK) |
| 97 | $(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery |
| 98 | $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES) |
| 99 | $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery |
| 100 | |
| 101 | LOCAL_GENERATED_SOURCES := $(GEN) |
| 102 | LOCAL_SRC_FILES := teamwin $(GEN) |
| 103 | include $(BUILD_PREBUILT) |
| 104 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 105 | #fix_permissions |
| 106 | include $(CLEAR_VARS) |
| 107 | LOCAL_MODULE := fix_permissions.sh |
| 108 | LOCAL_MODULE_TAGS := eng |
| 109 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 110 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 111 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 112 | include $(BUILD_PREBUILT) |
| 113 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 114 | #mke2fs.conf |
| 115 | include $(CLEAR_VARS) |
| 116 | LOCAL_MODULE := mke2fs.conf |
| 117 | LOCAL_MODULE_TAGS := eng |
| 118 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 119 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc |
| 120 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 121 | include $(BUILD_PREBUILT) |
| 122 | |
| 123 | ifeq ($(BOARD_HAS_NO_REAL_SDCARD),) |
| 124 | #parted |
| 125 | include $(CLEAR_VARS) |
| 126 | LOCAL_MODULE := parted |
| 127 | LOCAL_MODULE_TAGS := eng |
| 128 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 129 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 130 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 131 | include $(BUILD_PREBUILT) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 132 | endif |
| 133 | |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 134 | # copy license file for OpenAES |
| 135 | ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) |
| 136 | include $(CLEAR_VARS) |
| 137 | LOCAL_MODULE := ../openaes/LICENSE |
| 138 | LOCAL_MODULE_TAGS := eng |
| 139 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 140 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes |
| 141 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 142 | include $(BUILD_PREBUILT) |
| 143 | endif |
| 144 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 145 | ifeq ($(TW_INCLUDE_DUMLOCK), true) |
| 146 | #htcdumlock for /system for dumlock |
| 147 | include $(CLEAR_VARS) |
| 148 | LOCAL_MODULE := htcdumlocksys |
| 149 | LOCAL_MODULE_TAGS := eng |
| 150 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 151 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 152 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 153 | include $(BUILD_PREBUILT) |
| 154 | |
| 155 | #flash_image for /system for dumlock |
| 156 | include $(CLEAR_VARS) |
| 157 | LOCAL_MODULE := flash_imagesys |
| 158 | LOCAL_MODULE_TAGS := eng |
| 159 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 160 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 161 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 162 | include $(BUILD_PREBUILT) |
| 163 | |
| 164 | #dump_image for /system for dumlock |
| 165 | include $(CLEAR_VARS) |
| 166 | LOCAL_MODULE := dump_imagesys |
| 167 | LOCAL_MODULE_TAGS := eng |
| 168 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 169 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 170 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 171 | include $(BUILD_PREBUILT) |
| 172 | |
| 173 | #libbmlutils for /system for dumlock |
| 174 | include $(CLEAR_VARS) |
| 175 | LOCAL_MODULE := libbmlutils.so |
| 176 | LOCAL_MODULE_TAGS := eng |
| 177 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 178 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 179 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 180 | include $(BUILD_PREBUILT) |
| 181 | |
| 182 | #libflashutils for /system for dumlock |
| 183 | include $(CLEAR_VARS) |
| 184 | LOCAL_MODULE := libflashutils.so |
| 185 | LOCAL_MODULE_TAGS := eng |
| 186 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 187 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 188 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 189 | include $(BUILD_PREBUILT) |
| 190 | |
| 191 | #libmmcutils for /system for dumlock |
| 192 | include $(CLEAR_VARS) |
| 193 | LOCAL_MODULE := libmmcutils.so |
| 194 | LOCAL_MODULE_TAGS := eng |
| 195 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 196 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 197 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 198 | include $(BUILD_PREBUILT) |
| 199 | |
| 200 | #libmtdutils for /system for dumlock |
| 201 | include $(CLEAR_VARS) |
| 202 | LOCAL_MODULE := libmtdutils.so |
| 203 | LOCAL_MODULE_TAGS := eng |
| 204 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 205 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 206 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 207 | include $(BUILD_PREBUILT) |
| 208 | |
| 209 | #HTCDumlock.apk |
| 210 | include $(CLEAR_VARS) |
| 211 | LOCAL_MODULE := HTCDumlock.apk |
| 212 | LOCAL_MODULE_TAGS := eng |
| 213 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 214 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd |
| 215 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 216 | include $(BUILD_PREBUILT) |
| 217 | endif |
Dees_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 218 | |
| 219 | ifneq ($(TW_EXCLUDE_SUPERSU), true) |
| 220 | #su binary |
| 221 | include $(CLEAR_VARS) |
| 222 | LOCAL_MODULE := su |
| 223 | LOCAL_MODULE_TAGS := eng |
| 224 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
jt1134 | 113ee73 | 2013-02-22 23:26:10 -0600 | [diff] [blame] | 225 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu |
Dees_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 226 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 227 | include $(BUILD_PREBUILT) |
| 228 | |
| 229 | #SuperSU special installer APK |
| 230 | include $(CLEAR_VARS) |
| 231 | LOCAL_MODULE := Superuser.apk |
| 232 | LOCAL_MODULE_TAGS := eng |
| 233 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
jt1134 | 113ee73 | 2013-02-22 23:26:10 -0600 | [diff] [blame] | 234 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu |
Dees_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 235 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 236 | include $(BUILD_PREBUILT) |
jt1134 | 113ee73 | 2013-02-22 23:26:10 -0600 | [diff] [blame] | 237 | endif |