blob: 3209cb0c56420b1bb2b1fe857ce6f50aae59ab10 [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
84LOCAL_MODULE_TAGS := eng
Matt Mower55c75ca2014-08-31 11:30:15 -050085LOCAL_C_INCLUDES += $(commands_recovery_local_path)
Dees_Troy51a0e822012-09-05 15:24:24 -040086LOCAL_SHARED_LIBRARIES := libc libmmcutils libbmlutils
87LOCAL_STATIC_LIBRARIES := libmtdutils
88
89BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY
90
91$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
92 $(if $($(board_define)), \
93 $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
94 ) \
95 )
96
97include $(BUILD_SHARED_LIBRARY)
98
99include $(CLEAR_VARS)
100LOCAL_MODULE := flash_image
101LOCAL_MODULE_TAGS := eng
102LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
103LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
104LOCAL_SRC_FILES := flash_image.c
105LOCAL_SHARED_LIBRARIES := libflashutils libmmcutils libbmlutils libcutils libc
106LOCAL_STATIC_LIBRARIES := libmtdutils
107include $(BUILD_EXECUTABLE)
108
109include $(CLEAR_VARS)
110LOCAL_MODULE := dump_image
111LOCAL_MODULE_TAGS := eng
112LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
113LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
114LOCAL_SRC_FILES := dump_image.c
115LOCAL_SHARED_LIBRARIES := libflashutils libmmcutils libbmlutils libcutils libc
116LOCAL_STATIC_LIBRARIES := libmtdutils
117include $(BUILD_EXECUTABLE)
118
119include $(CLEAR_VARS)
120LOCAL_MODULE := erase_image
121LOCAL_MODULE_TAGS := eng
122LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
123LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
124LOCAL_SRC_FILES := erase_image.c
125LOCAL_SHARED_LIBRARIES := libflashutils libmmcutils libbmlutils libcutils libc
126LOCAL_STATIC_LIBRARIES := libmtdutils
127include $(BUILD_EXECUTABLE)
128
Dees_Troy51a0e822012-09-05 15:24:24 -0400129endif # !TARGET_SIMULATOR