windows dependencies cross-building scripts
[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 # Create stage directory
13 mkdir ${ROOT}/${CROSS}-w64-mingw32
14
15 cd ${ROOT}/boost
16
17 # Create compiler settings
18 echo "using gcc : : ${CROSS}-w64-mingw32-g++ ;" > user-config-${CROSS}.jam
19
20 # Build boost
21 ./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
22
23 cd ${ROOT}
24
25 # Remove build directories
26 rm -rf ${ROOT}/boost/stage ${ROOT}/boost/bin.v2