blob: f0c2c264a12d4d897fa1c1e959302549e4adb208 [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
38#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
39#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050040RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
Dees_Troy51a0e822012-09-05 15:24:24 -040041RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
42RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
43RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
44RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Dees_Troyb9d88ac2012-09-14 14:34:19 -040045RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so
Dees_Troy43d8b002012-09-17 16:00:01 -040046RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050047
Dees_Troyb05ddee2013-01-28 20:24:50 +000048ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050049 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000050 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
bigbiff bigbiff9c754052013-01-09 09:09:08 -050051endif
Dees_Troy51a0e822012-09-05 15:24:24 -040052ifeq ($(TW_INCLUDE_BLOBPACK), true)
53 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
54endif
55ifeq ($(TW_INCLUDE_INJECTTWRP), true)
56 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
57endif
58ifeq ($(TW_INCLUDE_DUMLOCK), true)
59 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
60endif
61ifeq ($(TW_INCLUDE_CRYPTO), true)
62 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
63endif
64ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
65 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
66endif
Dees_Troy38bd7602012-09-14 13:33:53 -040067ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
68 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
69endif
Dees_Troy4546fe72013-01-10 14:33:27 +000070ifneq ($(wildcard system/core/libsparse/Android.mk),)
71 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
72endif
Dees_Troy51a0e822012-09-05 15:24:24 -040073
74TWRP_AUTOGEN := $(intermediates)/teamwin
75
76GEN := $(intermediates)/teamwin
77$(GEN): $(RELINK)
78$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
79 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
80 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
81
82LOCAL_GENERATED_SOURCES := $(GEN)
83LOCAL_SRC_FILES := teamwin $(GEN)
84include $(BUILD_PREBUILT)
85
Dees_Troy51a0e822012-09-05 15:24:24 -040086#fix_permissions
87include $(CLEAR_VARS)
88LOCAL_MODULE := fix_permissions.sh
89LOCAL_MODULE_TAGS := eng
90LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
91LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
92LOCAL_SRC_FILES := $(LOCAL_MODULE)
93include $(BUILD_PREBUILT)
94
Dees_Troy51a0e822012-09-05 15:24:24 -040095#mke2fs.conf
96include $(CLEAR_VARS)
97LOCAL_MODULE := mke2fs.conf
98LOCAL_MODULE_TAGS := eng
99LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
100LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
101LOCAL_SRC_FILES := $(LOCAL_MODULE)
102include $(BUILD_PREBUILT)
103
104ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
105 #parted
106 include $(CLEAR_VARS)
107 LOCAL_MODULE := parted
108 LOCAL_MODULE_TAGS := eng
109 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
110 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
111 LOCAL_SRC_FILES := $(LOCAL_MODULE)
112 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400113endif
114
115ifeq ($(TW_INCLUDE_DUMLOCK), true)
116 #htcdumlock for /system for dumlock
117 include $(CLEAR_VARS)
118 LOCAL_MODULE := htcdumlocksys
119 LOCAL_MODULE_TAGS := eng
120 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
121 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
122 LOCAL_SRC_FILES := $(LOCAL_MODULE)
123 include $(BUILD_PREBUILT)
124
125 #flash_image for /system for dumlock
126 include $(CLEAR_VARS)
127 LOCAL_MODULE := flash_imagesys
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 #dump_image for /system for dumlock
135 include $(CLEAR_VARS)
136 LOCAL_MODULE := dump_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 #libbmlutils for /system for dumlock
144 include $(CLEAR_VARS)
145 LOCAL_MODULE := libbmlutils.so
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 #libflashutils for /system for dumlock
153 include $(CLEAR_VARS)
154 LOCAL_MODULE := libflashutils.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 #libmmcutils for /system for dumlock
162 include $(CLEAR_VARS)
163 LOCAL_MODULE := libmmcutils.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 #libmtdutils for /system for dumlock
171 include $(CLEAR_VARS)
172 LOCAL_MODULE := libmtdutils.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 #HTCDumlock.apk
180 include $(CLEAR_VARS)
181 LOCAL_MODULE := HTCDumlock.apk
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)
187endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600188
189ifneq ($(TW_EXCLUDE_SUPERSU), true)
190 #su binary
191 include $(CLEAR_VARS)
192 LOCAL_MODULE := su
193 LOCAL_MODULE_TAGS := eng
194 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
195 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/supersu
196 LOCAL_SRC_FILES := $(LOCAL_MODULE)
197 include $(BUILD_PREBUILT)
198
199 #SuperSU special installer APK
200 include $(CLEAR_VARS)
201 LOCAL_MODULE := Superuser.apk
202 LOCAL_MODULE_TAGS := eng
203 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
204 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/supersu
205 LOCAL_SRC_FILES := $(LOCAL_MODULE)
206 include $(BUILD_PREBUILT)
207endif