PARALLEL flag is now being set automatically based on available host cpu's.
authorPiotr Esden-Tempski <piotr@esden.net>
Sun, 14 Nov 2010 04:18:07 +0000 (20:18 -0800)
committerPiotr Esden-Tempski <piotr@esden.net>
Sun, 14 Nov 2010 04:24:45 +0000 (20:24 -0800)
summon-arm-toolchain

index 8663c07ee5debe89027e3005b57f0cfad86b6fe4..fe9e58ad4049f248c2e9b743ff79f943efdd2704 100755 (executable)
@@ -20,7 +20,6 @@ set -e
 ##############################################################################
 TARGET=arm-none-eabi           # Or: TARGET=arm-elf
 PREFIX=${HOME}/sat     # Install location of your final toolchain
-PARALLEL=                      # Or: PARALLEL="-j 5" for 4 CPUs
 DARWIN_OPT_PATH=/opt/local     # Path in which MacPorts or Fink is installed
 # Set to 'sudo' if you need superuser privileges while installing
 SUDO=
@@ -62,6 +61,10 @@ LIBOPENSTM32=master
 # Flags section
 ##############################################################################
 
+CPUS=$(getconf _NPROCESSORS_ONLN)
+PARALLEL=-j$((CPUS + 1))
+echo "${CPUS} cpu's detected running make with '${PARALLEL}' flag"
+
 GDBFLAGS=
 BINUTILFLAGS=