summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/rockboxdev.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index bf50faf214..6009a0c3af 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -32,7 +32,12 @@ fi
# This is the absolute path to where the script resides.
rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-parallel=`nproc`
+if [ `uname -s` = "Darwin" ]; then
+ parallel=`sysctl -n hw.physicalcpu`
+else
+ parallel=`nproc`
+fi
+
if [ $parallel -gt 1 ] ; then
make_parallel=-j$parallel
fi