Build sanity checks
[novacoin.git] / mingw64_deps / boost / build.sh
1 #!/bin/bash
2
3 CROSS=$1
4 ROOT=$(pwd)
5
6 if [[ ! "${CROSS}" =~ ^(aarch64|x86_64) ]]; then
7 echo "Platform ${CROSS} is not supported"
8 echo "Expected either aarch64 or x86_64."
9 exit 1
10 fi
11
12 if [[ ! $(which ${CROSS}-w64-mingw32-clang) ]]; then
13 echo "llvm-mingw is not installed, please download it from https://github.com/mstorsjo/llvm-mingw/releases"
14 exit 1
15 fi
16
17 if [[ ! $(which make) ]]; then
18 echo "make is not installed, please install buld-essential package"
19 exit 1
20 fi
21
22 # Create stage directory
23 mkdir ${ROOT}/${CROSS}-w64-mingw32
24
25 cd ${ROOT}/boost
26
27 # Create compiler settings
28 echo "using gcc : : ${CROSS}-w64-mingw32-g++ ;" > user-config-${CROSS}.jam
29
30 # Build boost
31 ./b2 --user-config=user-config-${CROSS}.jam --build-type=minimal --layout=system --with-chrono --with-filesystem --with-program_options --with-system --with-thread target-os=windows address-model=64 variant=release link=static threading=multi runtime-link=static stage --prefix=${ROOT}/${CROSS}-w64-mingw32 install
32
33 cd ${ROOT}
34
35 # Remove build directories
36 rm -rf ${ROOT}/boost/stage ${ROOT}/boost/bin.v2