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)"

Depending on your specific use of makefiles, this setting might not be desirable and can in fact produce incorrect or incomplete results, for example when compiling a Latex document that requires multiple passes.