Makefile Cheat Sheet/Run default target

Run make using the default makefile and first target.

Section: Core make commands

Run default target

bash
bash
make
Explanation

Reads `GNUmakefile`, `makefile`, or `Makefile` and builds the default goal.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Core make commands
Build a specific target
Run a named target from the makefile.
OpenIn sheetbashsame section
Use a specific makefile
Choose a file other than the default makefile names.
OpenIn sheetbashsame section
Run make in another directory
Change directory before reading the makefile.
OpenIn sheetbashsame section
Parallel build
Build using multiple jobs.
OpenIn sheetbashsame section
Dry run
Print commands without executing them.
OpenIn sheetbashsame section
Touch targets only
Mark targets as updated without running recipes.
OpenIn sheetbashsame section