GNU make provides the ā€˜-j’ switch, which enables parallel processing. To automatically use this feature without having to type it each time you compile your programs you could add the following entry in your ~/.bashrc script.

alias make="make -j $(cat /proc/cpuinfo | grep processor | wc -l)"