New upstream version 0.3.7
[anytun.git] / contrib / build-openssl-mingw-cross.sh
1 #!/bin/sh
2 set -e
3 OPENSSL=openssl-1.0.2h
4 BASE=`pwd`
5
6 wget http://openssl.org/source/$OPENSSL.tar.gz -O - | tar xz
7
8 cd $OPENSSL
9 if [ -e ../$OPENSSL\-configure.patch ]; then
10   patch -p1 < ../$OPENSSL\-configure.patch
11 fi
12 ./config --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64 --prefix=$BASE/openssl-w64/
13 make
14 make install
15 make clean
16 ./config --cross-compile-prefix=i686-w64-mingw32- shared mingw --prefix=$BASE/openssl-w32/
17 make
18 make install
19 make clean
20 cd ..
21 rm -rf $OPENSSL