Use $(nproc) to determine number of processors, as discovered by @pelson.