Make (most commonly GNU Make today) is a build automation tool originally created at Bell Labs in 1976, now maintained as a free/open-source GNU project. It ranks #10 among build/dev tools in developer usage surveys at roughly 23.2% share, making it one of the oldest tools still in everyday use. Developers use it because it reads a plain-text "Makefile" describing targets, their file dependencies, and the shell commands to build them โ then only rebuilds what actually changed, saving time on large C/C++ and scripting projects.
A Makefile defines targets, the files they depend on, and the shell command to run when those dependencies are newer than the target.
# Makefile โ build a C program only when sources change
CC = gcc
CFLAGS = -Wall -O2
app: main.o utils.o
$(CC) $(CFLAGS) -o app main.o utils.o
main.o: main.c utils.h
$(CC) $(CFLAGS) -c main.c
utils.o: utils.c utils.h
$(CC) $(CFLAGS) -c utils.c
.PHONY: clean
clean:
rm -f *.o app
Make ships with most Linux/macOS toolchains already; on Windows it's usually installed alongside a build toolchain like MinGW or via WSL.
# Debian/Ubuntu
sudo apt install build-essential
# check it's installed
make --version
# run the default target in the current directory's Makefile
make