Add a README
[mingw-xscripts.git] / misc / install-zlib-1.2.3.sh
blob7bc34aa10d9805d39691e63fd1f6e5f8d2f5b537
1 #!/bin/sh
3 # This script is based on instructions from USAGE.txt in the official
4 # zlib DLL distribution. It suggests to use the name "zdll" for the
5 # import library's base name, however, using "z.dll" seems to be more in
6 # line with MinGW's naming conventions and does not require build
7 # scripts to be modified to link "-lzdll" instead of "-lz".
9 source mingw-environment.sh
11 set -x
13 PREFIX="$MINGW_PREFIX"
15 dll=zlib1.dll
16 def=lib/zlib.def
17 imp=lib/libz.dll.a
19 $TARGET-dlltool -D $(basename $dll) -d $def -l $imp
21 install -d $PREFIX/include $PREFIX/lib $PREFIX/bin
22 install include/zlib.h include/zconf.h $PREFIX/include
23 install $imp $PREFIX/lib
24 install $dll $PREFIX/bin