blob: 8a29e14e80cc7a6e3ae688914ae8a388a7aaa2e4 [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
29RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
30RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
31RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
32RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
33RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
34RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
35RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
36RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
37RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
38RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
39RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
40RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
41RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000042RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
43RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
44RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
45RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050046RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010047RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040048RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
49RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
50RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
51RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Vojtech Bocek85932342013-04-01 22:11:33 +020052#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so
Dees Troy8d66f8b2013-10-08 14:04:55 +000053RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
Ethan Yonker03a42f62014-08-08 11:03:51 -050054ifneq ($(TW_OEM_BUILD),true)
55 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp
56endif
Dees_Troya95f55c2013-08-17 13:14:43 +000057ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
58 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
59endif
Dees_Troy2673cec2013-04-02 20:22:16 +000060RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000061RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +000062ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +000063 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +000064 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
65 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
66 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +000067endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010068ifeq ($(BUILD_ID), GINGERBREAD)
69 TW_NO_EXFAT := true
70endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000071ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050072 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000073 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010074 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050075endif
Dees_Troy51a0e822012-09-05 15:24:24 -040076ifeq ($(TW_INCLUDE_BLOBPACK), true)
77 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
78endif
79ifeq ($(TW_INCLUDE_INJECTTWRP), true)
80 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
81endif
82ifeq ($(TW_INCLUDE_DUMLOCK), true)
83 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
84endif
85ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000086 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040087 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
88endif
89ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000090 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040091 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
92endif
Dees_Troy38bd7602012-09-14 13:33:53 -040093ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
94 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
95endif
Dees_Troy4546fe72013-01-10 14:33:27 +000096ifneq ($(wildcard system/core/libsparse/Android.mk),)
97 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
98endif
Dees_Troy83bd4832013-05-04 12:39:56 +000099ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
100 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
101 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
102endif
Dees_Troye5017042013-08-29 16:38:55 +0000103ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
104 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
105 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
106 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fibmap.f2fs
107endif
Dees Troy0226cd52013-11-04 14:12:35 +0000108ifneq ($(wildcard system/core/reboot/Android.mk),)
109 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
110endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400111
112TWRP_AUTOGEN := $(intermediates)/teamwin
113
114GEN := $(intermediates)/teamwin
115$(GEN): $(RELINK)
116$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
117 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
118 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
119
120LOCAL_GENERATED_SOURCES := $(GEN)
121LOCAL_SRC_FILES := teamwin $(GEN)
122include $(BUILD_PREBUILT)
123
Dees_Troy51a0e822012-09-05 15:24:24 -0400124#fix_permissions
125include $(CLEAR_VARS)
126LOCAL_MODULE := fix_permissions.sh
127LOCAL_MODULE_TAGS := eng
128LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
129LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
130LOCAL_SRC_FILES := $(LOCAL_MODULE)
131include $(BUILD_PREBUILT)
132
Dees_Troy51a0e822012-09-05 15:24:24 -0400133#mke2fs.conf
134include $(CLEAR_VARS)
135LOCAL_MODULE := mke2fs.conf
136LOCAL_MODULE_TAGS := eng
137LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
138LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
139LOCAL_SRC_FILES := $(LOCAL_MODULE)
140include $(BUILD_PREBUILT)
141
142ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
143 #parted
144 include $(CLEAR_VARS)
145 LOCAL_MODULE := parted
146 LOCAL_MODULE_TAGS := eng
147 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
148 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
149 LOCAL_SRC_FILES := $(LOCAL_MODULE)
150 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400151endif
152
Dees_Troy83bd4832013-05-04 12:39:56 +0000153# copy license file for OpenAES
154ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
155 include $(CLEAR_VARS)
156 LOCAL_MODULE := ../openaes/LICENSE
157 LOCAL_MODULE_TAGS := eng
158 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
159 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
160 LOCAL_SRC_FILES := $(LOCAL_MODULE)
161 include $(BUILD_PREBUILT)
162endif
163
Dees_Troy51a0e822012-09-05 15:24:24 -0400164ifeq ($(TW_INCLUDE_DUMLOCK), true)
165 #htcdumlock for /system for dumlock
166 include $(CLEAR_VARS)
167 LOCAL_MODULE := htcdumlocksys
168 LOCAL_MODULE_TAGS := eng
169 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
170 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
171 LOCAL_SRC_FILES := $(LOCAL_MODULE)
172 include $(BUILD_PREBUILT)
173
174 #flash_image for /system for dumlock
175 include $(CLEAR_VARS)
176 LOCAL_MODULE := flash_imagesys
177 LOCAL_MODULE_TAGS := eng
178 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
179 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
180 LOCAL_SRC_FILES := $(LOCAL_MODULE)
181 include $(BUILD_PREBUILT)
182
183 #dump_image for /system for dumlock
184 include $(CLEAR_VARS)
185 LOCAL_MODULE := dump_imagesys
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 #libbmlutils for /system for dumlock
193 include $(CLEAR_VARS)
194 LOCAL_MODULE := libbmlutils.so
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 #libflashutils for /system for dumlock
202 include $(CLEAR_VARS)
203 LOCAL_MODULE := libflashutils.so
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 #libmmcutils for /system for dumlock
211 include $(CLEAR_VARS)
212 LOCAL_MODULE := libmmcutils.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 #libmtdutils for /system for dumlock
220 include $(CLEAR_VARS)
221 LOCAL_MODULE := libmtdutils.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 #HTCDumlock.apk
229 include $(CLEAR_VARS)
230 LOCAL_MODULE := HTCDumlock.apk
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)
236endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600237
238ifneq ($(TW_EXCLUDE_SUPERSU), true)
239 #su binary
240 include $(CLEAR_VARS)
241 LOCAL_MODULE := su
242 LOCAL_MODULE_TAGS := eng
243 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600244 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600245 LOCAL_SRC_FILES := $(LOCAL_MODULE)
246 include $(BUILD_PREBUILT)
247
Dees_Troya7939bb2013-08-29 20:21:12 +0000248 #install-recovery.sh
249 include $(CLEAR_VARS)
250 LOCAL_MODULE := install-recovery.sh
251 LOCAL_MODULE_TAGS := eng
252 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
253 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
254 LOCAL_SRC_FILES := $(LOCAL_MODULE)
255 include $(BUILD_PREBUILT)
256
257 #99SuperSUDaemon
258 include $(CLEAR_VARS)
259 LOCAL_MODULE := 99SuperSUDaemon
260 LOCAL_MODULE_TAGS := eng
261 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
262 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
263 LOCAL_SRC_FILES := $(LOCAL_MODULE)
264 include $(BUILD_PREBUILT)
265
Dees_Troy6ef66352013-02-21 08:26:57 -0600266 #SuperSU special installer APK
267 include $(CLEAR_VARS)
268 LOCAL_MODULE := Superuser.apk
269 LOCAL_MODULE_TAGS := eng
270 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600271 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600272 LOCAL_SRC_FILES := $(LOCAL_MODULE)
273 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600274endif