summaryrefslogtreecommitdiff
path: root/contrib/build-anytun-mingw-cross.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2012-01-06 02:49:55 +0000
committerChristian Pointner <equinox@anytun.org>2012-01-06 02:49:55 +0000
commit5d773b252b9a8dce4c1e6481a3645ce31f27e244 (patch)
treecb7aa34e8fc7390d46161ae4c0add2765a77fca7 /contrib/build-anytun-mingw-cross.sh
parentadded anytun mingw cross compile script (diff)
cleanup at ming-cross script for anytun
Diffstat (limited to 'contrib/build-anytun-mingw-cross.sh')
-rwxr-xr-xcontrib/build-anytun-mingw-cross.sh29
1 files changed, 17 insertions, 12 deletions
diff --git a/contrib/build-anytun-mingw-cross.sh b/contrib/build-anytun-mingw-cross.sh
index 869e8b8..54e09c5 100755
--- a/contrib/build-anytun-mingw-cross.sh
+++ b/contrib/build-anytun-mingw-cross.sh
@@ -3,16 +3,21 @@ set -e
BASE=`pwd`
cd ../src
-make distclean
-./configure --target=mingw --use-ssl-crypto --with-boost=../contrib/boost-w32 --with-openssl=../contrib/openssl-w32 --cross-prefix=i686-w64-mingw32-
-make -j 8
-make strip
-mkdir -p $BASE/anytun-w32
-cp *.exe $BASE/anytun-w32
-make distclean
-./configure --target=mingw --use-ssl-crypto --with-boost=../contrib/boost-w64 --with-openssl=../contrib/openssl-w64 --cross-prefix=x86_64-w64-mingw32-
-make -j 8
-make strip
-mkdir -p $BASE/anytun-w64
-cp *.exe $BASE/anytun-w64
+
+for target in w32 w64; do
+ if [ "$target" = "w32" ]; then
+ target_name=i686
+ else
+ target_name=x86_64
+ fi
+ make distclean
+ ./configure --target=mingw --use-ssl-crypto --with-boost=../contrib/boost-$target --with-openssl=../contrib/openssl-$target --cross-prefix=$target_name-w64-mingw32-
+ make
+ make strip
+ mkdir -p $BASE/anytun-$target
+ cp *.exe $BASE/anytun-$target
+done
+
cd ../contrib
+
+exit 0