blob: 33f32d6b0b70c42e6725f558cfb67a6ea1bdd70c [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
9LOCAL_C_INCLUDES += bootable/recovery
10LOCAL_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
24LOCAL_MODULE := flash_image
25LOCAL_MODULE_TAGS := optional
26LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery
27LOCAL_SHARED_LIBRARIES := libcutils libc
28include $(BUILD_EXECUTABLE)
29
30include $(CLEAR_VARS)
31LOCAL_SRC_FILES := dump_image.c
32LOCAL_MODULE := dump_image
33LOCAL_MODULE_TAGS := optional
34LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery
35LOCAL_SHARED_LIBRARIES := libcutils libc
36include $(BUILD_EXECUTABLE)
37
38include $(CLEAR_VARS)
39LOCAL_SRC_FILES := erase_image.c
40LOCAL_MODULE := erase_image
41LOCAL_MODULE_TAGS := optional
42LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery
43LOCAL_SHARED_LIBRARIES := libcutils libc
44include $(BUILD_EXECUTABLE)
45
46ALL_DEFAULT_INSTALLED_MODULES += $(addprefix $(TARGET_OUT)/bin/, flash_image dump_image erase_image)
47
48include $(CLEAR_VARS)
49LOCAL_SRC_FILES := flash_image.c
50LOCAL_MODULE := libflash_image
51LOCAL_MODULE_TAGS := optional
52LOCAL_CFLAGS += -Dmain=flash_image_main
53include $(BUILD_STATIC_LIBRARY)
54
55include $(CLEAR_VARS)
56LOCAL_SRC_FILES := dump_image.c
57LOCAL_MODULE := libdump_image
58LOCAL_MODULE_TAGS := optional
59LOCAL_CFLAGS += -Dmain=dump_image_main
60include $(BUILD_STATIC_LIBRARY)
61
62include $(CLEAR_VARS)
63LOCAL_SRC_FILES := erase_image.c
64LOCAL_MODULE := liberase_image
65LOCAL_MODULE_TAGS := optional
66LOCAL_CFLAGS += -Dmain=erase_image_main
67include $(BUILD_STATIC_LIBRARY)
68
69include $(CLEAR_VARS)
70LOCAL_SRC_FILES := dump_image.c
71LOCAL_MODULE := utility_dump_image
72LOCAL_MODULE_TAGS := optional
73LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
74LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
75LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
76LOCAL_MODULE_STEM := dump_image
77LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcutils libc
78LOCAL_FORCE_STATIC_EXECUTABLE := true
79include $(BUILD_EXECUTABLE)
80
81include $(CLEAR_VARS)
82LOCAL_SRC_FILES := flash_image.c
83LOCAL_MODULE := utility_flash_image
84LOCAL_MODULE_TAGS := optional
85LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
86LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
87LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
88LOCAL_MODULE_STEM := flash_image
89LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcutils libc
90LOCAL_FORCE_STATIC_EXECUTABLE := true
91include $(BUILD_EXECUTABLE)
92
93include $(CLEAR_VARS)
94LOCAL_SRC_FILES := erase_image.c
95LOCAL_MODULE := utility_erase_image
96LOCAL_MODULE_TAGS := optional
97LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
98LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
99LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
100LOCAL_MODULE_STEM := erase_image
101LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcutils libc
102LOCAL_FORCE_STATIC_EXECUTABLE := true
103include $(BUILD_EXECUTABLE)
104
105#Added for dynamic building for TWRP:
106
107include $(CLEAR_VARS)
108LOCAL_SRC_FILES := flashutils.c
109LOCAL_MODULE := libflashutils
110LOCAL_MODULE_TAGS := eng
111LOCAL_C_INCLUDES += bootable/recovery
112LOCAL_SHARED_LIBRARIES := libc libmmcutils libbmlutils
113LOCAL_STATIC_LIBRARIES := libmtdutils
114
115BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY
116
117$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
118 $(if $($(board_define)), \
119 $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
120 ) \
121 )
122
123include $(BUILD_SHARED_LIBRARY)
124
125include $(CLEAR_VARS)
126LOCAL_MODULE := flash_image
127LOCAL_MODULE_TAGS := eng
128LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
129LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
130LOCAL_SRC_FILES := flash_image.c
131LOCAL_SHARED_LIBRARIES := libflashutils libmmcutils libbmlutils libcutils libc
132LOCAL_STATIC_LIBRARIES := libmtdutils
133include $(BUILD_EXECUTABLE)
134
135include $(CLEAR_VARS)
136LOCAL_MODULE := dump_image
137LOCAL_MODULE_TAGS := eng
138LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
139LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
140LOCAL_SRC_FILES := dump_image.c
141LOCAL_SHARED_LIBRARIES := libflashutils libmmcutils libbmlutils libcutils libc
142LOCAL_STATIC_LIBRARIES := libmtdutils
143include $(BUILD_EXECUTABLE)
144
145include $(CLEAR_VARS)
146LOCAL_MODULE := erase_image
147LOCAL_MODULE_TAGS := eng
148LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
149LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
150LOCAL_SRC_FILES := erase_image.c
151LOCAL_SHARED_LIBRARIES := libflashutils libmmcutils libbmlutils libcutils libc
152LOCAL_STATIC_LIBRARIES := libmtdutils
153include $(BUILD_EXECUTABLE)
154
Dees_Troy51a0e822012-09-05 15:24:24 -0400155endif # !TARGET_SIMULATOR