blob: 147095100624ca1d2e0e2212b3751212c75155ed [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
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010051ifeq ($(BUILD_ID), GINGERBREAD)
52 TW_NO_EXFAT := true
53endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000054ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050055 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000056 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010057 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050058endif
Dees_Troy51a0e822012-09-05 15:24:24 -040059ifeq ($(TW_INCLUDE_BLOBPACK), true)
60 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
61endif
62ifeq ($(TW_INCLUDE_INJECTTWRP), true)
63 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
64endif
65ifeq ($(TW_INCLUDE_DUMLOCK), true)
66 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
67endif
68ifeq ($(TW_INCLUDE_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000069 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsics.so
Dees_Troy51a0e822012-09-05 15:24:24 -040070 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
71endif
72ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000073 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsjb.so
Dees_Troy51a0e822012-09-05 15:24:24 -040074 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
75endif
Dees_Troy38bd7602012-09-14 13:33:53 -040076ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
77 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
78endif
Dees_Troy4546fe72013-01-10 14:33:27 +000079ifneq ($(wildcard system/core/libsparse/Android.mk),)
80 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
81endif
Dees_Troy83bd4832013-05-04 12:39:56 +000082ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
83 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
84 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
85endif
Dees_Troy51a0e822012-09-05 15:24:24 -040086
87TWRP_AUTOGEN := $(intermediates)/teamwin
88
89GEN := $(intermediates)/teamwin
90$(GEN): $(RELINK)
91$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
92 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
93 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
94
95LOCAL_GENERATED_SOURCES := $(GEN)
96LOCAL_SRC_FILES := teamwin $(GEN)
97include $(BUILD_PREBUILT)
98
Dees_Troy51a0e822012-09-05 15:24:24 -040099#fix_permissions
100include $(CLEAR_VARS)
101LOCAL_MODULE := fix_permissions.sh
102LOCAL_MODULE_TAGS := eng
103LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
104LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
105LOCAL_SRC_FILES := $(LOCAL_MODULE)
106include $(BUILD_PREBUILT)
107
Dees_Troy51a0e822012-09-05 15:24:24 -0400108#mke2fs.conf
109include $(CLEAR_VARS)
110LOCAL_MODULE := mke2fs.conf
111LOCAL_MODULE_TAGS := eng
112LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
113LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
114LOCAL_SRC_FILES := $(LOCAL_MODULE)
115include $(BUILD_PREBUILT)
116
117ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
118 #parted
119 include $(CLEAR_VARS)
120 LOCAL_MODULE := parted
121 LOCAL_MODULE_TAGS := eng
122 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
123 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
124 LOCAL_SRC_FILES := $(LOCAL_MODULE)
125 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400126endif
127
Dees_Troy83bd4832013-05-04 12:39:56 +0000128# copy license file for OpenAES
129ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
130 include $(CLEAR_VARS)
131 LOCAL_MODULE := ../openaes/LICENSE
132 LOCAL_MODULE_TAGS := eng
133 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
134 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
135 LOCAL_SRC_FILES := $(LOCAL_MODULE)
136 include $(BUILD_PREBUILT)
137endif
138
Dees_Troy51a0e822012-09-05 15:24:24 -0400139ifeq ($(TW_INCLUDE_DUMLOCK), true)
140 #htcdumlock for /system for dumlock
141 include $(CLEAR_VARS)
142 LOCAL_MODULE := htcdumlocksys
143 LOCAL_MODULE_TAGS := eng
144 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
145 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
146 LOCAL_SRC_FILES := $(LOCAL_MODULE)
147 include $(BUILD_PREBUILT)
148
149 #flash_image for /system for dumlock
150 include $(CLEAR_VARS)
151 LOCAL_MODULE := flash_imagesys
152 LOCAL_MODULE_TAGS := eng
153 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
154 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
155 LOCAL_SRC_FILES := $(LOCAL_MODULE)
156 include $(BUILD_PREBUILT)
157
158 #dump_image for /system for dumlock
159 include $(CLEAR_VARS)
160 LOCAL_MODULE := dump_imagesys
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 #libbmlutils for /system for dumlock
168 include $(CLEAR_VARS)
169 LOCAL_MODULE := libbmlutils.so
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 #libflashutils for /system for dumlock
177 include $(CLEAR_VARS)
178 LOCAL_MODULE := libflashutils.so
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 #libmmcutils for /system for dumlock
186 include $(CLEAR_VARS)
187 LOCAL_MODULE := libmmcutils.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 #libmtdutils for /system for dumlock
195 include $(CLEAR_VARS)
196 LOCAL_MODULE := libmtdutils.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 #HTCDumlock.apk
204 include $(CLEAR_VARS)
205 LOCAL_MODULE := HTCDumlock.apk
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)
211endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600212
213ifneq ($(TW_EXCLUDE_SUPERSU), true)
214 #su binary
215 include $(CLEAR_VARS)
216 LOCAL_MODULE := su
217 LOCAL_MODULE_TAGS := eng
218 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600219 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600220 LOCAL_SRC_FILES := $(LOCAL_MODULE)
221 include $(BUILD_PREBUILT)
222
223 #SuperSU special installer APK
224 include $(CLEAR_VARS)
225 LOCAL_MODULE := Superuser.apk
226 LOCAL_MODULE_TAGS := eng
227 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600228 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600229 LOCAL_SRC_FILES := $(LOCAL_MODULE)
230 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600231endif