Skip to content
Permalink
Browse files
extras: Cleaning up some scripts to work with the newly-recreated bui…
…ldbot.
  • Loading branch information
icculus committed May 12, 2020
1 parent 56aaae4 commit 1daf787fb2bcc1133b95ad25a39c6b90ecfa8d06
Showing with 6 additions and 48 deletions.
  1. +2 −28 extras/buildbot-emscripten.sh
  2. +4 −20 extras/buildbot-raspberrypi.sh
@@ -20,32 +20,6 @@ cd `dirname "$0"`
cd ..
PHYSFSBASE=`pwd`

if [ -z "$MAKE" ]; then
OSTYPE=`uname -s`
if [ "$OSTYPE" == "Linux" ]; then
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
let NCPU=$NCPU+1
elif [ "$OSTYPE" = "Darwin" ]; then
NCPU=`sysctl -n hw.ncpu`
elif [ "$OSTYPE" = "SunOS" ]; then
NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
else
NCPU=1
fi

if [ -z "$NCPU" ]; then
NCPU=1
elif [ "$NCPU" = "0" ]; then
NCPU=1
fi

MAKE="make -j$NCPU"
fi

echo "\$MAKE is '$MAKE'"
MAKECMD="$MAKE"
unset MAKE # prevent warnings about jobserver mode.

echo "Setting up Emscripten SDK environment..."
source "$ENVSCRIPT"

@@ -56,10 +30,10 @@ mkdir buildbot
cd buildbot

echo "Configuring..."
emcmake cmake -G "Unix Makefiles" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?
emcmake cmake -G "Ninja" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?

echo "Building..."
emmake $MAKECMD || exit $?
emcmake cmake --build . --config MinSizeRel || exit $?

set -e
rm -rf "$TARBALL" physfs-emscripten
@@ -15,24 +15,7 @@ if [ -z $1 ]; then
TARBALL=physfs-raspberrypi.tar.xz
fi

OSTYPE=`uname -s`
if [ "$OSTYPE" != "Linux" ]; then
# !!! FIXME
echo "This only works on x86 or x64-64 Linux at the moment." 1>&2
exit 1
fi

if [ "x$MAKE" == "x" ]; then
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
let NCPU=$NCPU+1
MAKE="make -j$NCPU"
fi

echo "\$MAKE is '$MAKE'"
MAKECMD="$MAKE"
unset MAKE # prevent warnings about jobserver mode.

BUILDBOTDIR="raspberrypi-buildbot"
BUILDBOTDIR="buildbot"
PARENTDIR="$PWD"

set -e
@@ -42,8 +25,9 @@ rm -rf $BUILDBOTDIR
mkdir -p $BUILDBOTDIR
pushd $BUILDBOTDIR

# the '-G "Ninja"' can be '-G "Unix Makefiles"' if you prefer to use GNU Make.
SYSROOT="/opt/rpi-sysroot"
cmake -G "Unix Makefiles" \
cmake -G "Ninja" \
-DCMAKE_C_COMPILER="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_SYSROOT="$SYSROOT" \
@@ -55,7 +39,7 @@ cmake -G "Unix Makefiles" \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
..

$MAKECMD
cmake --build . --config MinSizeRel

rm -rf "$TARBALL" physfs-raspberrypi
mkdir -p physfs-raspberrypi

0 comments on commit 1daf787

Please sign in to comment.