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
|
mkdir -p build
|
||||||
|
|
||||||
pushd build
|
pushd build
|
||||||
|
../SDL/autogen.sh
|
||||||
../SDL/configure \
|
../SDL/configure \
|
||||||
--target=${TRIPLE} \
|
--target=${TRIPLE} \
|
||||||
--host=${TRIPLE} \
|
--host=${TRIPLE} \
|
||||||
|
|
|
@ -124,6 +124,7 @@ function rebuildJoeyLib() {
|
||||||
|
|
||||||
withTargets buildJoeyLib "Building JoeyLib"
|
withTargets buildJoeyLib "Building JoeyLib"
|
||||||
|
|
||||||
|
mkdir -p dist
|
||||||
cp -f ${G_SRC}/joey.h dist/.
|
cp -f ${G_SRC}/joey.h dist/.
|
||||||
mkdir -p dist/3rdparty/memwatch
|
mkdir -p dist/3rdparty/memwatch
|
||||||
cp -f ${G_SRC}/3rdparty/memwatch/* dist/3rdparty/memwatch/.
|
cp -f ${G_SRC}/3rdparty/memwatch/* dist/3rdparty/memwatch/.
|
||||||
|
@ -220,9 +221,9 @@ function updateSystem() {
|
||||||
|
|
||||||
tBoldBox tBLUE "Examining system..."
|
tBoldBox tBLUE "Examining system..."
|
||||||
|
|
||||||
tSudo apt update
|
tSudo apt-get update
|
||||||
tSudo apt -y upgrade
|
tSudo apt-get -y upgrade
|
||||||
tSudo apt -y dist-upgrade
|
tSudo apt-get -y dist-upgrade
|
||||||
|
|
||||||
# Shut Canonical up.
|
# Shut Canonical up.
|
||||||
tSudo pro config set apt_news=false
|
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.
|
# 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"
|
M_TRIPLE="x86_64-linux-gnu"
|
||||||
|
|
||||||
|
|
||||||
|
source helpers/SDL2.helper
|
||||||
|
|
||||||
|
|
||||||
function architectures() {
|
function architectures() {
|
||||||
echo "i386 x86_64"
|
echo "i386 x86_64"
|
||||||
}
|
}
|
||||||
|
@ -43,7 +46,6 @@ function buildJoeyLib() {
|
||||||
local ARCH=$1
|
local ARCH=$1
|
||||||
local PASS=$2
|
local PASS=$2
|
||||||
|
|
||||||
|
|
||||||
export CFLAGS="-Wall -static-libgcc -D_REENTRANT_ -I${G_INSTALLED}/include -c"
|
export CFLAGS="-Wall -static-libgcc -D_REENTRANT_ -I${G_INSTALLED}/include -c"
|
||||||
export LDFLAGS="-lm -ldl -lpthread"
|
export LDFLAGS="-lm -ldl -lpthread"
|
||||||
|
|
||||||
|
@ -55,16 +57,14 @@ function buildJoeyLib() {
|
||||||
export CFLAGS="-DJOEY_DEBUG ${CFLAGS}"
|
export CFLAGS="-DJOEY_DEBUG ${CFLAGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source helpers/SDL2.helper
|
setCompiler
|
||||||
buildJoeyLibSDL2
|
buildJoeyLibSDL2
|
||||||
|
unSetCompiler
|
||||||
export LDFLAGS=
|
|
||||||
export CFLAGS=
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function enabled() {
|
function enabled() {
|
||||||
echo 0
|
echo 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,8 +76,26 @@ function install() {
|
||||||
export CFLAGS="-m32"
|
export CFLAGS="-m32"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source helpers/SDL2.helper
|
# Do not call setCompiler here!
|
||||||
buildSDL2 ${M_SDL2_TAG} ${M_TRIPLE}
|
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=
|
export CFLAGS=
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
M_TRIPLE=
|
M_TRIPLE=
|
||||||
|
|
||||||
|
|
||||||
|
source helpers/SDL2.helper
|
||||||
|
|
||||||
|
|
||||||
function architectures() {
|
function architectures() {
|
||||||
echo "i386 x86_64 aarch64"
|
echo "i386 x86_64 aarch64"
|
||||||
}
|
}
|
||||||
|
@ -50,7 +53,6 @@ function buildJoeyLib() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setCompiler ${ARCH} ${PASS}
|
setCompiler ${ARCH} ${PASS}
|
||||||
source helpers/SDL2.helper
|
|
||||||
buildJoeyLibSDL2
|
buildJoeyLibSDL2
|
||||||
unSetCompiler
|
unSetCompiler
|
||||||
}
|
}
|
||||||
|
@ -86,7 +88,7 @@ function buildMacOSXToolchain() {
|
||||||
|
|
||||||
|
|
||||||
function enabled() {
|
function enabled() {
|
||||||
echo 1
|
echo 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +105,6 @@ function install() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setCompiler ${ARCH} ${PASS}
|
setCompiler ${ARCH} ${PASS}
|
||||||
source helpers/SDL2.helper
|
|
||||||
buildSDL2 ${SDL2_TAG} ${M_TRIPLE}
|
buildSDL2 ${SDL2_TAG} ${M_TRIPLE}
|
||||||
unSetCompiler
|
unSetCompiler
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,9 @@ M_SDL2_TAG=97a5e744497ff7cc93edc5119d67cad3ee86dd57
|
||||||
M_TRIPLE=
|
M_TRIPLE=
|
||||||
|
|
||||||
|
|
||||||
|
source helpers/SDL2.helper
|
||||||
|
|
||||||
|
|
||||||
function architectures() {
|
function architectures() {
|
||||||
echo "i686 x86_64"
|
echo "i686 x86_64"
|
||||||
}
|
}
|
||||||
|
@ -52,14 +55,13 @@ function buildJoeyLib() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setCompiler ${ARCH} ${PASS}
|
setCompiler ${ARCH} ${PASS}
|
||||||
source helpers/SDL2.helper
|
|
||||||
buildJoeyLibSDL2 ${M_TRIPLE}
|
buildJoeyLibSDL2 ${M_TRIPLE}
|
||||||
unSetCompiler
|
unSetCompiler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function enabled() {
|
function enabled() {
|
||||||
echo 0
|
echo 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,10 +69,8 @@ function install() {
|
||||||
local ARCH=$1
|
local ARCH=$1
|
||||||
local PASS=$2
|
local PASS=$2
|
||||||
|
|
||||||
setCompiler ${ARCH} ${PASS}
|
# Do not call setCompiler here!
|
||||||
source helpers/SDL2.helper
|
buildSDL2 ${M_SDL2_TAG} "${ARCH}-w64-mingw32"
|
||||||
buildSDL2 ${M_SDL2_TAG} ${M_TRIPLE}
|
|
||||||
unSetCompiler
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,7 +93,4 @@ function unSetCompiler() {
|
||||||
|
|
||||||
export LDFLAGS=
|
export LDFLAGS=
|
||||||
export CFLAGS=
|
export CFLAGS=
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=
|
|
||||||
export PATH=${G_ORIGINAL_PATH}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue