25 lines
623 B
Bash
Executable File
25 lines
623 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
|
|
|
|
readonly USE_STATIC=1
|
|
readonly USE_STRIP=1
|
|
readonly USE_MTUNE=corei7
|
|
|
|
PLATFORM="$(uname -a)"
|
|
unset SUFFIX
|
|
if [[ "${PLATFORM}" == MINGW* || "${PLATFORM}" == CYGWIN* ]]; then
|
|
SUFFIX=".exe"
|
|
fi
|
|
|
|
mkdir -p "out"
|
|
rm -f "out/slunkcrypt-*"
|
|
|
|
for cpu in 32 64; do
|
|
[[ ${cpu} -lt 64 ]] && march=pentium2 || march=x86-64
|
|
make -B CPU=${cpu} MARCH=${march} MTUNE=${USE_MTUNE} STATIC=${USE_STATIC} STRIP=${USE_STRIP} clean all
|
|
cp -f "frontend/bin/slunkcrypt${SUFFIX}" "out/slunkcrypt-x${cpu}${SUFFIX}"
|
|
done
|
|
|
|
printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"
|