blob: 1c5872ef8752b438c2ad78aba9c957a083563373 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
2
3ifneq ($(TARGET_SIMULATOR),true)
Dees_Troy51a0e822012-09-05 15:24:24 -04004
5include $(CLEAR_VARS)
6LOCAL_SRC_FILES := flashutils.c
7LOCAL_MODULE := libflashutils
8LOCAL_MODULE_TAGS := optional
Matt Mower55c75ca2014-08-31 11:30:15 -05009LOCAL_C_INCLUDES += $(commands_recovery_local_path)
Dees_Troy51a0e822012-09-05 15:24:24 -040010LOCAL_STATIC_LIBRARIES := libmmcutils libmtdutils libbmlutils libcrecovery
11
12BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY
13
14$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
15 $(if $($(board_define)), \
16 $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
17 ) \
18 )
19
20include $(BUILD_STATIC_LIBRARY)
21
22include $(CLEAR_VARS)
23LOCAL_SRC_FILES := flash_image.c
Dees_Troy51a0e822012-09-05 15:24:24 -040024LOCAL_MODULE := libflash_image
25LOCAL_MODULE_TAGS := optional
26LOCAL_CFLAGS += -Dmain=flash_image_main
27include $(BUILD_STATIC_LIBRARY)
28
29include $(CLEAR_VARS)
30LOCAL_SRC_FILES := dump_image.c
31LOCAL_MODULE := libdump_image
32LOCAL_MODULE_TAGS := optional
33LOCAL_CFLAGS += -Dmain=dump_image_main
34include $(BUILD_STATIC_LIBRARY)
35
36include $(CLEAR_VARS)
37LOCAL_SRC_FILES := erase_image.c
38LOCAL_MODULE := liberase_image
39LOCAL_MODULE_TAGS := optional
40LOCAL_CFLAGS += -Dmain=erase_image_main
41include $(BUILD_STATIC_LIBRARY)
42
43include $(CLEAR_VARS)
44LOCAL_SRC_FILES := dump_image.c
45LOCAL_MODULE := utility_dump_image
46LOCAL_MODULE_TAGS := optional
47LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
48LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
49LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
50LOCAL_MODULE_STEM := dump_image
51LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcutils libc
52LOCAL_FORCE_STATIC_EXECUTABLE := true
53include $(BUILD_EXECUTABLE)
54
55include $(CLEAR_VARS)
56LOCAL_SRC_FILES := flash_image.c
57LOCAL_MODULE := utility_flash_image
58LOCAL_MODULE_TAGS := optional
59LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
60LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
61LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
62LOCAL_MODULE_STEM := flash_image
63LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcutils libc
64LOCAL_FORCE_STATIC_EXECUTABLE := true
65include $(BUILD_EXECUTABLE)
66
67include $(CLEAR_VARS)
68LOCAL_SRC_FILES := erase_image.c
69LOCAL_MODULE := utility_erase_image
70LOCAL_MODULE_TAGS := optional
71LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
72LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
73LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
74LOCAL_MODULE_STEM := erase_image
75LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcutils libc
76LOCAL_FORCE_STATIC_EXECUTABLE := true
77include $(BUILD_EXECUTABLE)
78
79#Added for dynamic building for TWRP:
80
81include $(CLEAR_VARS)
82LOCAL_SRC_FILES := flashutils.c
83LOCAL_MODULE := libflashutils
bigbiffd58ba182020-03-23 10:02:29 -040084LOCAL_MODULE_TAGS := optional
Matt Mower55c75ca2014-08-31 11:30:15 -050085LOCAL_C_INCLUDES += $(commands_recovery_local_path)
Ethan Yonker03ea9782014-11-17 09:36:46 -060086LOCAL_SHARED_LIBRARIES := libc libmtdutils libmmcutils libbmlutils libcrecovery
Dees_Troy51a0e822012-09-05 15:24:24 -040087
88BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY
89
90$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
91 $(if $($(board_define)), \
92 $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
93 ) \
94 )
95
96include $(BUILD_SHARED_LIBRARY)
97
98include $(CLEAR_VARS)
99LOCAL_MODULE := flash_image
bigbiffd58ba182020-03-23 10:02:29 -0400100LOCAL_MODULE_TAGS := optional
Dees_Troy51a0e822012-09-05 15:24:24 -0400101LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
102LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
103LOCAL_SRC_FILES := flash_image.c
Ethan Yonker03ea9782014-11-17 09:36:46 -0600104LOCAL_SHARED_LIBRARIES := libmtdutils libflashutils libmmcutils libbmlutils libcutils libc
Dees_Troy51a0e822012-09-05 15:24:24 -0400105include $(BUILD_EXECUTABLE)
106
107include $(CLEAR_VARS)
108LOCAL_MODULE := dump_image
bigbiffd58ba182020-03-23 10:02:29 -0400109LOCAL_MODULE_TAGS := optional
Dees_Troy51a0e822012-09-05 15:24:24 -0400110LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
111LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
112LOCAL_SRC_FILES := dump_image.c
Ethan Yonker03ea9782014-11-17 09:36:46 -0600113LOCAL_SHARED_LIBRARIES := libmtdutils libflashutils libmmcutils libbmlutils libcutils libc
Dees_Troy51a0e822012-09-05 15:24:24 -0400114include $(BUILD_EXECUTABLE)
115
116include $(CLEAR_VARS)
117LOCAL_MODULE := erase_image
bigbiffd58ba182020-03-23 10:02:29 -0400118LOCAL_MODULE_TAGS := optional
Dees_Troy51a0e822012-09-05 15:24:24 -0400119LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
120LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
121LOCAL_SRC_FILES := erase_image.c
Ethan Yonker03ea9782014-11-17 09:36:46 -0600122LOCAL_SHARED_LIBRARIES := libmtdutils libflashutils libmmcutils libbmlutils libcutils libc
Dees_Troy51a0e822012-09-05 15:24:24 -0400123include $(BUILD_EXECUTABLE)
124
Dees_Troy51a0e822012-09-05 15:24:24 -0400125endif # !TARGET_SIMULATOR