blob: 8388bfad7d721120370c8e930006685b589cde6c [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
2
3RELINK := $(LOCAL_PATH)/relink.sh
4
5#dummy file to trigger required modules
6include $(CLEAR_VARS)
7LOCAL_MODULE := teamwin
8LOCAL_MODULE_TAGS := eng
9LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
10LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
11
Matt Mowerfb1c4ff2014-04-16 13:43:36 -050012# Manage list
Dees_Troy51a0e822012-09-05 15:24:24 -040013RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dump_image
14RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/flash_image
15RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image
Ethan Yonker5c933692014-04-04 11:26:32 -050016ifneq ($(TW_USE_TOOLBOX), true)
17 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox
18else
19 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mksh
20endif
Dees_Troy51a0e822012-09-05 15:24:24 -040021RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
bigbiff bigbiff9c754052013-01-09 09:09:08 -050022RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck
23RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel
24RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkdosfs
Dees_Troy51a0e822012-09-05 15:24:24 -040025RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
26RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
27RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs
28RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040029#RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/twrpmtp
Dees_Troy51a0e822012-09-05 15:24:24 -040030RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
31RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
Ethan Yonkerc5717472014-11-06 09:07:40 -060032# Not available in 5.0
33#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040034RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
35RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
36RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
Dees_Troy51a0e822012-09-05 15:24:24 -040037RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
38RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
39RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
40RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
41RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
42RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
43RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
Vojtech Bocek76ee9032014-09-07 15:01:56 +020044RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so
Dees_Troy51a0e822012-09-05 15:24:24 -040045RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
46RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
47RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
48RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000049RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
50RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
51RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
52RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050053RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010054RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040055RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
56RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
57RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
58RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Vojtech Bocek85932342013-04-01 22:11:33 +020059#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so
Dees Troy8d66f8b2013-10-08 14:04:55 +000060RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
Ethan Yonker03a42f62014-08-08 11:03:51 -050061ifneq ($(TW_OEM_BUILD),true)
62 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040063else
64 TW_EXCLUDE_MTP := true
65endif
66ifneq ($(TW_EXCLUDE_MTP), true)
67 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp.so
Ethan Yonker03a42f62014-08-08 11:03:51 -050068endif
Dees_Troya95f55c2013-08-17 13:14:43 +000069ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
70 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
71endif
Dees_Troy2673cec2013-04-02 20:22:16 +000072RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000073RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +000074ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +000075 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +000076 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
77 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
78 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +000079endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010080ifeq ($(BUILD_ID), GINGERBREAD)
81 TW_NO_EXFAT := true
82endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000083ifneq ($(TW_NO_EXFAT), true)
Dees_Troyb05ddee2013-01-28 20:24:50 +000084 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010085 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
Dees Troyb4bd6972014-10-09 18:47:00 +000086else
Captain Throwback6a1acf22014-09-18 12:46:35 -040087 TW_NO_EXFAT_FUSE := true
88endif
89ifneq ($(TW_NO_EXFAT_FUSE), true)
90 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
bigbiff bigbiff9c754052013-01-09 09:09:08 -050091endif
Dees_Troy51a0e822012-09-05 15:24:24 -040092ifeq ($(TW_INCLUDE_BLOBPACK), true)
93 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
94endif
95ifeq ($(TW_INCLUDE_INJECTTWRP), true)
96 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
97endif
98ifeq ($(TW_INCLUDE_DUMLOCK), true)
99 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
100endif
101ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +0000102 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -0400103 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
104endif
105ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +0000106 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -0400107 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
108endif
Dees_Troy38bd7602012-09-14 13:33:53 -0400109ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
110 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
111endif
Dees_Troy4546fe72013-01-10 14:33:27 +0000112ifneq ($(wildcard system/core/libsparse/Android.mk),)
113 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
114endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000115ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
116 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
117 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
118endif
Dees_Troye5017042013-08-29 16:38:55 +0000119ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
120 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
121 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
122 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fibmap.f2fs
123endif
Dees Troy0226cd52013-11-04 14:12:35 +0000124ifneq ($(wildcard system/core/reboot/Android.mk),)
125 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
126endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200127ifneq ($(TW_DISABLE_TTF), true)
128 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so
129endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400130
131TWRP_AUTOGEN := $(intermediates)/teamwin
132
133GEN := $(intermediates)/teamwin
134$(GEN): $(RELINK)
135$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
136 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
Dees_Troy51a0e822012-09-05 15:24:24 -0400137
138LOCAL_GENERATED_SOURCES := $(GEN)
139LOCAL_SRC_FILES := teamwin $(GEN)
140include $(BUILD_PREBUILT)
141
Dees_Troy51a0e822012-09-05 15:24:24 -0400142#fix_permissions
143include $(CLEAR_VARS)
144LOCAL_MODULE := fix_permissions.sh
145LOCAL_MODULE_TAGS := eng
146LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
147LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
148LOCAL_SRC_FILES := $(LOCAL_MODULE)
149include $(BUILD_PREBUILT)
150
Dees_Troy51a0e822012-09-05 15:24:24 -0400151#mke2fs.conf
152include $(CLEAR_VARS)
153LOCAL_MODULE := mke2fs.conf
154LOCAL_MODULE_TAGS := eng
155LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
156LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
157LOCAL_SRC_FILES := $(LOCAL_MODULE)
158include $(BUILD_PREBUILT)
159
160ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
161 #parted
162 include $(CLEAR_VARS)
163 LOCAL_MODULE := parted
164 LOCAL_MODULE_TAGS := eng
165 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
166 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
167 LOCAL_SRC_FILES := $(LOCAL_MODULE)
168 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400169endif
170
Dees_Troy83bd4832013-05-04 12:39:56 +0000171# copy license file for OpenAES
172ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
173 include $(CLEAR_VARS)
174 LOCAL_MODULE := ../openaes/LICENSE
175 LOCAL_MODULE_TAGS := eng
176 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
177 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
178 LOCAL_SRC_FILES := $(LOCAL_MODULE)
179 include $(BUILD_PREBUILT)
180endif
181
Dees_Troy51a0e822012-09-05 15:24:24 -0400182ifeq ($(TW_INCLUDE_DUMLOCK), true)
183 #htcdumlock for /system for dumlock
184 include $(CLEAR_VARS)
185 LOCAL_MODULE := htcdumlocksys
186 LOCAL_MODULE_TAGS := eng
187 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
188 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
189 LOCAL_SRC_FILES := $(LOCAL_MODULE)
190 include $(BUILD_PREBUILT)
191
192 #flash_image for /system for dumlock
193 include $(CLEAR_VARS)
194 LOCAL_MODULE := flash_imagesys
195 LOCAL_MODULE_TAGS := eng
196 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
197 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
198 LOCAL_SRC_FILES := $(LOCAL_MODULE)
199 include $(BUILD_PREBUILT)
200
201 #dump_image for /system for dumlock
202 include $(CLEAR_VARS)
203 LOCAL_MODULE := dump_imagesys
204 LOCAL_MODULE_TAGS := eng
205 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
206 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
207 LOCAL_SRC_FILES := $(LOCAL_MODULE)
208 include $(BUILD_PREBUILT)
209
210 #libbmlutils for /system for dumlock
211 include $(CLEAR_VARS)
212 LOCAL_MODULE := libbmlutils.so
213 LOCAL_MODULE_TAGS := eng
214 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
215 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
216 LOCAL_SRC_FILES := $(LOCAL_MODULE)
217 include $(BUILD_PREBUILT)
218
219 #libflashutils for /system for dumlock
220 include $(CLEAR_VARS)
221 LOCAL_MODULE := libflashutils.so
222 LOCAL_MODULE_TAGS := eng
223 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
224 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
225 LOCAL_SRC_FILES := $(LOCAL_MODULE)
226 include $(BUILD_PREBUILT)
227
228 #libmmcutils for /system for dumlock
229 include $(CLEAR_VARS)
230 LOCAL_MODULE := libmmcutils.so
231 LOCAL_MODULE_TAGS := eng
232 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
233 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
234 LOCAL_SRC_FILES := $(LOCAL_MODULE)
235 include $(BUILD_PREBUILT)
236
237 #libmtdutils for /system for dumlock
238 include $(CLEAR_VARS)
239 LOCAL_MODULE := libmtdutils.so
240 LOCAL_MODULE_TAGS := eng
241 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
242 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
243 LOCAL_SRC_FILES := $(LOCAL_MODULE)
244 include $(BUILD_PREBUILT)
245
246 #HTCDumlock.apk
247 include $(CLEAR_VARS)
248 LOCAL_MODULE := HTCDumlock.apk
249 LOCAL_MODULE_TAGS := eng
250 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
251 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
252 LOCAL_SRC_FILES := $(LOCAL_MODULE)
253 include $(BUILD_PREBUILT)
254endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600255
256ifneq ($(TW_EXCLUDE_SUPERSU), true)
257 #su binary
258 include $(CLEAR_VARS)
259 LOCAL_MODULE := su
260 LOCAL_MODULE_TAGS := eng
261 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600262 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600263 LOCAL_SRC_FILES := $(LOCAL_MODULE)
264 include $(BUILD_PREBUILT)
265
Dees_Troya7939bb2013-08-29 20:21:12 +0000266 #install-recovery.sh
267 include $(CLEAR_VARS)
268 LOCAL_MODULE := install-recovery.sh
269 LOCAL_MODULE_TAGS := eng
270 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
271 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
272 LOCAL_SRC_FILES := $(LOCAL_MODULE)
273 include $(BUILD_PREBUILT)
274
275 #99SuperSUDaemon
276 include $(CLEAR_VARS)
277 LOCAL_MODULE := 99SuperSUDaemon
278 LOCAL_MODULE_TAGS := eng
279 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
280 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
281 LOCAL_SRC_FILES := $(LOCAL_MODULE)
282 include $(BUILD_PREBUILT)
283
Dees_Troy6ef66352013-02-21 08:26:57 -0600284 #SuperSU special installer APK
285 include $(CLEAR_VARS)
286 LOCAL_MODULE := Superuser.apk
287 LOCAL_MODULE_TAGS := eng
288 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600289 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600290 LOCAL_SRC_FILES := $(LOCAL_MODULE)
291 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600292endif