Cleaned up code, fixed issues when targets aren't processed in a specific order.
This commit is contained in:
parent
f288e87b37
commit
54bbac799e
5 changed files with 41 additions and 23 deletions
|
@ -57,6 +57,7 @@ function buildSDL2() {
|
|||
mkdir -p build
|
||||
|
||||
pushd build
|
||||
../SDL/autogen.sh
|
||||
../SDL/configure \
|
||||
--target=${TRIPLE} \
|
||||
--host=${TRIPLE} \
|
||||
|
|
|
@ -124,6 +124,7 @@ function rebuildJoeyLib() {
|
|||
|
||||
withTargets buildJoeyLib "Building JoeyLib"
|
||||
|
||||
mkdir -p dist
|
||||
cp -f ${G_SRC}/joey.h dist/.
|
||||
mkdir -p dist/3rdparty/memwatch
|
||||
cp -f ${G_SRC}/3rdparty/memwatch/* dist/3rdparty/memwatch/.
|
||||
|
@ -220,9 +221,9 @@ function updateSystem() {
|
|||
|
||||
tBoldBox tBLUE "Examining system..."
|
||||
|
||||
tSudo apt update
|
||||
tSudo apt -y upgrade
|
||||
tSudo apt -y dist-upgrade
|
||||
tSudo apt-get update
|
||||
tSudo apt-get -y upgrade
|
||||
tSudo apt-get -y dist-upgrade
|
||||
|
||||
# Shut Canonical up.
|
||||
tSudo pro config set apt_news=false
|
||||
|
@ -305,4 +306,4 @@ function withTargets() {
|
|||
|
||||
|
||||
# At the very end so we can stream this script from a web server.
|
||||
startup $@
|
||||
startup $@ # 2>&1 | tee lastrun.log
|
||||
|
|
|
@ -26,6 +26,9 @@ M_SDL2_TAG=97a5e744497ff7cc93edc5119d67cad3ee86dd57
|
|||
M_TRIPLE="x86_64-linux-gnu"
|
||||
|
||||
|
||||
source helpers/SDL2.helper
|
||||
|
||||
|
||||
function architectures() {
|
||||
echo "i386 x86_64"
|
||||
}
|
||||
|
@ -43,7 +46,6 @@ function buildJoeyLib() {
|
|||
local ARCH=$1
|
||||
local PASS=$2
|
||||
|
||||
|
||||
export CFLAGS="-Wall -static-libgcc -D_REENTRANT_ -I${G_INSTALLED}/include -c"
|
||||
export LDFLAGS="-lm -ldl -lpthread"
|
||||
|
||||
|
@ -55,16 +57,14 @@ function buildJoeyLib() {
|
|||
export CFLAGS="-DJOEY_DEBUG ${CFLAGS}"
|
||||
fi
|
||||
|
||||
source helpers/SDL2.helper
|
||||
setCompiler
|
||||
buildJoeyLibSDL2
|
||||
|
||||
export LDFLAGS=
|
||||
export CFLAGS=
|
||||
unSetCompiler
|
||||
}
|
||||
|
||||
|
||||
function enabled() {
|
||||
echo 0
|
||||
echo 1
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,8 +76,26 @@ function install() {
|
|||
export CFLAGS="-m32"
|
||||
fi
|
||||
|
||||
source helpers/SDL2.helper
|
||||
# Do not call setCompiler here!
|
||||
buildSDL2 ${M_SDL2_TAG} ${M_TRIPLE}
|
||||
}
|
||||
|
||||
|
||||
function setCompiler() {
|
||||
local ARCH=$1
|
||||
local PASS=$2
|
||||
|
||||
export CC=${M_TRIPLE}-gcc
|
||||
export LD=${M_TRIPLE}-gcc
|
||||
export AR=${M_TRIPLE}-ar
|
||||
}
|
||||
|
||||
|
||||
function unSetCompiler() {
|
||||
export CC=
|
||||
export LD=
|
||||
export AR=
|
||||
|
||||
export LDFLAGS=
|
||||
export CFLAGS=
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
M_TRIPLE=
|
||||
|
||||
|
||||
source helpers/SDL2.helper
|
||||
|
||||
|
||||
function architectures() {
|
||||
echo "i386 x86_64 aarch64"
|
||||
}
|
||||
|
@ -50,7 +53,6 @@ function buildJoeyLib() {
|
|||
fi
|
||||
|
||||
setCompiler ${ARCH} ${PASS}
|
||||
source helpers/SDL2.helper
|
||||
buildJoeyLibSDL2
|
||||
unSetCompiler
|
||||
}
|
||||
|
@ -86,7 +88,7 @@ function buildMacOSXToolchain() {
|
|||
|
||||
|
||||
function enabled() {
|
||||
echo 1
|
||||
echo 0
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,7 +105,6 @@ function install() {
|
|||
fi
|
||||
|
||||
setCompiler ${ARCH} ${PASS}
|
||||
source helpers/SDL2.helper
|
||||
buildSDL2 ${SDL2_TAG} ${M_TRIPLE}
|
||||
unSetCompiler
|
||||
}
|
||||
|
|
|
@ -26,6 +26,9 @@ M_SDL2_TAG=97a5e744497ff7cc93edc5119d67cad3ee86dd57
|
|||
M_TRIPLE=
|
||||
|
||||
|
||||
source helpers/SDL2.helper
|
||||
|
||||
|
||||
function architectures() {
|
||||
echo "i686 x86_64"
|
||||
}
|
||||
|
@ -52,14 +55,13 @@ function buildJoeyLib() {
|
|||
fi
|
||||
|
||||
setCompiler ${ARCH} ${PASS}
|
||||
source helpers/SDL2.helper
|
||||
buildJoeyLibSDL2 ${M_TRIPLE}
|
||||
unSetCompiler
|
||||
}
|
||||
|
||||
|
||||
function enabled() {
|
||||
echo 0
|
||||
echo 1
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,10 +69,8 @@ function install() {
|
|||
local ARCH=$1
|
||||
local PASS=$2
|
||||
|
||||
setCompiler ${ARCH} ${PASS}
|
||||
source helpers/SDL2.helper
|
||||
buildSDL2 ${M_SDL2_TAG} ${M_TRIPLE}
|
||||
unSetCompiler
|
||||
# Do not call setCompiler here!
|
||||
buildSDL2 ${M_SDL2_TAG} "${ARCH}-w64-mingw32"
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,7 +93,4 @@ function unSetCompiler() {
|
|||
|
||||
export LDFLAGS=
|
||||
export CFLAGS=
|
||||
|
||||
export LD_LIBRARY_PATH=
|
||||
export PATH=${G_ORIGINAL_PATH}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue