diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-10-14 11:32:19 -1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-14 11:32:19 -1000 |
commit | 800ec55dfca06b4630acf62cbb5f130c4031e4f1 (patch) | |
tree | 718e43d976bc71627558b5f9e1b657e8a64e4131 /docs/feature_layouts.md | |
parent | e5dc2253e26a105a11e0fad3e4e39c306e49cc92 (diff) | |
download | qmk_firmware-800ec55dfca06b4630acf62cbb5f130c4031e4f1.tar.gz qmk_firmware-800ec55dfca06b4630acf62cbb5f130c4031e4f1.zip |
Make arguments redo, subproject elimination (#1784)
* redo make args to use colons, better folder structuring system [skip ci]
* don't put spaces after statements - hard lessons in makefile development
* fix-up some other rules.mk
* give travis a chance
* reset KEYMAPS variable
* start converting keyboards to new system
* try making all with travis
* redo make args to use colons, better folder structuring system [skip ci]
* don't put spaces after statements - hard lessons in makefile development
* fix-up some other rules.mk
* give travis a chance
* reset KEYMAPS variable
* start converting keyboards to new system
* try making all with travis
* start to update readmes and keyboards
* look in keyboard directories for board.mk
* update visualizer rules
* fix up some other keyboards/keymaps
* fix arm board ld includes
* fix board rules
* fix up remaining keyboards
* reset layout variable
* reset keyboard_layouts
* fix remainging keymaps/boards
* update readmes, docs
* add note to makefile error
* update readmes
* remove planck keymap warnings
* update references and docs
* test out tarvis build stages
* don't use stages for now
* don't use stages for now
Diffstat (limited to 'docs/feature_layouts.md')
-rw-r--r-- | docs/feature_layouts.md | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index 4d75270dc..5763b7380 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md | |||
@@ -43,15 +43,15 @@ The folder name must be added to the keyboard's `rules.mk`: | |||
43 | 43 | ||
44 | LAYOUTS = 60_ansi | 44 | LAYOUTS = 60_ansi |
45 | 45 | ||
46 | `LAYOUTS` can be appended in the subproject's `rules.mk`: | 46 | `LAYOUTS` can be set in any keyboard folder level's `rules.mk`: |
47 | 47 | ||
48 | LAYOUTS += 60_iso | 48 | LAYOUTS = 60_iso |
49 | 49 | ||
50 | but the `LAYOUT_<layout>` variable must be defined in `<subproject>.h` as well. | 50 | but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well. |
51 | 51 | ||
52 | ## Tips for making layouts keyboard-agnostic | 52 | ## Tips for making layouts keyboard-agnostic |
53 | 53 | ||
54 | Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<subproject>.h` should not be included here) file that is being compiled: | 54 | Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled: |
55 | 55 | ||
56 | #include QMK_KEYBOARD_H | 56 | #include QMK_KEYBOARD_H |
57 | 57 | ||
@@ -61,17 +61,16 @@ In your config.h, you can also use this variable to include the keyboard's `conf | |||
61 | 61 | ||
62 | If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement: | 62 | If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement: |
63 | 63 | ||
64 | * `KEYBOARD_<keyboard>` | 64 | * `KEYBOARD_<folder1>_<folder2>` |
65 | * `SUBPROJECT_<subproject>` | ||
66 | 65 | ||
67 | For example: | 66 | For example: |
68 | 67 | ||
69 | ```c | 68 | ```c |
70 | #ifdef KEYBOARD_planck | 69 | #ifdef KEYBOARD_planck |
71 | #ifdef SUBPROJECT_rev4 | 70 | #ifdef KEYBOARD_planck_rev4 |
72 | planck_rev4_function(); | 71 | planck_rev4_function(); |
73 | #endif | 72 | #endif |
74 | #endif | 73 | #endif |
75 | ``` | 74 | ``` |
76 | 75 | ||
77 | Note that the names are lowercase and match the folder/file names for the keyboard/subproject exactly. \ No newline at end of file | 76 | Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly. \ No newline at end of file |