52 lines
952 B
Plaintext
Raw Normal View History

#!/bin/sh
set -e
./autogen.sh
if [ "x$ARCH" = "xnative" ]; then
2015-09-09 06:12:16 -05:00
# test autotools
./configure
if [ `uname` = "Darwin" ]; then
# OS X runs out of resources if we run 'make -j check'
make check
else
make -j distcheck
fi
2015-09-09 06:12:16 -05:00
# make distribution
make dist
tar zxvf libressl-*.tar.gz
cd libressl-*
mkdir build
cd build
# test cmake and ninja
if [ `uname` = "Darwin" ]; then
cmake ..
make
else
sudo apt-add-repository -y ppa:kalakris/cmake
sudo apt-get update
2015-09-09 07:34:37 -05:00
sudo apt-get install -y cmake ninja-build
cmake .. -GNinja
2015-09-09 07:01:05 -05:00
ninja
fi
else
CPU=i686
if [ "x$ARCH" = "xmingw64" ]; then
CPU=x86_64
fi
export CC=$CPU-w64-mingw32-gcc
2015-09-09 07:34:37 -05:00
if hash $CC 2>/dev/null; then
# Update Ubuntu 12.04 with current mingw toolchain
sudo apt-add-repository -y ppa:tobydox/mingw-x-precise
sudo apt-get update
sudo apt-get install -y $ARCH-x-gcc make
export PATH=$PATH:/opt/$ARCH/bin
fi
./configure --host=$CPU-w64-mingw32
make -j
fi