6 if [[ ! "${CROSS}" =~ ^(aarch64|x86_64) ]]; then
7 echo "Platform ${CROSS} is not supported"
8 echo "Expected either aarch64 or x86_64."
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"
17 if [[ ! $(which make) ]]; then
18 echo "make is not installed, please install buld-essential package"
22 # Make build directories
23 mkdir ${ROOT}/${CROSS}-w64-mingw32-build
26 mkdir ${ROOT}/${CROSS}-w64-mingw32
30 cd ${ROOT}/${CROSS}-w64-mingw32-build
31 #CC=${CROSS}-w64-mingw32-gcc CXX=${CROSS}-w64-mingw32-g++
32 ${ROOT}/openssl/Configure --cross-compile-prefix=${CROSS}-w64-mingw32- --prefix=${ROOT}/${CROSS}-w64-mingw32 no-shared no-asm mingw64 --api=1.1.1
36 # Create symlink for compatibility
37 cd ${ROOT}/${CROSS}-w64-mingw32
40 # Remove build directore
42 rm -rf ${ROOT}/${CROSS}-w64-mingw32-build