Skip to content

Instantly share code, notes, and snippets.

@davidshepherd7
Last active December 15, 2015 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidshepherd7/5246166 to your computer and use it in GitHub Desktop.
Save davidshepherd7/5246166 to your computer and use it in GitHub Desktop.
# Changes to defaults for "make"
# ============================================================
# How many cores do we have? Find out from /proc/cpuinfo (using regexp matching
# the start of info for a new processor).
NCORES=`grep --count '^processor[[:space:]]*:' /proc/cpuinfo`
# Apparently make runs fastest with one more job than there are cores.
NJOBS=$(($NCORES + 1))
export MAKEFLAGS="-j$NJOBS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment