blob: 1f784d3599f912f394ddafde81eb3fbe52542169 [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
12# Manage list
13RELINK_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
Dees_Troya95f55c2013-08-17 13:14:43 +000054ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
55 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
56endif
Dees_Troy2673cec2013-04-02 20:22:16 +000057RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000058RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +000059ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +000060 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +000061 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
62 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
63 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +000064endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010065ifeq ($(BUILD_ID), GINGERBREAD)
66 TW_NO_EXFAT := true
67endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000068ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050069 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000070 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010071 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050072endif
Dees_Troy51a0e822012-09-05 15:24:24 -040073ifeq ($(TW_INCLUDE_BLOBPACK), true)
74 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
75endif
76ifeq ($(TW_INCLUDE_INJECTTWRP), true)
77 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
78endif
79ifeq ($(TW_INCLUDE_DUMLOCK), true)
80 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
81endif
82ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000083 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040084 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
85endif
86ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000087 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040088 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
89endif
Dees_Troy38bd7602012-09-14 13:33:53 -040090ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
91 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
92endif
Dees_Troy4546fe72013-01-10 14:33:27 +000093ifneq ($(wildcard system/core/libsparse/Android.mk),)
94 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
95endif
Dees_Troy83bd4832013-05-04 12:39:56 +000096ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
97 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
98 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
99endif
Dees_Troye5017042013-08-29 16:38:55 +0000100ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
101 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
102 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
103 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fibmap.f2fs
104endif
Dees Troy0226cd52013-11-04 14:12:35 +0000105ifneq ($(wildcard system/core/reboot/Android.mk),)
106 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
107endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400108
109TWRP_AUTOGEN := $(intermediates)/teamwin
110
111GEN := $(intermediates)/teamwin
112$(GEN): $(RELINK)
113$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
114 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
115 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
116
117LOCAL_GENERATED_SOURCES := $(GEN)
118LOCAL_SRC_FILES := teamwin $(GEN)
119include $(BUILD_PREBUILT)
120
Dees_Troy51a0e822012-09-05 15:24:24 -0400121#fix_permissions
122include $(CLEAR_VARS)
123LOCAL_MODULE := fix_permissions.sh
124LOCAL_MODULE_TAGS := eng
125LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
126LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
127LOCAL_SRC_FILES := $(LOCAL_MODULE)
128include $(BUILD_PREBUILT)
129
Dees_Troy51a0e822012-09-05 15:24:24 -0400130#mke2fs.conf
131include $(CLEAR_VARS)
132LOCAL_MODULE := mke2fs.conf
133LOCAL_MODULE_TAGS := eng
134LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
135LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
136LOCAL_SRC_FILES := $(LOCAL_MODULE)
137include $(BUILD_PREBUILT)
138
139ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
140 #parted
141 include $(CLEAR_VARS)
142 LOCAL_MODULE := parted
143 LOCAL_MODULE_TAGS := eng
144 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
145 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
146 LOCAL_SRC_FILES := $(LOCAL_MODULE)
147 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400148endif
149
Dees_Troy83bd4832013-05-04 12:39:56 +0000150# copy license file for OpenAES
151ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
152 include $(CLEAR_VARS)
153 LOCAL_MODULE := ../openaes/LICENSE
154 LOCAL_MODULE_TAGS := eng
155 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
156 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
157 LOCAL_SRC_FILES := $(LOCAL_MODULE)
158 include $(BUILD_PREBUILT)
159endif
160
Dees_Troy51a0e822012-09-05 15:24:24 -0400161ifeq ($(TW_INCLUDE_DUMLOCK), true)
162 #htcdumlock for /system for dumlock
163 include $(CLEAR_VARS)
164 LOCAL_MODULE := htcdumlocksys
165 LOCAL_MODULE_TAGS := eng
166 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
167 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
168 LOCAL_SRC_FILES := $(LOCAL_MODULE)
169 include $(BUILD_PREBUILT)
170
171 #flash_image for /system for dumlock
172 include $(CLEAR_VARS)
173 LOCAL_MODULE := flash_imagesys
174 LOCAL_MODULE_TAGS := eng
175 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
176 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
177 LOCAL_SRC_FILES := $(LOCAL_MODULE)
178 include $(BUILD_PREBUILT)
179
180 #dump_image for /system for dumlock
181 include $(CLEAR_VARS)
182 LOCAL_MODULE := dump_imagesys
183 LOCAL_MODULE_TAGS := eng
184 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
185 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
186 LOCAL_SRC_FILES := $(LOCAL_MODULE)
187 include $(BUILD_PREBUILT)
188
189 #libbmlutils for /system for dumlock
190 include $(CLEAR_VARS)
191 LOCAL_MODULE := libbmlutils.so
192 LOCAL_MODULE_TAGS := eng
193 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
194 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
195 LOCAL_SRC_FILES := $(LOCAL_MODULE)
196 include $(BUILD_PREBUILT)
197
198 #libflashutils for /system for dumlock
199 include $(CLEAR_VARS)
200 LOCAL_MODULE := libflashutils.so
201 LOCAL_MODULE_TAGS := eng
202 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
203 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
204 LOCAL_SRC_FILES := $(LOCAL_MODULE)
205 include $(BUILD_PREBUILT)
206
207 #libmmcutils for /system for dumlock
208 include $(CLEAR_VARS)
209 LOCAL_MODULE := libmmcutils.so
210 LOCAL_MODULE_TAGS := eng
211 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
212 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
213 LOCAL_SRC_FILES := $(LOCAL_MODULE)
214 include $(BUILD_PREBUILT)
215
216 #libmtdutils for /system for dumlock
217 include $(CLEAR_VARS)
218 LOCAL_MODULE := libmtdutils.so
219 LOCAL_MODULE_TAGS := eng
220 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
221 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
222 LOCAL_SRC_FILES := $(LOCAL_MODULE)
223 include $(BUILD_PREBUILT)
224
225 #HTCDumlock.apk
226 include $(CLEAR_VARS)
227 LOCAL_MODULE := HTCDumlock.apk
228 LOCAL_MODULE_TAGS := eng
229 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
230 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
231 LOCAL_SRC_FILES := $(LOCAL_MODULE)
232 include $(BUILD_PREBUILT)
233endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600234
235ifneq ($(TW_EXCLUDE_SUPERSU), true)
236 #su binary
237 include $(CLEAR_VARS)
238 LOCAL_MODULE := su
239 LOCAL_MODULE_TAGS := eng
240 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600241 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600242 LOCAL_SRC_FILES := $(LOCAL_MODULE)
243 include $(BUILD_PREBUILT)
244
Dees_Troya7939bb2013-08-29 20:21:12 +0000245 #install-recovery.sh
246 include $(CLEAR_VARS)
247 LOCAL_MODULE := install-recovery.sh
248 LOCAL_MODULE_TAGS := eng
249 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
250 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
251 LOCAL_SRC_FILES := $(LOCAL_MODULE)
252 include $(BUILD_PREBUILT)
253
254 #99SuperSUDaemon
255 include $(CLEAR_VARS)
256 LOCAL_MODULE := 99SuperSUDaemon
257 LOCAL_MODULE_TAGS := eng
258 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
259 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
260 LOCAL_SRC_FILES := $(LOCAL_MODULE)
261 include $(BUILD_PREBUILT)
262
Dees_Troy6ef66352013-02-21 08:26:57 -0600263 #SuperSU special installer APK
264 include $(CLEAR_VARS)
265 LOCAL_MODULE := Superuser.apk
266 LOCAL_MODULE_TAGS := eng
267 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600268 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600269 LOCAL_SRC_FILES := $(LOCAL_MODULE)
270 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600271endif