changeset 3026:1fbef7559a8b

Add zlib native mingw build rule * src/zlib.mk: Added new build rule for MXE_NATIVE_MINGW_BUILD which creates zlib.dll
author John Donoghue <john.donoghue@ieee.org>
date Sat, 08 Jun 2013 16:04:07 -0400
parents dea92be54fc8
children 316b79f1a41b
files src/zlib.mk
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/zlib.mk	Sat Jun 08 14:00:35 2013 -0400
+++ b/src/zlib.mk	Sat Jun 08 16:04:07 2013 -0400
@@ -16,6 +16,18 @@
     head -1
 endef
 
+ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
+define $(PKG)_BUILD
+    cd '$(1)' && ./configure \
+      --prefix='$(HOST_PREFIX)'
+
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install
+
+    if [ "$(BUILD_SHARED)" = yes ]; then \
+      $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CC)' '$(1)/libz.a' --install '$(INSTALL)' --libdir '$(HOST_LIBDIR)' --bindir '$(HOST_BINDIR)'; \
+    fi
+endef
+else
 ifeq ($(MXE_NATIVE_BUILD),yes)
 define $(PKG)_BUILD
     cd '$(1)' && ./configure \
@@ -36,3 +48,4 @@
     fi
 endef
 endif
+endif