build zlib and minigzip

Build zlib as a device static library (so we can use it in recovery)
and as a host static library (so we can use it in OTA-building
tools).  Also build minigzip as a host executable, so we can use it in
the build in place of gzip.
diff --git a/Android.mk b/Android.mk
index 4ea9613..657e3a6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -5,7 +5,7 @@
 # than the thumb one...
 LOCAL_ARM_MODE := arm
 
-LOCAL_SRC_FILES:= \
+zlib_files := \
 	adler32.c \
 	compress.c \
 	crc32.c \
@@ -19,12 +19,27 @@
 	inftrees.c \
 	inffast.c
 
-LOCAL_MODULE:= libz
-
-LOCAL_CFLAGS+= -O3 -DUSE_MMAP
-
+LOCAL_MODULE := libz
+LOCAL_CFLAGS += -O3 -DUSE_MMAP
+LOCAL_SRC_FILES := $(zlib_files)
 include $(BUILD_SHARED_LIBRARY)
 
+include $(CLEAR_VARS)
+
+LOCAL_ARM_MODE := arm
+LOCAL_MODULE := libz
+LOCAL_CFLAGS += -O3 -DUSE_MMAP
+LOCAL_SRC_FILES := $(zlib_files)
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_ARM_MODE := arm
+LOCAL_MODULE := libz
+LOCAL_CFLAGS += -O3 -DUSE_MMAP
+LOCAL_SRC_FILES := $(zlib_files)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
 
 
 unzip_files := \
@@ -57,3 +72,15 @@
 LOCAL_SHARED_LIBRARIES := libz
 
 include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=        \
+	minigzip.c
+
+LOCAL_MODULE:= minigzip
+
+LOCAL_STATIC_LIBRARIES := libz
+
+include $(BUILD_HOST_EXECUTABLE)
+