Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 1daf787
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 48 deletions.
30 changes: 2 additions & 28 deletions extras/buildbot-emscripten.sh
Expand Up @@ -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"

Expand All @@ -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
Expand Down
24 changes: 4 additions & 20 deletions extras/buildbot-raspberrypi.sh
Expand Up @@ -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
Expand All @@ -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" \
Expand All @@ -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
Expand Down

0 comments on commit 1daf787

Please sign in to comment.