Fixed detection of 32-Bit (x86) version of Haiku OS.
[slunkcrypt.git] / mk-release.sh
blob17a32495742a0d44fb55239292b4bbc545dafcb9
1 #!/bin/bash
2 # See "etc/utils/linux/mk-musl.sh" in order to build musl libc!
3 set -e
4 cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
6 function mk_slunk() {
7 local command="make -B CC=/usr/local/musl/${1}/bin/musl-gcc STATIC=1 STRIP=1 FLTO=1"
8 $BASH -x -c "${command}${2:+ ${2}}"
9 cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${1}"
12 if [[ "$OSTYPE" != "linux-gnu"* ]]; then
13 echo "This script is supposed to run on the linux platform !!!"
14 exit 1
17 rm -rf "out" && mkdir -p "out"
19 $BASH -x -c "make clean"
21 mk_slunk "x86_64" "MARCH=x86-64 MTUNE=nocona"
22 mk_slunk "i686" "MARCH=pentiumpro MTUNE=pentium3"
23 mk_slunk "armel"
24 mk_slunk "armhf"
25 mk_slunk "arm64"
26 mk_slunk "mipsel"
27 mk_slunk "mips64el"
29 printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"