views:

76

answers:

3

I build a huge project frequently and this takes long time (more than one hour) to finish even after configuring pre-compiled headers. Are their any guidelines or tricks to allow make work in parallel (e.g. starting gcc in background, ...etc) to allow for faster builds?

Note: Sources and binaries are too large in size to be placed in a ram file system and I don't want to change the directory structure or build philosophy.

+3  A: 

If your project is becoming too big for one machine to handle, you can use one of the distributed make replacements, such as Electric Cloud.

MaxVT
+4  A: 

You can try

make -j<number of job in parallel>
shiki
+3  A: 

make -jN is a must now that most machines are multi-core. If you don't want to write -jN each time, you can put

export MAKEFLAGS=-jN

in your .bashrc.

You may also want to checkout distcc.

JesperE