-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcompile_zlib.sh
54 lines (40 loc) · 871 Bytes
/
compile_zlib.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh -ex
. utilslib.sh
basedir=/src/zlib
baseurl=http://zlib.net
version=1.2.8
tarball=zlib-${version}.tar.gz
directory=zlib-${version}
mkdir -p $basedir
pushd $basedir
utilslib_download $baseurl $tarball
if [ ! -d $directory ]
then
echo unpacking $tarball ...
tar -xvf $tarball
fi
pushd $directory
if [ -f ../../zlib-${version}-mingw.patch ]
then
if [ ! -f mingw.patch.applied ]
then
echo patching ...
patch -p1 < ../../zlib-${version}-mingw.patch
echo applied > mingw.patch.applied
fi
fi
make -fwin32/Makefile.gcc
cp zlib1.dll /bin
cp libz.dll.a /lib
cp libz.a /lib
cp zlib.h /include
cp zconf.h /include
# prepare gather
cp zlib1.dll $prepare_bin
cp ../zlib-${version}.tar.gz $prepare_src
if [ -f ../../zlib-${version}-mingw.patch ]
then
cp ../../zlib-${version}-mingw.patch $prepare_src
fi
popd
popd