Makefile Cheat Sheet
Comprehensive GNU make and Makefile reference covering targets, prerequisites, recipes, variables, includes, conditionals, pattern rules, and command-line usage.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Core make commands
## Targets, prerequisites, and recipes
## Variables and assignment
## Includes and conditionals
## Special targets and behavior control
More in Makefile
Makefile Recipes for Real Projects
Production-oriented Makefile targets for apps, Docker, Terraform, Python, Node, Go, and deployment workflows.
Makefile Debugging, Parallelism & CI
Debug make behavior, inspect variables, run parallel builds safely, and build reliable CI targets.
Makefile Portable POSIX Patterns
Portable makefile patterns that work across POSIX make environments, avoiding GNU-only features when needed.
Makefile Functions & Text Processing
GNU make text, path, conditional, shell, and metaprogramming functions with practical examples.
Makefile Pattern Rules & Dependency Generation
Pattern rules, wildcarding, implicit rules, static pattern rules, and generated dependency files in GNU make.