blob: 0169fb89d28264fe2b96f2a7cb5cde320c7838bb [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_Troya95f55c2013-08-17 13:14:43 +000049ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
50 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
51endif
Dees_Troy2673cec2013-04-02 20:22:16 +000052RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000053RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +000054ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +000055 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +000056 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
57 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
58 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +000059endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010060ifeq ($(BUILD_ID), GINGERBREAD)
61 TW_NO_EXFAT := true
62endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000063ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050064 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000065 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010066 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050067endif
Dees_Troy51a0e822012-09-05 15:24:24 -040068ifeq ($(TW_INCLUDE_BLOBPACK), true)
69 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
70endif
71ifeq ($(TW_INCLUDE_INJECTTWRP), true)
72 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
73endif
74ifeq ($(TW_INCLUDE_DUMLOCK), true)
75 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
76endif
77ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000078 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040079 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
80endif
81ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000082 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040083 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
84endif
Dees_Troy38bd7602012-09-14 13:33:53 -040085ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
86 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
87endif
Dees_Troy4546fe72013-01-10 14:33:27 +000088ifneq ($(wildcard system/core/libsparse/Android.mk),)
89 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
90endif
Dees_Troy83bd4832013-05-04 12:39:56 +000091ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
92 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
93 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
94endif
Dees_Troye5017042013-08-29 16:38:55 +000095ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
96 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
97 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
98 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fibmap.f2fs
99endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400100
101TWRP_AUTOGEN := $(intermediates)/teamwin
102
103GEN := $(intermediates)/teamwin
104$(GEN): $(RELINK)
105$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
106 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
107 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
108
109LOCAL_GENERATED_SOURCES := $(GEN)
110LOCAL_SRC_FILES := teamwin $(GEN)
111include $(BUILD_PREBUILT)
112
Dees_Troy51a0e822012-09-05 15:24:24 -0400113#fix_permissions
114include $(CLEAR_VARS)
115LOCAL_MODULE := fix_permissions.sh
116LOCAL_MODULE_TAGS := eng
117LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
118LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
119LOCAL_SRC_FILES := $(LOCAL_MODULE)
120include $(BUILD_PREBUILT)
121
Dees_Troy51a0e822012-09-05 15:24:24 -0400122#mke2fs.conf
123include $(CLEAR_VARS)
124LOCAL_MODULE := mke2fs.conf
125LOCAL_MODULE_TAGS := eng
126LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
127LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
128LOCAL_SRC_FILES := $(LOCAL_MODULE)
129include $(BUILD_PREBUILT)
130
131ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
132 #parted
133 include $(CLEAR_VARS)
134 LOCAL_MODULE := parted
135 LOCAL_MODULE_TAGS := eng
136 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
137 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
138 LOCAL_SRC_FILES := $(LOCAL_MODULE)
139 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400140endif
141
Dees_Troy83bd4832013-05-04 12:39:56 +0000142# copy license file for OpenAES
143ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
144 include $(CLEAR_VARS)
145 LOCAL_MODULE := ../openaes/LICENSE
146 LOCAL_MODULE_TAGS := eng
147 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
148 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
149 LOCAL_SRC_FILES := $(LOCAL_MODULE)
150 include $(BUILD_PREBUILT)
151endif
152
Dees_Troy51a0e822012-09-05 15:24:24 -0400153ifeq ($(TW_INCLUDE_DUMLOCK), true)
154 #htcdumlock for /system for dumlock
155 include $(CLEAR_VARS)
156 LOCAL_MODULE := htcdumlocksys
157 LOCAL_MODULE_TAGS := eng
158 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
159 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
160 LOCAL_SRC_FILES := $(LOCAL_MODULE)
161 include $(BUILD_PREBUILT)
162
163 #flash_image for /system for dumlock
164 include $(CLEAR_VARS)
165 LOCAL_MODULE := flash_imagesys
166 LOCAL_MODULE_TAGS := eng
167 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
168 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
169 LOCAL_SRC_FILES := $(LOCAL_MODULE)
170 include $(BUILD_PREBUILT)
171
172 #dump_image for /system for dumlock
173 include $(CLEAR_VARS)
174 LOCAL_MODULE := dump_imagesys
175 LOCAL_MODULE_TAGS := eng
176 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
177 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
178 LOCAL_SRC_FILES := $(LOCAL_MODULE)
179 include $(BUILD_PREBUILT)
180
181 #libbmlutils for /system for dumlock
182 include $(CLEAR_VARS)
183 LOCAL_MODULE := libbmlutils.so
184 LOCAL_MODULE_TAGS := eng
185 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
186 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
187 LOCAL_SRC_FILES := $(LOCAL_MODULE)
188 include $(BUILD_PREBUILT)
189
190 #libflashutils for /system for dumlock
191 include $(CLEAR_VARS)
192 LOCAL_MODULE := libflashutils.so
193 LOCAL_MODULE_TAGS := eng
194 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
195 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
196 LOCAL_SRC_FILES := $(LOCAL_MODULE)
197 include $(BUILD_PREBUILT)
198
199 #libmmcutils for /system for dumlock
200 include $(CLEAR_VARS)
201 LOCAL_MODULE := libmmcutils.so
202 LOCAL_MODULE_TAGS := eng
203 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
204 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
205 LOCAL_SRC_FILES := $(LOCAL_MODULE)
206 include $(BUILD_PREBUILT)
207
208 #libmtdutils for /system for dumlock
209 include $(CLEAR_VARS)
210 LOCAL_MODULE := libmtdutils.so
211 LOCAL_MODULE_TAGS := eng
212 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
213 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
214 LOCAL_SRC_FILES := $(LOCAL_MODULE)
215 include $(BUILD_PREBUILT)
216
217 #HTCDumlock.apk
218 include $(CLEAR_VARS)
219 LOCAL_MODULE := HTCDumlock.apk
220 LOCAL_MODULE_TAGS := eng
221 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
222 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
223 LOCAL_SRC_FILES := $(LOCAL_MODULE)
224 include $(BUILD_PREBUILT)
225endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600226
227ifneq ($(TW_EXCLUDE_SUPERSU), true)
228 #su binary
229 include $(CLEAR_VARS)
230 LOCAL_MODULE := su
231 LOCAL_MODULE_TAGS := eng
232 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600233 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600234 LOCAL_SRC_FILES := $(LOCAL_MODULE)
235 include $(BUILD_PREBUILT)
236
Dees_Troya7939bb2013-08-29 20:21:12 +0000237 #install-recovery.sh
238 include $(CLEAR_VARS)
239 LOCAL_MODULE := install-recovery.sh
240 LOCAL_MODULE_TAGS := eng
241 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
242 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
243 LOCAL_SRC_FILES := $(LOCAL_MODULE)
244 include $(BUILD_PREBUILT)
245
246 #99SuperSUDaemon
247 include $(CLEAR_VARS)
248 LOCAL_MODULE := 99SuperSUDaemon
249 LOCAL_MODULE_TAGS := eng
250 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
251 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
252 LOCAL_SRC_FILES := $(LOCAL_MODULE)
253 include $(BUILD_PREBUILT)
254
Dees_Troy6ef66352013-02-21 08:26:57 -0600255 #SuperSU special installer APK
256 include $(CLEAR_VARS)
257 LOCAL_MODULE := Superuser.apk
258 LOCAL_MODULE_TAGS := eng
259 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600260 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600261 LOCAL_SRC_FILES := $(LOCAL_MODULE)
262 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600263endif