GNU Make 4 · Rules and targets

Write a clean target

Remove build outputs. The leading minus ignores errors, such as files that don't exist.

clean:
	-rm -f app *.o

Official GNU Make 4 documentation

More rules and targets commands

All rules and targets commands · GNU Make 4 cheatsheet

Was this page helpful?