Added build scripts for FreeBSD, Solaris and MacOS X platforms.
[slunkcrypt.git] / etc / utils / macosx / mk-release.sh
blobc5a9be61048145f88e8ae3aa0188790a56d979a1
1 #!/bin/zsh
2 set -e
3 cd -- "$(dirname -- "${(%):-%N}")/../../.."
5 if [ -z "${cc_path}" ]; then
6 cc_path="/usr/bin/cc"
7 fi
9 mk_slunk() {
10 make -B CC="${cc_path}" TARGET="${1}-apple-macos" FLTO=1
11 strip -o "out/slunkcrypt-${1}" "frontend/bin/slunkcrypt"
14 rm -rf "out" && mkdir -p "out"
16 make CC="${cc_path}" clean
18 mk_slunk "x86_64"
19 mk_slunk "arm64"
21 echo "Build completed successfully."