DO NOT MERGE: Build a static bspatch for recovery.

The recovery image must include only static binary. This patch compiles
bspatch as a static binary and installs it in recovery so it can be used
by update_engine_sideload.

Bug: 27178350
TEST=`mmma external/bsdiff` builds the recovery static file.

(cherry picked from commit 4bbeb1a12ddb13f9126015b2a51ae5b9394bcf9b)

Change-Id: I25bd1925b7b04434542a29cd23c2542607b46362
diff --git a/Android.mk b/Android.mk
index 57d9e8d..4341eef 100644
--- a/Android.mk
+++ b/Android.mk
@@ -62,6 +62,20 @@
 LOCAL_STATIC_LIBRARIES := $(bsdiff_common_static_libs)
 include $(BUILD_EXECUTABLE)
 
+# bspatch used in recovery by update_engine_sideload.
+include $(CLEAR_VARS)
+LOCAL_MODULE := bspatch_recovery
+LOCAL_MODULE_STEM := bspatch
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_SRC_FILES := \
+    $(bspatch_src_files) \
+    bspatch_main.cc
+LOCAL_CFLAGS := $(bsdiff_common_cflags)
+LOCAL_STATIC_LIBRARIES := \
+    $(bsdiff_common_static_libs)
+include $(BUILD_EXECUTABLE)
 
 # Host executables.