xref: /freebsd/sys/contrib/libsodium/dist-build/msys2-win32.sh (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1#! /bin/sh
2
3export CFLAGS="-Ofast -fomit-frame-pointer -m32 -march=pentium3 -mtune=westmere"
4export PREFIX="$(pwd)/libsodium-win32"
5
6if (i686-w64-mingw32-gcc --version > /dev/null 2>&1) then
7  echo MinGW found
8else
9  echo Please install mingw-w64-i686-gcc >&2
10  exit
11fi
12
13./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \
14            --host=i686-w64-mingw32 && \
15make clean && \
16make && \
17make check && \
18make install
19