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