summaryrefslogtreecommitdiff
path: root/contrib/build-openssl-mingw-cross.sh
blob: e2b47d8e26e35d8861e75ce684ec1aaa1a19bdbb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e
OPENSSL=openssl-1.0.1c
BASE=`pwd`

wget http://openssl.org/source/$OPENSSL.tar.gz -O - | tar xz

cd $OPENSSL
if [ -e ../$OPENSSL\-configure.patch ]; then
  patch -p1 < ../$OPENSSL\-configure.patch
fi
./config --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64 --prefix=$BASE/openssl-w64/
make
make install
make clean
./config --cross-compile-prefix=i686-w64-mingw32- shared mingw --prefix=$BASE/openssl-w32/
make
make install
make clean
cd ..
rm -rf $OPENSSL