After reading answer to this question:
Make "make" default to "make -j 8"
I am wondering if there is way to make the -j option automatically use the correct number of compile threads?
So I say make. And the make command itself uses 6 or 4 or 8 threads depending on the hardware?
makedoes not look up the number of cores by itself if you just usemake -j— instead, it parallelizes to the max. However, you should be able to determine the number of cores byor (as per Azor-Ahai’s comment, if available on your system)
Hence:
See “How How to obtain the number of CPUs/cores in Linux from the command line?” for more details. Also, see GNU make: should the number of jobs equal the number of CPU cores in a system?