How to parallelize the build with make?

1

The compilation process is parallelizable, but by default the make program performs one recipe at a time. How can I compile with make ?

    
asked by anonymous 11.06.2015 / 18:25

1 answer

1

The -j (or --jobs ) option defines how many commands should be executed in parallel.

For example, make -j8 will execute 8 commands in parallel.

To set this behavior by default, modify the environment variable MAKEFLAGS :

setenv MAKEFLAGS '-j8'

Generally a value of n+1 to j is recommended , where n is the number of available cores.

    
11.06.2015 / 18:25