From b0a5838a4afbbd602d59d5ba117da4af2c5be3cd Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Mon, 17 Oct 2022 20:45:26 +0200 Subject: [PATCH] Added build script for Haiku and OpenBSD. --- etc/utils/haiku/mk-release.sh | 26 ++++++++++++++++++++++++++ etc/utils/openbsd/mk-release.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100755 etc/utils/haiku/mk-release.sh create mode 100755 etc/utils/openbsd/mk-release.sh diff --git a/etc/utils/haiku/mk-release.sh b/etc/utils/haiku/mk-release.sh new file mode 100755 index 0000000..ac517b0 --- /dev/null +++ b/etc/utils/haiku/mk-release.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../../.." + +mk_slunk() { + make -B CC=${1} MARCH=${3} MTUNE=${4} STATIC=1 STRIP=1 + cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${2}" +} + +rm -rf "out" && mkdir -p "out" + +make clean + +case "${BE_HOST_CPU}" in + x86_64) + mk_slunk "gcc" "x86_64" "x86-64" "nocona" + ;; + x86) + mk_slunk "gcc-x86" "i686" "pentiumpro" "pentium3" + ;; + *) + echo "Unknown host CPU type !!!" + exit 1 +esac + +echo "Build completed successfully." diff --git a/etc/utils/openbsd/mk-release.sh b/etc/utils/openbsd/mk-release.sh new file mode 100755 index 0000000..c6f0ccc --- /dev/null +++ b/etc/utils/openbsd/mk-release.sh @@ -0,0 +1,30 @@ +#!/bin/ksh +set -e +cd -- "$(dirname -- "${0}")/../../.." + +if [ -z "${cc_path}" ]; then + cc_path="/usr/local/bin/egcc" +fi + +mk_slunk() { + gmake -B CC="${cc_path}" MARCH=${2} MTUNE=${3} STATIC=1 STRIP=1 + cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${1}" +} + +rm -rf "out" && mkdir -p "out" + +gmake CC="${cc_path}" clean + +case "$(uname -m)" in + amd64) + mk_slunk "x86_64" "x86-64" "nocona" + ;; + i386) + mk_slunk "i686" "pentiumpro" "pentium3" + ;; + *) + echo "Unknown host CPU type !!!" + exit 1 +esac + +echo "Build completed successfully."