make flags & options
-j
Run N jobs in parallel. Speeds up builds on multi-core machines.
make -j4
make -j$(nproc)
-f
Use a specific file as the makefile instead of the default Makefile.
make -f build.mk
-n, --dry-run
Print commands that would be executed without running them.
make -n install
-B, --always-make
Unconditionally build all targets, ignoring timestamps.
make -B
-C
Change to a directory before doing anything.
make -C src/
make -C /path/to/project clean
-k, --keep-going
Continue building other targets even if one fails.
make -k all
-s, --silent
Don't print the commands as they are executed.
make -s build
VAR=value
Override a makefile variable from the command line.
make CC=clang
make PREFIX=/usr/local install
-e
Give environment variables priority over makefile variables.
make -e
--debug
Print extra debugging info about make's decisions.
make --debug=basic