blob: 74923a05030782110cb4ee30ac755862b90ed4df [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_Troyf2280ff2013-08-06 18:01:12 +000054ifneq ($(wildcard external/libselinux/Android.mk),)
55 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
56endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010057ifeq ($(BUILD_ID), GINGERBREAD)
58 TW_NO_EXFAT := true
59endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000060ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050061 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000062 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010063 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050064endif
Dees_Troy51a0e822012-09-05 15:24:24 -040065ifeq ($(TW_INCLUDE_BLOBPACK), true)
66 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
67endif
68ifeq ($(TW_INCLUDE_INJECTTWRP), true)
69 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
70endif
71ifeq ($(TW_INCLUDE_DUMLOCK), true)
72 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
73endif
74ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000075 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040076 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
77endif
78ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000079 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040080 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
81endif
Dees_Troy38bd7602012-09-14 13:33:53 -040082ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
83 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
84endif
Dees_Troy4546fe72013-01-10 14:33:27 +000085ifneq ($(wildcard system/core/libsparse/Android.mk),)
86 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
87endif
Dees_Troy83bd4832013-05-04 12:39:56 +000088ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
89 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
90 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
91endif
Dees_Troy51a0e822012-09-05 15:24:24 -040092
93TWRP_AUTOGEN := $(intermediates)/teamwin
94
95GEN := $(intermediates)/teamwin
96$(GEN): $(RELINK)
97$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
98 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
99 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
100
101LOCAL_GENERATED_SOURCES := $(GEN)
102LOCAL_SRC_FILES := teamwin $(GEN)
103include $(BUILD_PREBUILT)
104
Dees_Troy51a0e822012-09-05 15:24:24 -0400105#fix_permissions
106include $(CLEAR_VARS)
107LOCAL_MODULE := fix_permissions.sh
108LOCAL_MODULE_TAGS := eng
109LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
110LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
111LOCAL_SRC_FILES := $(LOCAL_MODULE)
112include $(BUILD_PREBUILT)
113
Dees_Troy51a0e822012-09-05 15:24:24 -0400114#mke2fs.conf
115include $(CLEAR_VARS)
116LOCAL_MODULE := mke2fs.conf
117LOCAL_MODULE_TAGS := eng
118LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
119LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
120LOCAL_SRC_FILES := $(LOCAL_MODULE)
121include $(BUILD_PREBUILT)
122
123ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
124 #parted
125 include $(CLEAR_VARS)
126 LOCAL_MODULE := parted
127 LOCAL_MODULE_TAGS := eng
128 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
129 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
130 LOCAL_SRC_FILES := $(LOCAL_MODULE)
131 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400132endif
133
Dees_Troy83bd4832013-05-04 12:39:56 +0000134# copy license file for OpenAES
135ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
136 include $(CLEAR_VARS)
137 LOCAL_MODULE := ../openaes/LICENSE
138 LOCAL_MODULE_TAGS := eng
139 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
140 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
141 LOCAL_SRC_FILES := $(LOCAL_MODULE)
142 include $(BUILD_PREBUILT)
143endif
144
Dees_Troy51a0e822012-09-05 15:24:24 -0400145ifeq ($(TW_INCLUDE_DUMLOCK), true)
146 #htcdumlock for /system for dumlock
147 include $(CLEAR_VARS)
148 LOCAL_MODULE := htcdumlocksys
149 LOCAL_MODULE_TAGS := eng
150 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
151 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
152 LOCAL_SRC_FILES := $(LOCAL_MODULE)
153 include $(BUILD_PREBUILT)
154
155 #flash_image for /system for dumlock
156 include $(CLEAR_VARS)
157 LOCAL_MODULE := flash_imagesys
158 LOCAL_MODULE_TAGS := eng
159 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
160 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
161 LOCAL_SRC_FILES := $(LOCAL_MODULE)
162 include $(BUILD_PREBUILT)
163
164 #dump_image for /system for dumlock
165 include $(CLEAR_VARS)
166 LOCAL_MODULE := dump_imagesys
167 LOCAL_MODULE_TAGS := eng
168 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
169 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
170 LOCAL_SRC_FILES := $(LOCAL_MODULE)
171 include $(BUILD_PREBUILT)
172
173 #libbmlutils for /system for dumlock
174 include $(CLEAR_VARS)
175 LOCAL_MODULE := libbmlutils.so
176 LOCAL_MODULE_TAGS := eng
177 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
178 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
179 LOCAL_SRC_FILES := $(LOCAL_MODULE)
180 include $(BUILD_PREBUILT)
181
182 #libflashutils for /system for dumlock
183 include $(CLEAR_VARS)
184 LOCAL_MODULE := libflashutils.so
185 LOCAL_MODULE_TAGS := eng
186 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
187 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
188 LOCAL_SRC_FILES := $(LOCAL_MODULE)
189 include $(BUILD_PREBUILT)
190
191 #libmmcutils for /system for dumlock
192 include $(CLEAR_VARS)
193 LOCAL_MODULE := libmmcutils.so
194 LOCAL_MODULE_TAGS := eng
195 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
196 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
197 LOCAL_SRC_FILES := $(LOCAL_MODULE)
198 include $(BUILD_PREBUILT)
199
200 #libmtdutils for /system for dumlock
201 include $(CLEAR_VARS)
202 LOCAL_MODULE := libmtdutils.so
203 LOCAL_MODULE_TAGS := eng
204 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
205 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
206 LOCAL_SRC_FILES := $(LOCAL_MODULE)
207 include $(BUILD_PREBUILT)
208
209 #HTCDumlock.apk
210 include $(CLEAR_VARS)
211 LOCAL_MODULE := HTCDumlock.apk
212 LOCAL_MODULE_TAGS := eng
213 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
214 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
215 LOCAL_SRC_FILES := $(LOCAL_MODULE)
216 include $(BUILD_PREBUILT)
217endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600218
219ifneq ($(TW_EXCLUDE_SUPERSU), true)
220 #su binary
221 include $(CLEAR_VARS)
222 LOCAL_MODULE := su
223 LOCAL_MODULE_TAGS := eng
224 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600225 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600226 LOCAL_SRC_FILES := $(LOCAL_MODULE)
227 include $(BUILD_PREBUILT)
228
229 #SuperSU special installer APK
230 include $(CLEAR_VARS)
231 LOCAL_MODULE := Superuser.apk
232 LOCAL_MODULE_TAGS := eng
233 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600234 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600235 LOCAL_SRC_FILES := $(LOCAL_MODULE)
236 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600237endif