blob: dec000f320f2ba90beed0e07f1d063fbcca9ddf5 [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
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010041RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040042RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
43RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
44RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
45RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Dees_Troyb9d88ac2012-09-14 14:34:19 -040046RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypt.so
Dees_Troy43d8b002012-09-17 16:00:01 -040047RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010048ifeq ($(BUILD_ID), GINGERBREAD)
49 TW_NO_EXFAT := true
50endif
Dees_Troyb05ddee2013-01-28 20:24:50 +000051ifneq ($(TW_NO_EXFAT), true)
bigbiff bigbiff9c754052013-01-09 09:09:08 -050052 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
Dees_Troyb05ddee2013-01-28 20:24:50 +000053 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010054 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050055endif
Dees_Troy51a0e822012-09-05 15:24:24 -040056ifeq ($(TW_INCLUDE_BLOBPACK), true)
57 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
58endif
59ifeq ($(TW_INCLUDE_INJECTTWRP), true)
60 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
61endif
62ifeq ($(TW_INCLUDE_DUMLOCK), true)
63 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
64endif
65ifeq ($(TW_INCLUDE_CRYPTO), true)
66 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
67endif
68ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
69 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
70endif
Dees_Troy38bd7602012-09-14 13:33:53 -040071ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
72 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
73endif
Dees_Troy4546fe72013-01-10 14:33:27 +000074ifneq ($(wildcard system/core/libsparse/Android.mk),)
75 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
76endif
Dees_Troy51a0e822012-09-05 15:24:24 -040077
78TWRP_AUTOGEN := $(intermediates)/teamwin
79
80GEN := $(intermediates)/teamwin
81$(GEN): $(RELINK)
82$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
83 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
84 $(RELINK) $(call intermediates-dir-for,EXECUTABLES,recovery) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
85
86LOCAL_GENERATED_SOURCES := $(GEN)
87LOCAL_SRC_FILES := teamwin $(GEN)
88include $(BUILD_PREBUILT)
89
Dees_Troy51a0e822012-09-05 15:24:24 -040090#fix_permissions
91include $(CLEAR_VARS)
92LOCAL_MODULE := fix_permissions.sh
93LOCAL_MODULE_TAGS := eng
94LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
95LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
96LOCAL_SRC_FILES := $(LOCAL_MODULE)
97include $(BUILD_PREBUILT)
98
Dees_Troy51a0e822012-09-05 15:24:24 -040099#mke2fs.conf
100include $(CLEAR_VARS)
101LOCAL_MODULE := mke2fs.conf
102LOCAL_MODULE_TAGS := eng
103LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
104LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
105LOCAL_SRC_FILES := $(LOCAL_MODULE)
106include $(BUILD_PREBUILT)
107
108ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
109 #parted
110 include $(CLEAR_VARS)
111 LOCAL_MODULE := parted
112 LOCAL_MODULE_TAGS := eng
113 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
114 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
115 LOCAL_SRC_FILES := $(LOCAL_MODULE)
116 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400117endif
118
119ifeq ($(TW_INCLUDE_DUMLOCK), true)
120 #htcdumlock for /system for dumlock
121 include $(CLEAR_VARS)
122 LOCAL_MODULE := htcdumlocksys
123 LOCAL_MODULE_TAGS := eng
124 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
125 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
126 LOCAL_SRC_FILES := $(LOCAL_MODULE)
127 include $(BUILD_PREBUILT)
128
129 #flash_image for /system for dumlock
130 include $(CLEAR_VARS)
131 LOCAL_MODULE := flash_imagesys
132 LOCAL_MODULE_TAGS := eng
133 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
134 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
135 LOCAL_SRC_FILES := $(LOCAL_MODULE)
136 include $(BUILD_PREBUILT)
137
138 #dump_image for /system for dumlock
139 include $(CLEAR_VARS)
140 LOCAL_MODULE := dump_imagesys
141 LOCAL_MODULE_TAGS := eng
142 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
143 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
144 LOCAL_SRC_FILES := $(LOCAL_MODULE)
145 include $(BUILD_PREBUILT)
146
147 #libbmlutils for /system for dumlock
148 include $(CLEAR_VARS)
149 LOCAL_MODULE := libbmlutils.so
150 LOCAL_MODULE_TAGS := eng
151 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
152 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
153 LOCAL_SRC_FILES := $(LOCAL_MODULE)
154 include $(BUILD_PREBUILT)
155
156 #libflashutils for /system for dumlock
157 include $(CLEAR_VARS)
158 LOCAL_MODULE := libflashutils.so
159 LOCAL_MODULE_TAGS := eng
160 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
161 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
162 LOCAL_SRC_FILES := $(LOCAL_MODULE)
163 include $(BUILD_PREBUILT)
164
165 #libmmcutils for /system for dumlock
166 include $(CLEAR_VARS)
167 LOCAL_MODULE := libmmcutils.so
168 LOCAL_MODULE_TAGS := eng
169 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
170 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
171 LOCAL_SRC_FILES := $(LOCAL_MODULE)
172 include $(BUILD_PREBUILT)
173
174 #libmtdutils for /system for dumlock
175 include $(CLEAR_VARS)
176 LOCAL_MODULE := libmtdutils.so
177 LOCAL_MODULE_TAGS := eng
178 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
179 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
180 LOCAL_SRC_FILES := $(LOCAL_MODULE)
181 include $(BUILD_PREBUILT)
182
183 #HTCDumlock.apk
184 include $(CLEAR_VARS)
185 LOCAL_MODULE := HTCDumlock.apk
186 LOCAL_MODULE_TAGS := eng
187 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
188 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/htcd
189 LOCAL_SRC_FILES := $(LOCAL_MODULE)
190 include $(BUILD_PREBUILT)
191endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600192
193ifneq ($(TW_EXCLUDE_SUPERSU), true)
194 #su binary
195 include $(CLEAR_VARS)
196 LOCAL_MODULE := su
197 LOCAL_MODULE_TAGS := eng
198 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600199 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600200 LOCAL_SRC_FILES := $(LOCAL_MODULE)
201 include $(BUILD_PREBUILT)
202
203 #SuperSU special installer APK
204 include $(CLEAR_VARS)
205 LOCAL_MODULE := Superuser.apk
206 LOCAL_MODULE_TAGS := eng
207 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600208 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600209 LOCAL_SRC_FILES := $(LOCAL_MODULE)
210 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600211endif