make
doesn't look for the number of cores on its own if you just use make -j
- instead, it parallels with max. However, you should be able to determine the number of cores per
grep -c "^processor" /proc/cpuinfo
or (as commented by Azor-Ahai, if available on your system)
nproc
Consequently:
make -j $(nproc)
For more information on how to get the number of processors / kernels in Linux from the command line ?, see "How . In addition, see GNU make: should the number of jobs equal the number of processor cores in the system?
source share