blob: c152527c8f83964822cd01690f113b3be645b093 [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
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010052ifeq ($(BUILD_ID), GINGERBREAD)
53 TW_NO_EXFAT := true
54endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000055ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050056 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000057 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010058 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050059endif
Dees_Troy51a0e822012-09-05 15:24:24 -040060ifeq ($(TW_INCLUDE_BLOBPACK), true)
61 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
62endif
63ifeq ($(TW_INCLUDE_INJECTTWRP), true)
64 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
65endif
66ifeq ($(TW_INCLUDE_DUMLOCK), true)
67 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
68endif
69ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000070 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040071 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
72endif
73ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000074 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040075 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
76endif
Dees_Troy38bd7602012-09-14 13:33:53 -040077ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
78 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
79endif
Dees_Troy4546fe72013-01-10 14:33:27 +000080ifneq ($(wildcard system/core/libsparse/Android.mk),)
81 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
82endif
Dees_Troy83bd4832013-05-04 12:39:56 +000083ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
84 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
85 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
86endif
Dees_Troy51a0e822012-09-05 15:24:24 -040087
88TWRP_AUTOGEN := $(intermediates)/teamwin
89
90GEN := $(intermediates)/teamwin
91$(GEN): $(RELINK)
92$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
93 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
94 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
95
96LOCAL_GENERATED_SOURCES := $(GEN)
97LOCAL_SRC_FILES := teamwin $(GEN)
98include $(BUILD_PREBUILT)
99
Dees_Troy51a0e822012-09-05 15:24:24 -0400100#fix_permissions
101include $(CLEAR_VARS)
102LOCAL_MODULE := fix_permissions.sh
103LOCAL_MODULE_TAGS := eng
104LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
105LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
106LOCAL_SRC_FILES := $(LOCAL_MODULE)
107include $(BUILD_PREBUILT)
108
Dees_Troy51a0e822012-09-05 15:24:24 -0400109#mke2fs.conf
110include $(CLEAR_VARS)
111LOCAL_MODULE := mke2fs.conf
112LOCAL_MODULE_TAGS := eng
113LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
114LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
115LOCAL_SRC_FILES := $(LOCAL_MODULE)
116include $(BUILD_PREBUILT)
117
118ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
119 #parted
120 include $(CLEAR_VARS)
121 LOCAL_MODULE := parted
122 LOCAL_MODULE_TAGS := eng
123 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
124 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
125 LOCAL_SRC_FILES := $(LOCAL_MODULE)
126 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400127endif
128
Dees_Troy83bd4832013-05-04 12:39:56 +0000129# copy license file for OpenAES
130ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
131 include $(CLEAR_VARS)
132 LOCAL_MODULE := ../openaes/LICENSE
133 LOCAL_MODULE_TAGS := eng
134 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
135 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
136 LOCAL_SRC_FILES := $(LOCAL_MODULE)
137 include $(BUILD_PREBUILT)
138endif
139
Dees_Troy51a0e822012-09-05 15:24:24 -0400140ifeq ($(TW_INCLUDE_DUMLOCK), true)
141 #htcdumlock for /system for dumlock
142 include $(CLEAR_VARS)
143 LOCAL_MODULE := htcdumlocksys
144 LOCAL_MODULE_TAGS := eng
145 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
146 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
147 LOCAL_SRC_FILES := $(LOCAL_MODULE)
148 include $(BUILD_PREBUILT)
149
150 #flash_image for /system for dumlock
151 include $(CLEAR_VARS)
152 LOCAL_MODULE := flash_imagesys
153 LOCAL_MODULE_TAGS := eng
154 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
155 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
156 LOCAL_SRC_FILES := $(LOCAL_MODULE)
157 include $(BUILD_PREBUILT)
158
159 #dump_image for /system for dumlock
160 include $(CLEAR_VARS)
161 LOCAL_MODULE := dump_imagesys
162 LOCAL_MODULE_TAGS := eng
163 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
164 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
165 LOCAL_SRC_FILES := $(LOCAL_MODULE)
166 include $(BUILD_PREBUILT)
167
168 #libbmlutils for /system for dumlock
169 include $(CLEAR_VARS)
170 LOCAL_MODULE := libbmlutils.so
171 LOCAL_MODULE_TAGS := eng
172 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
173 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
174 LOCAL_SRC_FILES := $(LOCAL_MODULE)
175 include $(BUILD_PREBUILT)
176
177 #libflashutils for /system for dumlock
178 include $(CLEAR_VARS)
179 LOCAL_MODULE := libflashutils.so
180 LOCAL_MODULE_TAGS := eng
181 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
182 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
183 LOCAL_SRC_FILES := $(LOCAL_MODULE)
184 include $(BUILD_PREBUILT)
185
186 #libmmcutils for /system for dumlock
187 include $(CLEAR_VARS)
188 LOCAL_MODULE := libmmcutils.so
189 LOCAL_MODULE_TAGS := eng
190 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
191 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
192 LOCAL_SRC_FILES := $(LOCAL_MODULE)
193 include $(BUILD_PREBUILT)
194
195 #libmtdutils for /system for dumlock
196 include $(CLEAR_VARS)
197 LOCAL_MODULE := libmtdutils.so
198 LOCAL_MODULE_TAGS := eng
199 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
200 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
201 LOCAL_SRC_FILES := $(LOCAL_MODULE)
202 include $(BUILD_PREBUILT)
203
204 #HTCDumlock.apk
205 include $(CLEAR_VARS)
206 LOCAL_MODULE := HTCDumlock.apk
207 LOCAL_MODULE_TAGS := eng
208 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
209 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
210 LOCAL_SRC_FILES := $(LOCAL_MODULE)
211 include $(BUILD_PREBUILT)
212endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600213
214ifneq ($(TW_EXCLUDE_SUPERSU), true)
215 #su binary
216 include $(CLEAR_VARS)
217 LOCAL_MODULE := su
218 LOCAL_MODULE_TAGS := eng
219 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600220 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600221 LOCAL_SRC_FILES := $(LOCAL_MODULE)
222 include $(BUILD_PREBUILT)
223
224 #SuperSU special installer APK
225 include $(CLEAR_VARS)
226 LOCAL_MODULE := Superuser.apk
227 LOCAL_MODULE_TAGS := eng
228 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600229 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600230 LOCAL_SRC_FILES := $(LOCAL_MODULE)
231 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600232endif