Added BUILD_HOST_static to build statically linked executable/shared-lib
Statically linked executable/shared-lib (eg. SDK tools) are useful
in sandboxed environment.
In BUILD_HOST_static zipalign needs -lpthread indirectly:
zipalign->libutils.a->liblog.a->logd_write.c->pthread
Change-Id: I8fa91a937b728ccdf942c4ba199efb1e2e49da3d
diff --git a/tools/zipalign/Android.mk b/tools/zipalign/Android.mk
index 9763bd2..089c68b 100644
--- a/tools/zipalign/Android.mk
+++ b/tools/zipalign/Android.mk
@@ -28,6 +28,10 @@
LOCAL_LDLIBS += -lz
endif
+ifneq ($(strip $(BUILD_HOST_static)),)
+LOCAL_LDLIBS += -lpthread
+endif # BUILD_HOST_static
+
LOCAL_MODULE := zipalign
include $(BUILD_HOST_EXECUTABLE)