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