Advertisement

Makefile Syntax

target: dependencies
	commands

Example Makefile

build:
	gcc -o program main.c

clean:
	rm -f program

all: build

Running

make
make target
make -f custom.mk
Advertisement
Last updated: January 2026
Advertisement