Makefile

What is a .makefile file?

Makefiles define build rules and task automation — the original build system, still essential in C/C++ and beyond.

Use caution
Type Code
By Stuart Feldman (Bell Labs)
MIME text/x-makefile

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

Make is the granddaddy of build systems. Created in 1976, it defines targets, dependencies, and commands — if file A depends on file B and file B changed, rebuild file A. This dependency-driven approach is so fundamentally sound that every modern build tool (Gradle, CMake, Bazel) is essentially Make with more features.

The syntax is deceptively simple: targets on the left, dependencies after a colon, commands indented with a tab (not spaces — this matters, and it's caused rage for decades). A well-written Makefile reads like a recipe: `make build` compiles your code, `make test` runs tests, `make clean` removes build artifacts.

Beyond C/C++ compilation, Makefiles are popular as task runners for any project. Python projects, Go projects, and even JavaScript projects use Makefiles as a universal `make deploy`, `make lint`, `make docker-build` interface. The tool is pre-installed on every Unix system and available via MinGW/MSYS on Windows.

Technical details
Full Name
Makefile
MIME Type
text/x-makefile
Developer
Stuart Feldman (Bell Labs)
Magic Bytes
N/A
Safety
.makefile requires caution. Contains shell commands that execute when you run `make`. Review before running.
What opens it
VS Code
FREE Windows / Mac / Linux
Any text editor
FREE Windows / Mac / Linux
FAQ
Why do Makefiles require tabs instead of spaces?
A quirk from 1976 — Stuart Feldman chose tabs for command indentation and later said he didn't change it because too many users already depended on the behaviour. It's caused frustration for 50 years.
Can I use Makefiles for non-C projects?
Yes. Makefiles work as general-purpose task runners for any project. Many Python, Go, and JavaScript projects use Makefiles for common commands like `make build`, `make test`, `make deploy`.
Related formats