I have a Makefile on a machine that has a ton of cores in it, but I always seem to forget to write -jX
when compiling my project and it takes way longer than it
It appears that the MAKEFLAGS
environment variable can pass flags that are part of every make
run (at least for GNU make). I haven't had much luck with this myself, but it might be possible to use -l
rather than -j
to automatically run as many jobs as are appropriate for the number of cores you have available.