blob: 00a86630fa6caef569505748469fb4765ef09c87 [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_Troy51a0e822012-09-05 15:24:24 -040082
83TWRP_AUTOGEN := $(intermediates)/teamwin
84
85GEN := $(intermediates)/teamwin
86$(GEN): $(RELINK)
87$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
88 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
89 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
90
91LOCAL_GENERATED_SOURCES := $(GEN)
92LOCAL_SRC_FILES := teamwin $(GEN)
93include $(BUILD_PREBUILT)
94
Dees_Troy51a0e822012-09-05 15:24:24 -040095#fix_permissions
96include $(CLEAR_VARS)
97LOCAL_MODULE := fix_permissions.sh
98LOCAL_MODULE_TAGS := eng
99LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
100LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
101LOCAL_SRC_FILES := $(LOCAL_MODULE)
102include $(BUILD_PREBUILT)
103
Dees_Troy51a0e822012-09-05 15:24:24 -0400104#mke2fs.conf
105include $(CLEAR_VARS)
106LOCAL_MODULE := mke2fs.conf
107LOCAL_MODULE_TAGS := eng
108LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
109LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
110LOCAL_SRC_FILES := $(LOCAL_MODULE)
111include $(BUILD_PREBUILT)
112
113ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
114 #parted
115 include $(CLEAR_VARS)
116 LOCAL_MODULE := parted
117 LOCAL_MODULE_TAGS := eng
118 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
119 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
120 LOCAL_SRC_FILES := $(LOCAL_MODULE)
121 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400122endif
123
124ifeq ($(TW_INCLUDE_DUMLOCK), true)
125 #htcdumlock for /system for dumlock
126 include $(CLEAR_VARS)
127 LOCAL_MODULE := htcdumlocksys
128 LOCAL_MODULE_TAGS := eng
129 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
130 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
131 LOCAL_SRC_FILES := $(LOCAL_MODULE)
132 include $(BUILD_PREBUILT)
133
134 #flash_image for /system for dumlock
135 include $(CLEAR_VARS)
136 LOCAL_MODULE := flash_imagesys
137 LOCAL_MODULE_TAGS := eng
138 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
139 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
140 LOCAL_SRC_FILES := $(LOCAL_MODULE)
141 include $(BUILD_PREBUILT)
142
143 #dump_image for /system for dumlock
144 include $(CLEAR_VARS)
145 LOCAL_MODULE := dump_imagesys
146 LOCAL_MODULE_TAGS := eng
147 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
148 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
149 LOCAL_SRC_FILES := $(LOCAL_MODULE)
150 include $(BUILD_PREBUILT)
151
152 #libbmlutils for /system for dumlock
153 include $(CLEAR_VARS)
154 LOCAL_MODULE := libbmlutils.so
155 LOCAL_MODULE_TAGS := eng
156 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
157 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
158 LOCAL_SRC_FILES := $(LOCAL_MODULE)
159 include $(BUILD_PREBUILT)
160
161 #libflashutils for /system for dumlock
162 include $(CLEAR_VARS)
163 LOCAL_MODULE := libflashutils.so
164 LOCAL_MODULE_TAGS := eng
165 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
166 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
167 LOCAL_SRC_FILES := $(LOCAL_MODULE)
168 include $(BUILD_PREBUILT)
169
170 #libmmcutils for /system for dumlock
171 include $(CLEAR_VARS)
172 LOCAL_MODULE := libmmcutils.so
173 LOCAL_MODULE_TAGS := eng
174 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
175 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
176 LOCAL_SRC_FILES := $(LOCAL_MODULE)
177 include $(BUILD_PREBUILT)
178
179 #libmtdutils for /system for dumlock
180 include $(CLEAR_VARS)
181 LOCAL_MODULE := libmtdutils.so
182 LOCAL_MODULE_TAGS := eng
183 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
184 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
185 LOCAL_SRC_FILES := $(LOCAL_MODULE)
186 include $(BUILD_PREBUILT)
187
188 #HTCDumlock.apk
189 include $(CLEAR_VARS)
190 LOCAL_MODULE := HTCDumlock.apk
191 LOCAL_MODULE_TAGS := eng
192 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
193 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
194 LOCAL_SRC_FILES := $(LOCAL_MODULE)
195 include $(BUILD_PREBUILT)
196endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600197
198ifneq ($(TW_EXCLUDE_SUPERSU), true)
199 #su binary
200 include $(CLEAR_VARS)
201 LOCAL_MODULE := su
202 LOCAL_MODULE_TAGS := eng
203 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600204 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600205 LOCAL_SRC_FILES := $(LOCAL_MODULE)
206 include $(BUILD_PREBUILT)
207
208 #SuperSU special installer APK
209 include $(CLEAR_VARS)
210 LOCAL_MODULE := Superuser.apk
211 LOCAL_MODULE_TAGS := eng
212 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600213 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600214 LOCAL_SRC_FILES := $(LOCAL_MODULE)
215 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600216endif