Skip to content
systemcoding.dev

Tag

make

7 posts

Flat illustration of source code passing through a compiler and linker into a binary, with the GNU, LLVM and C++ logos.
Toolchains

Use .PHONY Targets Correctly in Makefiles

Declare clean, all and test as .PHONY so a file with the same name cannot stop them, and learn phony prerequisites, subdirectory loops and force rules.

6 min read
Flat illustration of source code passing through a compiler and linker into a binary, with the C, GNU and LLVM logos.
Toolchains

Write Your First Makefile for a C Program

Write a working Makefile for a small C program with a compiler variable, flags, object files and a clean target, and see how make decides what to rebuild.

6 min read