blob: dc97e911826606c6e75efcecdad0362993c5b2b0 [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
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040032RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
33RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
34RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
35RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
Dees_Troy51a0e822012-09-05 15:24:24 -040036RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
37RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
38RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
39RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
40RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
41RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
42RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
43RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
44RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
45RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
46RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000047RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
48RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
49RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
50RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050051RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010052RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040053RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
54RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
55RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
56RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Vojtech Bocek85932342013-04-01 22:11:33 +020057#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so
Dees Troy8d66f8b2013-10-08 14:04:55 +000058RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
Ethan Yonker03a42f62014-08-08 11:03:51 -050059ifneq ($(TW_OEM_BUILD),true)
60 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040061else
62 TW_EXCLUDE_MTP := true
63endif
64ifneq ($(TW_EXCLUDE_MTP), true)
65 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp.so
Ethan Yonker03a42f62014-08-08 11:03:51 -050066endif
Dees_Troya95f55c2013-08-17 13:14:43 +000067ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
68 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
69endif
Dees_Troy2673cec2013-04-02 20:22:16 +000070RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000071RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +000072ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +000073 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +000074 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
75 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
76 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +000077endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010078ifeq ($(BUILD_ID), GINGERBREAD)
79 TW_NO_EXFAT := true
80endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000081ifneq ($(TW_NO_EXFAT), true)
Dees_Troyb05ddee2013-01-28 20:24:50 +000082 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010083 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
Captain Throwback6a1acf22014-09-18 12:46:35 -040084 TW_NO_EXFAT_FUSE := true
85endif
86ifneq ($(TW_NO_EXFAT_FUSE), true)
87 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
bigbiff bigbiff9c754052013-01-09 09:09:08 -050088endif
Dees_Troy51a0e822012-09-05 15:24:24 -040089ifeq ($(TW_INCLUDE_BLOBPACK), true)
90 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
91endif
92ifeq ($(TW_INCLUDE_INJECTTWRP), true)
93 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
94endif
95ifeq ($(TW_INCLUDE_DUMLOCK), true)
96 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
97endif
98ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000099 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -0400100 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
101endif
102ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +0000103 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -0400104 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
105endif
Dees_Troy38bd7602012-09-14 13:33:53 -0400106ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
107 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
108endif
Dees_Troy4546fe72013-01-10 14:33:27 +0000109ifneq ($(wildcard system/core/libsparse/Android.mk),)
110 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
111endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000112ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
113 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
114 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
115endif
Dees_Troye5017042013-08-29 16:38:55 +0000116ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
117 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
118 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
119 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fibmap.f2fs
120endif
Dees Troy0226cd52013-11-04 14:12:35 +0000121ifneq ($(wildcard system/core/reboot/Android.mk),)
122 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
123endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400124
125TWRP_AUTOGEN := $(intermediates)/teamwin
126
127GEN := $(intermediates)/teamwin
128$(GEN): $(RELINK)
129$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
130 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
131 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
132
133LOCAL_GENERATED_SOURCES := $(GEN)
134LOCAL_SRC_FILES := teamwin $(GEN)
135include $(BUILD_PREBUILT)
136
Dees_Troy51a0e822012-09-05 15:24:24 -0400137#fix_permissions
138include $(CLEAR_VARS)
139LOCAL_MODULE := fix_permissions.sh
140LOCAL_MODULE_TAGS := eng
141LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
142LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
143LOCAL_SRC_FILES := $(LOCAL_MODULE)
144include $(BUILD_PREBUILT)
145
Dees_Troy51a0e822012-09-05 15:24:24 -0400146#mke2fs.conf
147include $(CLEAR_VARS)
148LOCAL_MODULE := mke2fs.conf
149LOCAL_MODULE_TAGS := eng
150LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
151LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
152LOCAL_SRC_FILES := $(LOCAL_MODULE)
153include $(BUILD_PREBUILT)
154
155ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
156 #parted
157 include $(CLEAR_VARS)
158 LOCAL_MODULE := parted
159 LOCAL_MODULE_TAGS := eng
160 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
161 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
162 LOCAL_SRC_FILES := $(LOCAL_MODULE)
163 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400164endif
165
Dees_Troy83bd4832013-05-04 12:39:56 +0000166# copy license file for OpenAES
167ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
168 include $(CLEAR_VARS)
169 LOCAL_MODULE := ../openaes/LICENSE
170 LOCAL_MODULE_TAGS := eng
171 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
172 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
173 LOCAL_SRC_FILES := $(LOCAL_MODULE)
174 include $(BUILD_PREBUILT)
175endif
176
Dees_Troy51a0e822012-09-05 15:24:24 -0400177ifeq ($(TW_INCLUDE_DUMLOCK), true)
178 #htcdumlock for /system for dumlock
179 include $(CLEAR_VARS)
180 LOCAL_MODULE := htcdumlocksys
181 LOCAL_MODULE_TAGS := eng
182 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
183 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
184 LOCAL_SRC_FILES := $(LOCAL_MODULE)
185 include $(BUILD_PREBUILT)
186
187 #flash_image for /system for dumlock
188 include $(CLEAR_VARS)
189 LOCAL_MODULE := flash_imagesys
190 LOCAL_MODULE_TAGS := eng
191 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
192 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
193 LOCAL_SRC_FILES := $(LOCAL_MODULE)
194 include $(BUILD_PREBUILT)
195
196 #dump_image for /system for dumlock
197 include $(CLEAR_VARS)
198 LOCAL_MODULE := dump_imagesys
199 LOCAL_MODULE_TAGS := eng
200 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
201 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
202 LOCAL_SRC_FILES := $(LOCAL_MODULE)
203 include $(BUILD_PREBUILT)
204
205 #libbmlutils for /system for dumlock
206 include $(CLEAR_VARS)
207 LOCAL_MODULE := libbmlutils.so
208 LOCAL_MODULE_TAGS := eng
209 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
210 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
211 LOCAL_SRC_FILES := $(LOCAL_MODULE)
212 include $(BUILD_PREBUILT)
213
214 #libflashutils for /system for dumlock
215 include $(CLEAR_VARS)
216 LOCAL_MODULE := libflashutils.so
217 LOCAL_MODULE_TAGS := eng
218 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
219 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
220 LOCAL_SRC_FILES := $(LOCAL_MODULE)
221 include $(BUILD_PREBUILT)
222
223 #libmmcutils for /system for dumlock
224 include $(CLEAR_VARS)
225 LOCAL_MODULE := libmmcutils.so
226 LOCAL_MODULE_TAGS := eng
227 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
228 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
229 LOCAL_SRC_FILES := $(LOCAL_MODULE)
230 include $(BUILD_PREBUILT)
231
232 #libmtdutils for /system for dumlock
233 include $(CLEAR_VARS)
234 LOCAL_MODULE := libmtdutils.so
235 LOCAL_MODULE_TAGS := eng
236 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
237 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
238 LOCAL_SRC_FILES := $(LOCAL_MODULE)
239 include $(BUILD_PREBUILT)
240
241 #HTCDumlock.apk
242 include $(CLEAR_VARS)
243 LOCAL_MODULE := HTCDumlock.apk
244 LOCAL_MODULE_TAGS := eng
245 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
246 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
247 LOCAL_SRC_FILES := $(LOCAL_MODULE)
248 include $(BUILD_PREBUILT)
249endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600250
251ifneq ($(TW_EXCLUDE_SUPERSU), true)
252 #su binary
253 include $(CLEAR_VARS)
254 LOCAL_MODULE := su
255 LOCAL_MODULE_TAGS := eng
256 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600257 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600258 LOCAL_SRC_FILES := $(LOCAL_MODULE)
259 include $(BUILD_PREBUILT)
260
Dees_Troya7939bb2013-08-29 20:21:12 +0000261 #install-recovery.sh
262 include $(CLEAR_VARS)
263 LOCAL_MODULE := install-recovery.sh
264 LOCAL_MODULE_TAGS := eng
265 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
266 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
267 LOCAL_SRC_FILES := $(LOCAL_MODULE)
268 include $(BUILD_PREBUILT)
269
270 #99SuperSUDaemon
271 include $(CLEAR_VARS)
272 LOCAL_MODULE := 99SuperSUDaemon
273 LOCAL_MODULE_TAGS := eng
274 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
275 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
276 LOCAL_SRC_FILES := $(LOCAL_MODULE)
277 include $(BUILD_PREBUILT)
278
Dees_Troy6ef66352013-02-21 08:26:57 -0600279 #SuperSU special installer APK
280 include $(CLEAR_VARS)
281 LOCAL_MODULE := Superuser.apk
282 LOCAL_MODULE_TAGS := eng
283 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600284 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600285 LOCAL_SRC_FILES := $(LOCAL_MODULE)
286 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600287endif