aboutsummaryrefslogtreecommitdiff
path: root/dist-win.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dist-win.sh')
-rwxr-xr-xdist-win.sh48
1 files changed, 0 insertions, 48 deletions
diff --git a/dist-win.sh b/dist-win.sh
deleted file mode 100755
index e4e0fd0..0000000
--- a/dist-win.sh
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/bash
2set -e
3#set -x
4
5export PATH=/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 12.0/VC/bin:$PATH
6VERSION=`cat VERSION`
7DIST=libressl-$VERSION-windows
8
9rm -fr $DIST
10mkdir -p $DIST
11autoreconf -i
12
13for ARCH in X86 X64; do
14
15 if [ $ARCH = X86 ]; then
16 HOST=i686-w64-mingw32
17 ARCHDIR=x86
18 else
19 HOST=x86_64-w64-mingw32
20 ARCHDIR=x64
21 fi
22
23 echo Building for $HOST
24
25 CC=$HOST-gcc ./configure --host=$HOST --with-openssldir=c:/libressl/ssl
26 make clean
27 PATH=$PATH:/usr/$HOST/sys-root/mingw/bin \
28 make -j 4 check
29 make -j 4 install DESTDIR=`pwd`/stage-$ARCHDIR
30
31 mkdir -p $DIST/$ARCHDIR
32 if [ ! -e $DIST/include ]; then
33 cp -r stage-$ARCHDIR/usr/local/include $DIST
34 fi
35
36 cp stage-$ARCHDIR/usr/local/bin/* $DIST/$ARCHDIR
37
38 for i in libcrypto libssl libtls; do
39 DLL=$(basename `ls -1 $DIST/$ARCHDIR/$i*.dll`|cut -d. -f1)
40 echo EXPORTS > $DLL.def
41 dumpbin /exports $DIST/$ARCHDIR/$DLL.dll | \
42 awk '{print $4}' | awk 'NF' |tail -n +9 >> $DLL.def
43 lib /MACHINE:$ARCH /def:$DLL.def /out:$DIST/$ARCHDIR/$DLL.lib
44 cv2pdb $DIST/$ARCHDIR/$DLL.dll
45 done
46done
47
48zip -r $DIST.zip $DIST