Browse Source

Choose number of compile jobs in build.sh #156

no_mining_until_synced
Duke 4 months ago
parent
commit
eea2a9a6bf
  1. 23
      build.sh

23
build.sh

@ -4,18 +4,7 @@
set -e set -e
UNAME=$(uname) UNAME=$(uname)
VERSION=$(grep APP_VERSION src/version.h |cut -d\" -f2)
if [ "$UNAME" == "Linux" ] ; then
JOBS=$(nproc)
elif [ "$UNAME" == "FreeBSD" ] ; then
JOBS=$(nproc)
elif [ "$UNAME" == "Darwin" ] ; then
JOBS=$(sysctl -n hw.ncpu)
else
JOBS=1
fi
VERSION=$(cat src/version.h |cut -d\" -f2)
CONF=${SDCONF:-silentdragon.pro} CONF=${SDCONF:-silentdragon.pro}
WALLET="SilentDragon" WALLET="SilentDragon"
if [ "$CONF" == "silentdragonx.pro" ] ; then if [ "$CONF" == "silentdragonx.pro" ] ; then
@ -40,12 +29,12 @@ make --version
qbuild () { qbuild () {
qmake $CONF -spec linux-clang CONFIG+=debug qmake $CONF -spec linux-clang CONFIG+=debug
make -j$JOBS make -j2 "$@"
} }
qbuild_release () { qbuild_release () {
qmake $CONF -spec linux-clang CONFIG+=release qmake $CONF -spec linux-clang CONFIG+=release
make -j$JOBS make -j2 "$@"
} }
if [ "$1" == "clean" ]; then if [ "$1" == "clean" ]; then
@ -55,9 +44,9 @@ elif [ "$1" == "linguist" ]; then
lrelease $CONF lrelease $CONF
elif [ "$1" == "cleanbuild" ]; then elif [ "$1" == "cleanbuild" ]; then
make clean make clean
qbuild qbuild "$@"
elif [ "$1" == "release" ]; then elif [ "$1" == "release" ]; then
qbuild_release qbuild_release "$@"
else else
qbuild qbuild "$@"
fi fi

Loading…
Cancel
Save