blob: e31ec8e31e716d29c0400371341339b61cec8db6 [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_Troy43d8b002012-09-17 16:00:01 -040049RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
Dees_Troy2673cec2013-04-02 20:22:16 +000050RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +000051RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees_Troyf2280ff2013-08-06 18:01:12 +000052ifneq ($(wildcard external/libselinux/Android.mk),)
53 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
54endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010055ifeq ($(BUILD_ID), GINGERBREAD)
56 TW_NO_EXFAT := true
57endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000058ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050059 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000060 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010061 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050062endif
Dees_Troy51a0e822012-09-05 15:24:24 -040063ifeq ($(TW_INCLUDE_BLOBPACK), true)
64 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
65endif
66ifeq ($(TW_INCLUDE_INJECTTWRP), true)
67 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
68endif
69ifeq ($(TW_INCLUDE_DUMLOCK), true)
70 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
71endif
72ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000073 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040074 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
75endif
76ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000077 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040078 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
79endif
Dees_Troy38bd7602012-09-14 13:33:53 -040080ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
81 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
82endif
Dees_Troy4546fe72013-01-10 14:33:27 +000083ifneq ($(wildcard system/core/libsparse/Android.mk),)
84 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
85endif
Dees_Troy83bd4832013-05-04 12:39:56 +000086ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
87 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
88 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
89endif
Dees_Troy51a0e822012-09-05 15:24:24 -040090
91TWRP_AUTOGEN := $(intermediates)/teamwin
92
93GEN := $(intermediates)/teamwin
94$(GEN): $(RELINK)
95$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
96 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
97 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
98
99LOCAL_GENERATED_SOURCES := $(GEN)
100LOCAL_SRC_FILES := teamwin $(GEN)
101include $(BUILD_PREBUILT)
102
Dees_Troy51a0e822012-09-05 15:24:24 -0400103#fix_permissions
104include $(CLEAR_VARS)
105LOCAL_MODULE := fix_permissions.sh
106LOCAL_MODULE_TAGS := eng
107LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
108LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
109LOCAL_SRC_FILES := $(LOCAL_MODULE)
110include $(BUILD_PREBUILT)
111
Dees_Troy51a0e822012-09-05 15:24:24 -0400112#mke2fs.conf
113include $(CLEAR_VARS)
114LOCAL_MODULE := mke2fs.conf
115LOCAL_MODULE_TAGS := eng
116LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
117LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
118LOCAL_SRC_FILES := $(LOCAL_MODULE)
119include $(BUILD_PREBUILT)
120
121ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
122 #parted
123 include $(CLEAR_VARS)
124 LOCAL_MODULE := parted
125 LOCAL_MODULE_TAGS := eng
126 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
127 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
128 LOCAL_SRC_FILES := $(LOCAL_MODULE)
129 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400130endif
131
Dees_Troy83bd4832013-05-04 12:39:56 +0000132# copy license file for OpenAES
133ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
134 include $(CLEAR_VARS)
135 LOCAL_MODULE := ../openaes/LICENSE
136 LOCAL_MODULE_TAGS := eng
137 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
138 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
139 LOCAL_SRC_FILES := $(LOCAL_MODULE)
140 include $(BUILD_PREBUILT)
141endif
142
Dees_Troy51a0e822012-09-05 15:24:24 -0400143ifeq ($(TW_INCLUDE_DUMLOCK), true)
144 #htcdumlock for /system for dumlock
145 include $(CLEAR_VARS)
146 LOCAL_MODULE := htcdumlocksys
147 LOCAL_MODULE_TAGS := eng
148 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
149 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
150 LOCAL_SRC_FILES := $(LOCAL_MODULE)
151 include $(BUILD_PREBUILT)
152
153 #flash_image for /system for dumlock
154 include $(CLEAR_VARS)
155 LOCAL_MODULE := flash_imagesys
156 LOCAL_MODULE_TAGS := eng
157 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
158 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
159 LOCAL_SRC_FILES := $(LOCAL_MODULE)
160 include $(BUILD_PREBUILT)
161
162 #dump_image for /system for dumlock
163 include $(CLEAR_VARS)
164 LOCAL_MODULE := dump_imagesys
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 #libbmlutils for /system for dumlock
172 include $(CLEAR_VARS)
173 LOCAL_MODULE := libbmlutils.so
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 #libflashutils for /system for dumlock
181 include $(CLEAR_VARS)
182 LOCAL_MODULE := libflashutils.so
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 #libmmcutils for /system for dumlock
190 include $(CLEAR_VARS)
191 LOCAL_MODULE := libmmcutils.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 #libmtdutils for /system for dumlock
199 include $(CLEAR_VARS)
200 LOCAL_MODULE := libmtdutils.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 #HTCDumlock.apk
208 include $(CLEAR_VARS)
209 LOCAL_MODULE := HTCDumlock.apk
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)
215endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600216
217ifneq ($(TW_EXCLUDE_SUPERSU), true)
218 #su binary
219 include $(CLEAR_VARS)
220 LOCAL_MODULE := su
221 LOCAL_MODULE_TAGS := eng
222 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600223 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600224 LOCAL_SRC_FILES := $(LOCAL_MODULE)
225 include $(BUILD_PREBUILT)
226
227 #SuperSU special installer APK
228 include $(CLEAR_VARS)
229 LOCAL_MODULE := Superuser.apk
230 LOCAL_MODULE_TAGS := eng
231 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600232 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600233 LOCAL_SRC_FILES := $(LOCAL_MODULE)
234 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600235endif