blob: b5da5a90391a328ed1fad849947ce94c72fdad86 [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
16RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox
17RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
bigbiff bigbiff9c754052013-01-09 09:09:08 -050018RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck
19RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel
20RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkdosfs
Dees_Troy51a0e822012-09-05 15:24:24 -040021RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
22RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
23RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs
24RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker
25RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
26RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
27RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
28RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
29RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
30RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
31RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
32RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
33RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
34RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
35RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
36RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
37RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000038RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
39RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
40RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
41RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050042RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010043RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040044RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
45RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
46RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
47RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Vojtech Bocek85932342013-04-01 22:11:33 +020048#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so
Dees Troy8d66f8b2013-10-08 14:04:55 +000049RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
Dees_Troya95f55c2013-08-17 13:14:43 +000050ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
51 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
52endif
Dees_Troy2673cec2013-04-02 20:22:16 +000053RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000054RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +000055ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +000056 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +000057 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
58 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
59 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +000060endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010061ifeq ($(BUILD_ID), GINGERBREAD)
62 TW_NO_EXFAT := true
63endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000064ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050065 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000066 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010067 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050068endif
Dees_Troy51a0e822012-09-05 15:24:24 -040069ifeq ($(TW_INCLUDE_BLOBPACK), true)
70 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
71endif
72ifeq ($(TW_INCLUDE_INJECTTWRP), true)
73 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
74endif
75ifeq ($(TW_INCLUDE_DUMLOCK), true)
76 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
77endif
78ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000079 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040080 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
81endif
82ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000083 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040084 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
85endif
Dees_Troy38bd7602012-09-14 13:33:53 -040086ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
87 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
88endif
Dees_Troy4546fe72013-01-10 14:33:27 +000089ifneq ($(wildcard system/core/libsparse/Android.mk),)
90 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
91endif
Dees_Troy83bd4832013-05-04 12:39:56 +000092ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
93 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
94 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
95endif
Dees_Troye5017042013-08-29 16:38:55 +000096ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
97 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
98 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
99 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fibmap.f2fs
100endif
Dees Troy0226cd52013-11-04 14:12:35 +0000101ifneq ($(wildcard system/core/reboot/Android.mk),)
102 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
103endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400104
105TWRP_AUTOGEN := $(intermediates)/teamwin
106
107GEN := $(intermediates)/teamwin
108$(GEN): $(RELINK)
109$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
110 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
111 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
112
113LOCAL_GENERATED_SOURCES := $(GEN)
114LOCAL_SRC_FILES := teamwin $(GEN)
115include $(BUILD_PREBUILT)
116
Dees_Troy51a0e822012-09-05 15:24:24 -0400117#fix_permissions
118include $(CLEAR_VARS)
119LOCAL_MODULE := fix_permissions.sh
120LOCAL_MODULE_TAGS := eng
121LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
122LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
123LOCAL_SRC_FILES := $(LOCAL_MODULE)
124include $(BUILD_PREBUILT)
125
Dees_Troy51a0e822012-09-05 15:24:24 -0400126#mke2fs.conf
127include $(CLEAR_VARS)
128LOCAL_MODULE := mke2fs.conf
129LOCAL_MODULE_TAGS := eng
130LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
131LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
132LOCAL_SRC_FILES := $(LOCAL_MODULE)
133include $(BUILD_PREBUILT)
134
135ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
136 #parted
137 include $(CLEAR_VARS)
138 LOCAL_MODULE := parted
139 LOCAL_MODULE_TAGS := eng
140 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
141 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
142 LOCAL_SRC_FILES := $(LOCAL_MODULE)
143 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400144endif
145
Dees_Troy83bd4832013-05-04 12:39:56 +0000146# copy license file for OpenAES
147ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
148 include $(CLEAR_VARS)
149 LOCAL_MODULE := ../openaes/LICENSE
150 LOCAL_MODULE_TAGS := eng
151 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
152 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
153 LOCAL_SRC_FILES := $(LOCAL_MODULE)
154 include $(BUILD_PREBUILT)
155endif
156
Dees_Troy51a0e822012-09-05 15:24:24 -0400157ifeq ($(TW_INCLUDE_DUMLOCK), true)
158 #htcdumlock for /system for dumlock
159 include $(CLEAR_VARS)
160 LOCAL_MODULE := htcdumlocksys
161 LOCAL_MODULE_TAGS := eng
162 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
163 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
164 LOCAL_SRC_FILES := $(LOCAL_MODULE)
165 include $(BUILD_PREBUILT)
166
167 #flash_image for /system for dumlock
168 include $(CLEAR_VARS)
169 LOCAL_MODULE := flash_imagesys
170 LOCAL_MODULE_TAGS := eng
171 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
172 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
173 LOCAL_SRC_FILES := $(LOCAL_MODULE)
174 include $(BUILD_PREBUILT)
175
176 #dump_image for /system for dumlock
177 include $(CLEAR_VARS)
178 LOCAL_MODULE := dump_imagesys
179 LOCAL_MODULE_TAGS := eng
180 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
181 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
182 LOCAL_SRC_FILES := $(LOCAL_MODULE)
183 include $(BUILD_PREBUILT)
184
185 #libbmlutils for /system for dumlock
186 include $(CLEAR_VARS)
187 LOCAL_MODULE := libbmlutils.so
188 LOCAL_MODULE_TAGS := eng
189 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
190 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
191 LOCAL_SRC_FILES := $(LOCAL_MODULE)
192 include $(BUILD_PREBUILT)
193
194 #libflashutils for /system for dumlock
195 include $(CLEAR_VARS)
196 LOCAL_MODULE := libflashutils.so
197 LOCAL_MODULE_TAGS := eng
198 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
199 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
200 LOCAL_SRC_FILES := $(LOCAL_MODULE)
201 include $(BUILD_PREBUILT)
202
203 #libmmcutils for /system for dumlock
204 include $(CLEAR_VARS)
205 LOCAL_MODULE := libmmcutils.so
206 LOCAL_MODULE_TAGS := eng
207 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
208 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
209 LOCAL_SRC_FILES := $(LOCAL_MODULE)
210 include $(BUILD_PREBUILT)
211
212 #libmtdutils for /system for dumlock
213 include $(CLEAR_VARS)
214 LOCAL_MODULE := libmtdutils.so
215 LOCAL_MODULE_TAGS := eng
216 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
217 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
218 LOCAL_SRC_FILES := $(LOCAL_MODULE)
219 include $(BUILD_PREBUILT)
220
221 #HTCDumlock.apk
222 include $(CLEAR_VARS)
223 LOCAL_MODULE := HTCDumlock.apk
224 LOCAL_MODULE_TAGS := eng
225 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
226 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
227 LOCAL_SRC_FILES := $(LOCAL_MODULE)
228 include $(BUILD_PREBUILT)
229endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600230
231ifneq ($(TW_EXCLUDE_SUPERSU), true)
232 #su binary
233 include $(CLEAR_VARS)
234 LOCAL_MODULE := su
235 LOCAL_MODULE_TAGS := eng
236 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600237 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600238 LOCAL_SRC_FILES := $(LOCAL_MODULE)
239 include $(BUILD_PREBUILT)
240
Dees_Troya7939bb2013-08-29 20:21:12 +0000241 #install-recovery.sh
242 include $(CLEAR_VARS)
243 LOCAL_MODULE := install-recovery.sh
244 LOCAL_MODULE_TAGS := eng
245 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
246 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
247 LOCAL_SRC_FILES := $(LOCAL_MODULE)
248 include $(BUILD_PREBUILT)
249
250 #99SuperSUDaemon
251 include $(CLEAR_VARS)
252 LOCAL_MODULE := 99SuperSUDaemon
253 LOCAL_MODULE_TAGS := eng
254 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
255 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
256 LOCAL_SRC_FILES := $(LOCAL_MODULE)
257 include $(BUILD_PREBUILT)
258
Dees_Troy6ef66352013-02-21 08:26:57 -0600259 #SuperSU special installer APK
260 include $(CLEAR_VARS)
261 LOCAL_MODULE := Superuser.apk
262 LOCAL_MODULE_TAGS := eng
263 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600264 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600265 LOCAL_SRC_FILES := $(LOCAL_MODULE)
266 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600267endif