Skip to content

Commit

Permalink
contrib: Use the official zlib Win32 build system
Browse files Browse the repository at this point in the history
We don't actually need to patch or use the configure script. By properly
passing the Makefile variables, instead of environement variables,
we can use the official Win32 build system for zlib.

Signed-off-by: Derek Buitenhuis <[email protected]>
Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
dwbuiten authored and jbkempf committed May 20, 2016
1 parent 0fd1caa commit 10afba3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
11 changes: 0 additions & 11 deletions contrib/src/zlib/mingw.patch

This file was deleted.

8 changes: 5 additions & 3 deletions contrib/src/zlib/rules.mak
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ $(TARBALLS)/zlib-$(ZLIB_VERSION).tar.gz:

zlib: zlib-$(ZLIB_VERSION).tar.gz .sum-zlib
$(UNPACK)
ifdef HAVE_WIN32
$(APPLY) $(SRC)/zlib/mingw.patch
endif
$(MOVE)

.zlib: zlib
ifdef HAVE_WIN32
cd $< && $(HOSTVARS) $(MAKE) -fwin32/Makefile.gcc $(HOSTVARS) $(ZLIB_CONFIG_VARS) CFLAGS="$(CFLAGS) $(ZLIB_ECFLAGS)" RC="$(HOST)-windres" LD="$(CC)"
cd $< && $(MAKE) -fwin32/Makefile.gcc install INCLUDE_PATH="$(PREFIX)/include" LIBRARY_PATH="$(PREFIX)/lib" BINARY_PATH="$(PREFIX)/bin"
else
cd $< && $(HOSTVARS) $(ZLIB_CONFIG_VARS) CFLAGS="$(CFLAGS) $(ZLIB_ECFLAGS)" ./configure --prefix=$(PREFIX) --static
cd $< && $(MAKE) install
endif
touch $@

0 comments on commit 10afba3

Please sign in to comment.