Fix spurious build errors.

In certain configurations - such as when manually deleting the out/
directory - the build can fail because we're trying to create a symlink
in a non-existent directory. Fix this by ensuring the directory exists
before adding the symlink.

Test: No more spurious errors when building.
Bug: None.
Change-Id: Ia5004d1395197409a26aef9536907f47305c2fff
diff --git a/Android.mk b/Android.mk
index 2ed7228..2ad3270 100644
--- a/Android.mk
+++ b/Android.mk
@@ -159,8 +159,9 @@
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/libavb
 LOCAL_SHARED_LIBRARIES := libcutils libavb
 LOCAL_STATIC_LIBRARIES := libfs_mgr
-LOCAL_POST_INSTALL_CMD := $(hide) ln -sf bootctrl.avb.so \
-    $(TARGET_OUT_SHARED_LIBRARIES)/hw/bootctrl.default.so
+LOCAL_POST_INSTALL_CMD := \
+	$(hide) mkdir -p $(TARGET_OUT_SHARED_LIBRARIES)/hw && \
+	ln -sf bootctrl.avb.so $(TARGET_OUT_SHARED_LIBRARIES)/hw/bootctrl.default.so
 include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)