1
0
Fork 0

Small improvement in Linux build script.

This commit is contained in:
LoRd_MuldeR 2022-12-18 14:34:42 +01:00
parent 65fa799725
commit 25a5a92b47
Signed by: mulder
GPG Key ID: 2B5913365F57E03F
2 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,28 @@
#!/bin/bash
set -e
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../../.."
function mk_slunk() {
local command="make -B CC=${2}-gcc STRIP=1 FLTO=1"
$BASH -x -c "${command}${3:+ ${3}}"
cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${1}"
}
if [[ "$OSTYPE" != "linux"* ]]; then
echo "This script is supposed to run on the linux platform !!!"
exit 1
fi
rm -rf "out" && mkdir -p "out"
$BASH -x -c "make clean"
mk_slunk "x86_64" "x86_64-linux-gnu" "MARCH=x86-64 MTUNE=nocona"
mk_slunk "i686" "i686-linux-gnu" "MARCH=pentiumpro MTUNE=pentium3"
mk_slunk "armel" "arm-linux-gnueabi"
mk_slunk "armhf" "arm-linux-gnueabihf"
mk_slunk "arm64" "aarch64-linux-gnu"
mk_slunk "mipsel" "mipsel-linux-gnu"
mk_slunk "mips64el" "mips64el-linux-gnuabi64"
printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"

View File

@ -1,7 +1,7 @@
#!/bin/bash
# See "etc/utils/linux/mk-musl.sh" in order to build musl libc!
set -e
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../../.."
function mk_slunk() {
local command="make -B CC=/usr/local/musl/${1}/bin/musl-gcc STATIC=1 STRIP=1 FLTO=1"
@ -9,7 +9,7 @@ function mk_slunk() {
cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-${1}"
}
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
if [[ "$OSTYPE" != "linux"* ]]; then
echo "This script is supposed to run on the linux platform !!!"
exit 1
fi