mirror of
https://github.com/psforever/PSCrypto.git
synced 2026-03-07 14:30:27 +00:00
Improve build scripts and makefiles (RANLIB and STRIP prefix customization)
This commit is contained in:
parent
143d014d9d
commit
2a449eee2a
3 changed files with 34 additions and 5 deletions
|
|
@ -1,8 +1,27 @@
|
|||
#!/bin/bash
|
||||
set -ue
|
||||
|
||||
# The GCC binaries (gcc, g++, etc) can have their name prefixed
|
||||
# by specifying a program-prefix option when configuring.
|
||||
# https://gcc.gnu.org/install/configure.html
|
||||
# Search above page for "--program-prefix"
|
||||
# The prefix allows multiple GCC to be installed and on system PATH.
|
||||
# MINGW (Which we use for crosscompilation) uses this option.
|
||||
# x86_64-w64-mingw32- and i686-w64-mingw32-
|
||||
# GCC as built by Linux distros usually uses this option.
|
||||
# however the prefixes vary
|
||||
|
||||
# Default prefix to "x86_64-linux-gnu-", but allow overriding.
|
||||
# (For example Fedora 25 is noted needing something like "x86_64-redhat-linux-")
|
||||
# NOTE: ${x-y} is a bash-ism. differs from portable ${x:-y} if x undefined
|
||||
PARAM_GCC_PROGRAM_PREFIX=${PARAM_GCC_PROGRAM_PREFIX-"x86_64-linux-gnu-"}
|
||||
PARAM_GCC_PREFIX_RANLIB=${PARAM_GCC_PREFIX_RANLIB-"x86_64-linux-gnu-"}
|
||||
PARAM_GCC_PREFIX_STRIP=${PARAM_GCC_PREFIX_STRIP-"x86_64-linux-gnu-"}
|
||||
|
||||
CONFIGS=3
|
||||
BUILD_MATRIX_PREFIX=("x86_64-w64-mingw32-" "i686-w64-mingw32-" "x86_64-linux-gnu-")
|
||||
BUILD_MATRIX_PREFIX=("x86_64-w64-mingw32-" "i686-w64-mingw32-" "${PARAM_GCC_PROGRAM_PREFIX}")
|
||||
BUILD_MATRIX_PREFIX_RANLIB=("x86_64-w64-mingw32-" "i686-w64-mingw32-" "${PARAM_GCC_PREFIX_RANLIB}")
|
||||
BUILD_MATRIX_PREFIX_STRIP=("x86_64-w64-mingw32-" "i686-w64-mingw32-" "${PARAM_GCC_PREFIX_STRIP}")
|
||||
BUILD_MATRIX_ARTIFACT=("pscrypto.dll" "pscrypto.dll" "libpscrypto.so")
|
||||
BUILD_MATRIX_JAVA_FOLDER=("win32-x86-64" "win32-x86" "linux-x86-64")
|
||||
|
||||
|
|
@ -18,10 +37,15 @@ for i in `seq 1 $CONFIGS`; do
|
|||
javaFolder=${BUILD_MATRIX_JAVA_FOLDER[$iter]}
|
||||
|
||||
export PREFIX=${BUILD_MATRIX_PREFIX[$iter]}
|
||||
export PREFIX_RANLIB=${BUILD_MATRIX_PREFIX_RANLIB[$iter]}
|
||||
export PREFIX_RANLIB_USE=t
|
||||
export PREFIX_STRIP=${BUILD_MATRIX_PREFIX_STRIP[$iter]}
|
||||
export PREFIX_STRIP_USE=t
|
||||
|
||||
echo "Now building $javaFolder..."
|
||||
make clean > /dev/null 2>&1
|
||||
make -j > "build-log-${javaFolder}.txt" 2>&1
|
||||
make clean > "build-log-clean-${javaFolder}.txt" 2>&1
|
||||
# -j with no number was LITERALLY causing a system crash (out of memory)
|
||||
make -j 2 > "build-log-${javaFolder}.txt" 2>&1
|
||||
|
||||
mkdir -p "$BUILD_DEST/$javaFolder"
|
||||
cp "pscrypto/${BUILD_MATRIX_ARTIFACT[$iter]}" "$BUILD_DEST/$javaFolder/"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue