From ec967225b749d016b47dc9e530acb340e544d362 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Mon, 4 Dec 2023 03:22:53 +0100 Subject: Modify and add make tips --- makefile.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/makefile.md b/makefile.md index 0499a4d..50b5aae 100644 --- a/makefile.md +++ b/makefile.md @@ -14,10 +14,17 @@ Details: * `$@`: current target * `$<`: first prerequisite * `$^`: all prerequisites, separated by spaces +* `$*`: target without extension * `$(@F)`: file-within-directory part of target path More: +## C-related flags + +* `CC`: C compiler +* `CFLAGS`: flags for `CC` +* `LDFLAGS`: flags for the linker + ## Text functions * `$(var:suffix=replacement)`, syntax sugar for @@ -29,6 +36,12 @@ More: -## Quiet commands +## Recipes + +* `@`: don't print command ran +* `-`: don't exit on command failure + +## Arguments + +* `-B, --always-make`: force to make all targets -By default, `make` prints the command being run. Prepend `@` to silence this. -- cgit v1.2.3