summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2020-03-30 05:00:47 +0900
committerGitHub <noreply@github.com>2020-03-29 13:00:47 -0700
commitdc98d44582eac7b4bcdafc21e5c43814aa7959ab (patch)
treea2fd450a0f70742712b7d4335439a86d5d67778a
parentdefa1a1dc770c616b6cc79d9df7012e7f0af83a2 (diff)
[Docs] added the description of the reading order of the rules.mk files. (#8566)
* added the description of the reading order of the rules.mk files. * Update docs/hardware_keyboard_guidelines.md Co-Authored-By: Ryan <fauxpark@gmail.com> * Update docs/hardware_keyboard_guidelines.md Co-Authored-By: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--docs/hardware_keyboard_guidelines.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md
index 4d893074eb..a862bc0ca8 100644
--- a/docs/hardware_keyboard_guidelines.md
+++ b/docs/hardware_keyboard_guidelines.md
@@ -116,6 +116,21 @@ The `post_config.h` file can be used for additional post-processing, depending o
The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features.
+The `rules.mk` file can also be placed in a sub-folder, and its reading order is as follows:
+
+* `keyboards/top_folder/rules.mk`
+ * `keyboards/top_folder/sub_1/rules.mk`
+ * `keyboards/top_folder/sub_1/sub_2/rules.mk`
+ * `keyboards/top_folder/sub_1/sub_2/sub_3/rules.mk`
+ * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk`
+ * `keyboards/top_folder/keymaps/a_keymap/rules.mk`
+ * `users/a_user_folder/rules.mk`
+* `common_features.mk`
+
+Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options.
+
+?> See `build_keyboard.mk` and `common_features.mk` for more details.
+
### `<keyboard_name.c>`
This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank.