2022-09-23 00:10:07 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../../.."
|
|
|
|
|
|
|
|
if [ -z "${cc_path}" ]; then
|
2024-06-05 00:23:48 +02:00
|
|
|
cc_path="/usr/gcc/13/bin/gcc"
|
2022-09-23 00:10:07 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
mk_slunk() {
|
|
|
|
gmake -B CC="${cc_path}" CPU=${1} MARCH=${3} MTUNE=${4} FLTO=1 STRIP=1
|
|
|
|
cp -f "frontend/bin/slunkcrypt" "out/slunkcrypt-${2}"
|
|
|
|
}
|
|
|
|
|
2024-06-05 00:23:48 +02:00
|
|
|
if [ "$(uname -s)" != "SunOS" ]; then
|
|
|
|
echo "This script is supposed to run on the SunOS (Solaris) platform !!!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-09-23 00:10:07 +02:00
|
|
|
rm -rf "out" && mkdir -p "out"
|
|
|
|
|
|
|
|
mk_slunk 32 "i686" "pentiumpro" "pentium3"
|
|
|
|
mk_slunk 64 "x86_64" "x86-64" "nocona"
|
|
|
|
|
2024-06-05 00:23:48 +02:00
|
|
|
./etc/build/build_info.sh "${cc_path}" > "out/.build_info"
|
|
|
|
|
2022-09-23 00:10:07 +02:00
|
|
|
echo "Build completed successfully."
|