m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile.md17
1 files 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: <https://www.gnu.org/software/make/manual/html_node/Pattern-Rules.html>
* `$@`: current target
* `$<`: first prerequisite
* `$^`: all prerequisites, separated by spaces
+* `$*`: target without extension
* `$(@F)`: file-within-directory part of target path
More: <https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html>
+## 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: <https://www.gnu.org/software/make/manual/html_node/Text-Functions.html>
<https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html>
-## Quiet commands
+## Recipes
+
+* `@<command>`: don't print command ran
+* `-<command>`: 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.