Build a static copy of bootctrl for recovery.

When accesing the boot_control HAL from recovery, we need to use a
static version of it since we can't dynamically load a HAL from
recovery. This patch adds the require bootctrl module that will be used
by update_engine_sideload.

Bug: 27178350
TEST=Built update_engine_sideload with this library.

Change-Id: I8aee9e35436cbe161761fcb79d8a74098ec6501b
diff --git a/Android.mk b/Android.mk
index 3e664cc..cf5e90d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,5 +1,7 @@
 ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),)
 LOCAL_PATH := $(call my-dir)
+
+# HAL Shared library for the target. Used by libhardware.
 include $(CLEAR_VARS)
 LOCAL_C_INCLUDES += hardware/libhardware/include
 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/gpt-utils/inc
@@ -9,4 +11,15 @@
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_MODULE := bootctrl.$(TARGET_BOARD_PLATFORM)
 include $(BUILD_SHARED_LIBRARY)
+
+# Static library for the target. Used by update_engine_sideload from recovery.
+include $(CLEAR_VARS)
+LOCAL_C_INCLUDES += hardware/libhardware/include
+LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/gpt-utils/inc
+LOCAL_CFLAGS += -Wall -Werror
+LOCAL_SHARED_LIBRARIES += liblog librecovery_updater_msm libcutils
+LOCAL_SRC_FILES := boot_control.cpp
+LOCAL_MODULE := bootctrl.$(TARGET_BOARD_PLATFORM)
+include $(BUILD_STATIC_LIBRARY)
+
 endif