Skip to content
Snippets Groups Projects
Commit 7fa6a2f3 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

MAKEALL: Automatically use parallel builds


Add logic to the MAKEALL script to determine the number of CPU cores
on the system, and run a parallel build if there is more than one.
Usually this significantrly accelerates builds.

Allow to manually adjust the number of parallel make jobs by using
the "BUILD_NCPUS" environment variable.

Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent 268405fa
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
: ${JOBS:=}
# Determine number of CPU cores if no default was set
: ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"}
if [ "$BUILD_NCPUS" -gt 1 ]
then
JOBS=-j`expr "$BUILD_NCPUS" + 1`
else
JOBS=""
fi
if [ "${CROSS_COMPILE}" ] ; then
MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment