aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-03-04 18:01:45 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-03-04 18:01:45 +0200
commita890b593c617e26935252f90f62b1be35759907f (patch)
tree8a2bc8d0425791b3afca898853b541ab7625b8fd
parentpass cpu_state_t to interrupt handler (diff)
downloadkernel.cpp-a890b593c617e26935252f90f62b1be35759907f.tar.xz
Add makefile notes
-rw-r--r--doc/makefiles.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/makefiles.md b/doc/makefiles.md
new file mode 100644
index 0000000..cb00c96
--- /dev/null
+++ b/doc/makefiles.md
@@ -0,0 +1,19 @@
+# How to write makefiles
+and useful notes on understanding them
+
+## Manual
+[gnu](https://www.gnu.org/software/make/manual/html_node/index.html)
+
+## [Variables](https://www.gnu.org/software/make/manual/html_node/Setting.html)
+:= expanded variable, right-hand side can contain variables
+?= only set if it doesn't have a value
+!= execute a shell script on the right-hand side and assign its result to the left-hand side
+
+## Targets
+$@ is target
+$< is first dependency
+$^ is all dependencies
+
+## Dependencies
+Use compiled -MMD switch to create rules (.d files)
+Include .d files for targets using -include (include if available)