Allow users to customize toolchain choices.
Section: Portable make basics
Override variables from CLI
bash
bash
make CC=clang CFLAGS='-O0 -g'Explanation
Command-line macro assignments are part of standard make usage.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Portable make basics
Use standard macros
Honor user-overridable standard compiler variables.
POSIX-style portable rule
Write simple, explicit file rules compatible with standard make.
Suffix rule
Use classic suffix rules when targeting very portable make implementations.
Use shell short-circuit safely
Stop on failure explicitly within one recipe line.