r408 - trunk/examples/ut3-dedicated
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Jan 13 06:15:38 EST 2008
Author: icculus
Date: 2008-01-13 06:15:38 -0500 (Sun, 13 Jan 2008)
New Revision: 408
Modified:
trunk/examples/ut3-dedicated/make.sh
Log:
Added NCPU patch to ut3-dedicated example.
Modified: trunk/examples/ut3-dedicated/make.sh
===================================================================
--- trunk/examples/ut3-dedicated/make.sh 2008-01-13 11:14:32 UTC (rev 407)
+++ trunk/examples/ut3-dedicated/make.sh 2008-01-13 11:15:38 UTC (rev 408)
@@ -21,6 +21,18 @@
DEBUG=1
fi
+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`
+else
+ NCPU=1
+fi
+
+echo "Will use make -j$NCPU. If this is wrong, check NCPU at top of script."
+
# Show everything that we do here on stdout.
set -x
@@ -80,7 +92,7 @@
.
#make -j5 VERBOSE=1
-make -j5
+make -j$NCPU
# Strip the binaries and GUI plugins, put them somewhere useful.
if [ "$DEBUG" != "1" ]; then
More information about the mojosetup-commits
mailing list