summaryrefslogtreecommitdiffstats
path: root/applypatch/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'applypatch/Android.mk')
-rw-r--r--applypatch/Android.mk27
1 files changed, 20 insertions, 7 deletions
diff --git a/applypatch/Android.mk b/applypatch/Android.mk
index 4984093dd..2cce81f6d 100644
--- a/applypatch/Android.mk
+++ b/applypatch/Android.mk
@@ -15,11 +15,22 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY
+
+$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
+ $(if $($(board_define)), \
+ $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
+ ) \
+ )
+
LOCAL_SRC_FILES := applypatch.c bspatch.c freecache.c imgpatch.c utils.c
LOCAL_MODULE := libapplypatch
LOCAL_MODULE_TAGS := eng
-LOCAL_C_INCLUDES += external/bzip2 external/zlib bootable/recovery
-LOCAL_STATIC_LIBRARIES += libmtdutils libmincrypt libbz libz
+LOCAL_C_INCLUDES += \
+ external/bzip2 \
+ external/zlib \
+ $(commands_recovery_local_path)
+LOCAL_STATIC_LIBRARIES += libmtdutils libmincrypttwrp libbz libz
include $(BUILD_STATIC_LIBRARY)
@@ -27,8 +38,9 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := main.c
LOCAL_MODULE := applypatch
-LOCAL_C_INCLUDES += bootable/recovery
-LOCAL_STATIC_LIBRARIES += libapplypatch libmtdutils libmincrypt libbz
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES += $(commands_recovery_local_path)
+LOCAL_STATIC_LIBRARIES += libapplypatch libmtdutils libmincrypttwrp libbz
LOCAL_SHARED_LIBRARIES += libz libcutils libstdc++ libc
include $(BUILD_EXECUTABLE)
@@ -38,9 +50,9 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := main.c
LOCAL_MODULE := applypatch_static
LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_MODULE_TAGS := eng
-LOCAL_C_INCLUDES += bootable/recovery
-LOCAL_STATIC_LIBRARIES += libapplypatch libmtdutils libmincrypt libbz
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_C_INCLUDES += $(commands_recovery_local_path)
+LOCAL_STATIC_LIBRARIES += libapplypatch libmtdutils libmincrypttwrp libbz
LOCAL_STATIC_LIBRARIES += libz libcutils libstdc++ libc
include $(BUILD_EXECUTABLE)
@@ -52,5 +64,6 @@ LOCAL_MODULE := imgdiff
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_C_INCLUDES += external/zlib external/bzip2
LOCAL_STATIC_LIBRARIES += libz libbz
+LOCAL_MODULE_TAGS := eng
include $(BUILD_HOST_EXECUTABLE)