Search code examples
androidperformancemakefilecpucpu-speed

how to calculate N in "make -jN" ? for full utilisation of CPU


Need to build android source build with full CPU utilisation.
For that, how to calculate N in " make -jN " ?

Sample CPUinfo:

cpuinfo


Solution

  • cores=$(grep -c ^processor /proc/cpuinfo)
    make -j${cores}