Permalink
Browse files

Remove all Makefiles from the keyboards directory. (#1660)

* Remove all Makefiles from the keyboards directory.

* update keymaps added in the last 8 days

* Ignore keyboard/keymap makefiles

* update hand_wire to reflect our new Makefile-less reality

* Update the make guide to reflect the new reality

* move planck keymap options to rules.mk

* update planck keymaps 4real

* trigger travis

* add back build_keyboard.mk

* restore changes to build_keyboard
  • Loading branch information...
skullydazed authored and jackhumbert committed Sep 8, 2017
1 parent cf8e105 commit 4cdcbdb861589ae23902d0e9cadcf27453623a79
Showing with 4,078 additions and 210 deletions.
  1. +3 −0 .gitignore
  2. +6 −4 Makefile
  3. +2 −3 build_keyboard.mk
  4. +9 −39 docs/getting_started_make_guide.md
  5. +2 −2 docs/hand_wire.md
  6. 0 keyboards/{lets_split/keymaps/henxing/Makefile → 9key/keymaps/default/rules.mk}
  7. +27 −0 keyboards/amj40/keymaps/default/rules.mk
  8. +27 −0 keyboards/amj40/keymaps/fabian/rules.mk
  9. +23 −0 keyboards/amj60/keymaps/iso_split_rshift/rules.mk
  10. +15 −0 keyboards/atomic/keymaps/pvc/rules.mk
  11. +4 −0 keyboards/atreus62/keymaps/atreus52/rules.mk
  12. +5 −0 keyboards/atreus62/keymaps/mneme/rules.mk
  13. +37 −0 keyboards/bananasplit/keymaps/0010/rules.mk
  14. +37 −0 keyboards/bananasplit/keymaps/coloneljesus/rules.mk
  15. +37 −0 keyboards/bananasplit/keymaps/default/rules.mk
  16. +1 −0 keyboards/chibios_test/subproject.mk
  17. +2 −0 keyboards/clueboard/keymaps/bloodlvst/rules.mk
  18. +9 −0 keyboards/clueboard/keymaps/magicmonty/rules.mk
  19. 0 keyboards/{mitosis/keymaps/carvac_dv/Makefile → clueboard/keymaps/mouse_keys/rules.mk}
  20. +4 −0 keyboards/clueboard/keymaps/serubin/rules.mk
  21. +1 −0 keyboards/clueboard/keymaps/tetris/rules.mk
  22. +49 −0 keyboards/clueboard/keymaps/xyverz/rules.mk
  23. +0 −3 keyboards/clueboard/rev3/Makefile
  24. +0 −82 keyboards/clueboard/rules.mk
  25. +1 −0 keyboards/clueboard/subproject.mk
  26. +21 −0 keyboards/cluecard/keymaps/default/rules.mk
  27. +21 −0 keyboards/cluecard/keymaps/rgb_effects/rules.mk
  28. +22 −0 keyboards/converter/ibm_terminal/keymaps/default/rules.mk
  29. +22 −0 keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk
  30. +7 −0 keyboards/deltasplit75/keymaps/itsaferbie/rules.mk
  31. +1 −0 keyboards/deltasplit75/subproject.mk
  32. +25 −0 keyboards/eco/keymaps/default/rules.mk
  33. +25 −0 keyboards/eco/keymaps/that_canadian/rules.mk
  34. +1 −0 keyboards/eco/subproject.mk
  35. +9 −0 keyboards/ergodox_ez/keymaps/drashna-custom/rules.mk
  36. +6 −0 keyboards/ergodox_ez/keymaps/drashna/rules.mk
  37. +3 −0 keyboards/ergodox_ez/keymaps/steno/rules.mk
  38. +21 −0 keyboards/frosty_flake/keymaps/default/rules.mk
  39. +23 −0 keyboards/frosty_flake/keymaps/nikchi/rules.mk
  40. +0 −4 keyboards/frosty_flake/keymaps/tkl/{Makefile → rules.mk}
  41. +112 −0 keyboards/gh60/keymaps/dbroqua/rules.mk
  42. +111 −0 keyboards/gh60/keymaps/dbroqua_7U/rules.mk
  43. +112 −0 keyboards/gh60/keymaps/robotmaxtron/rules.mk
  44. +3 −0 keyboards/gh60/keymaps/sethbc/rules.mk
  45. +29 −0 keyboards/gherkin/keymaps/mjt/rules.mk
  46. +16 −0 keyboards/gherkin/keymaps/steno/rules.mk
  47. +6 −0 keyboards/gherkin/keymaps/talljoe/rules.mk
  48. +21 −0 keyboards/gonnerd/keymaps/default/rules.mk
  49. +21 −0 keyboards/gonnerd/keymaps/mauin/rules.mk
  50. +21 −0 keyboards/gonnerd/keymaps/tkl/rules.mk
  51. +26 −0 keyboards/hadron/keymaps/default/rules.mk
  52. +26 −0 keyboards/hadron/keymaps/side_numpad/rules.mk
  53. +1 −0 keyboards/hadron/subproject.mk
  54. +17 −0 keyboards/handwired/MS_sculpt_mobile/keymaps/default/rules.mk
  55. +17 −0 keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/rules.mk
  56. +17 −0 keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk
  57. +17 −0 keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk
  58. +2 −0 keyboards/handwired/atreus50/keymaps/default/rules.mk
  59. +17 −0 keyboards/handwired/kbod/keymaps/default/rules.mk
  60. +21 −0 keyboards/handwired/minorca/keymaps/default/rules.mk
  61. +21 −0 keyboards/handwired/minorca/keymaps/rgb/rules.mk
  62. +17 −0 keyboards/handwired/pilcrow/keymaps/default/rules.mk
  63. +26 −0 keyboards/handwired/promethium/keymaps/priyadi/rules.mk
  64. +2 −0 keyboards/hhkb/keymaps/blakedietz/rules.mk
  65. +23 −0 keyboards/hhkb/keymaps/cinaeco/rules.mk
  66. +1 −0 keyboards/hhkb/keymaps/jp/rules.mk
  67. +1 −0 keyboards/hhkb/keymaps/jp_mac/rules.mk
  68. +1 −0 keyboards/hhkb/keymaps/rdg_jp/rules.mk
  69. +1 −0 keyboards/hhkb/keymaps/sh_jp/rules.mk
  70. +1 −0 keyboards/hhkb/keymaps/shela/rules.mk
  71. +4 −0 keyboards/infinity60/keymaps/jpetermans/rules.mk
  72. 0 keyboards/jc65/keymaps/default/rules.mk
  73. 0 keyboards/jc65/keymaps/jetpacktuxedo/rules.mk
  74. +3 −0 keyboards/jd40/keymaps/vanagon/rules.mk
  75. +15 −65 keyboards/jd45/keymaps/mjt/rules.mk
  76. +23 −0 keyboards/jd45/keymaps/mjt6u/rules.mk
  77. +25 −0 keyboards/kc60/keymaps/stanleylai/rules.mk
  78. +24 −0 keyboards/kc60/keymaps/wigguno/rules.mk
  79. +25 −0 keyboards/kc60/keymaps/ws2812/rules.mk
  80. +21 −0 keyboards/kinesis/keymaps/default/rules.mk
  81. +21 −0 keyboards/kinesis/keymaps/dvorak/rules.mk
  82. +21 −0 keyboards/kinesis/keymaps/milestogo/rules.mk
  83. +21 −0 keyboards/kinesis/keymaps/xyverz/rules.mk
  84. +1 −0 keyboards/kinesis/subproject.mk
  85. +37 −0 keyboards/kmac/keymaps/default/rules.mk
  86. +37 −0 keyboards/kmac/keymaps/winkeyless/rules.mk
  87. +25 −0 keyboards/lets_split/keymaps/OLED_sample/rules.mk
  88. +3 −0 keyboards/lets_split/keymaps/dale/rules.mk
  89. +3 −0 keyboards/lets_split/keymaps/default/rules.mk
  90. +9 −0 keyboards/lets_split/keymaps/fabian/rules.mk
  91. +5 −0 keyboards/lets_split/keymaps/hexwire/rules.mk
  92. +7 −0 keyboards/lets_split/keymaps/khord/rules.mk
  93. +7 −0 keyboards/lets_split/keymaps/mbsurfer/rules.mk
  94. +25 −0 keyboards/lets_split/keymaps/mjt/rules.mk
  95. +19 −0 keyboards/lets_split/keymaps/xk/rules.mk
  96. +1 −0 keyboards/lets_split/subproject.mk
  97. +3 −0 keyboards/m10a/keymaps/default/rules.mk
  98. +5 −0 keyboards/minidox/keymaps/that_canadian/rules.mk
  99. +1 −0 keyboards/minidox/subproject.mk
  100. +1 −0 keyboards/mitosis/keymaps/carvac_dv/rules.mk
  101. +17 −0 keyboards/mitosis/keymaps/mjt/rules.mk
  102. +21 −0 keyboards/miuni32/keymaps/adam-lee/rules.mk
  103. +21 −0 keyboards/miuni32/keymaps/default/rules.mk
  104. +21 −0 keyboards/miuni32/keymaps/ht_156/rules.mk
  105. +7 −0 keyboards/nyquist/keymaps/333fred/rules.mk
  106. +5 −0 keyboards/nyquist/keymaps/default/rules.mk
  107. +5 −0 keyboards/nyquist/keymaps/hexwire/rules.mk
  108. +1 −0 keyboards/nyquist/subproject.mk
  109. +15 −0 keyboards/org60/keymaps/boardy/rules.mk
  110. +3 −0 keyboards/orthodox/keymaps/default/rules.mk
  111. +1 −0 keyboards/orthodox/subproject.mk
  112. +22 −0 keyboards/pegasushoof/keymaps/blowrak/rules.mk
  113. +22 −0 keyboards/pegasushoof/keymaps/default/rules.mk
  114. +37 −0 keyboards/phantom/keymaps/default/rules.mk
  115. +37 −0 keyboards/phantom/keymaps/rgbmod/rules.mk
  116. +63 −0 keyboards/planck/keymaps/ab/rules.mk
  117. +25 −0 keyboards/planck/keymaps/alexey/rules.mk
  118. +25 −0 keyboards/planck/keymaps/angerthosenear/rules.mk
  119. +25 −0 keyboards/planck/keymaps/austin/rules.mk
  120. +25 −0 keyboards/planck/keymaps/basic/rules.mk
  121. +23 −0 keyboards/planck/keymaps/bone2planck/rules.mk
  122. +2 −1 keyboards/planck/keymaps/brandon/{Makefile → rules.mk}
  123. +25 −0 keyboards/planck/keymaps/callum/rules.mk
  124. +26 −0 keyboards/planck/keymaps/cbbrowne/rules.mk
  125. +6 −0 keyboards/planck/keymaps/chance/rules.mk
  126. +25 −0 keyboards/planck/keymaps/charlie/rules.mk
  127. +25 −0 keyboards/planck/keymaps/circuit/rules.mk
  128. +3 −0 keyboards/planck/keymaps/coloneljesus/rules.mk
  129. +25 −0 keyboards/planck/keymaps/dale/rules.mk
  130. +25 −0 keyboards/planck/keymaps/daniel/rules.mk
  131. +25 −0 keyboards/planck/keymaps/david/rules.mk
  132. +1 −0 keyboards/planck/keymaps/default/keymap.c
  133. +3 −0 keyboards/planck/keymaps/default/rules.mk
  134. +13 −0 keyboards/planck/keymaps/dshields/rules.mk
  135. +25 −0 keyboards/planck/keymaps/dzobert/rules.mk
  136. +63 −0 keyboards/planck/keymaps/espynn/rules.mk
  137. +27 −0 keyboards/planck/keymaps/experimental/rules.mk
  138. +25 −0 keyboards/planck/keymaps/gabriel/rules.mk
  139. +74 −0 keyboards/planck/keymaps/handwired_binaryplease/rules.mk
  140. +27 −0 keyboards/planck/keymaps/impossible/rules.mk
  141. +25 −0 keyboards/planck/keymaps/jacob/rules.mk
  142. +27 −0 keyboards/planck/keymaps/jeebak/rules.mk
  143. +27 −0 keyboards/planck/keymaps/jhenahan/rules.mk
  144. +28 −0 keyboards/planck/keymaps/joe/rules.mk
  145. +25 −0 keyboards/planck/keymaps/johannes/rules.mk
  146. +2 −0 keyboards/planck/keymaps/khord/{Makefile → rules.mk}
  147. +25 −0 keyboards/planck/keymaps/kyle/rules.mk
  148. +23 −0 keyboards/planck/keymaps/lae3/rules.mk
  149. +28 −0 keyboards/planck/keymaps/leo/rules.mk
  150. +28 −0 keyboards/planck/keymaps/lucas/rules.mk
  151. +25 −0 keyboards/planck/keymaps/lukas/rules.mk
  152. +25 −0 keyboards/planck/keymaps/luke/rules.mk
  153. +25 −0 keyboards/planck/keymaps/max/rules.mk
  154. +5 −0 keyboards/planck/keymaps/mitch/rules.mk
  155. +3 −0 keyboards/planck/keymaps/mjt/rules.mk
  156. +3 −0 keyboards/planck/keymaps/mjtnumsym/rules.mk
  157. +28 −0 keyboards/planck/keymaps/mollat/rules.mk
  158. +28 −0 keyboards/planck/keymaps/nico/rules.mk
  159. +3 −0 keyboards/planck/keymaps/originerd/rules.mk
  160. +15 −0 keyboards/planck/keymaps/pete/rules.mk
  161. +10 −0 keyboards/planck/keymaps/piemod/rules.mk
  162. +28 −0 keyboards/planck/keymaps/premek/rules.mk
  163. +26 −0 keyboards/planck/keymaps/priyadi/rules.mk
  164. +27 −0 keyboards/planck/keymaps/pvc/rules.mk
  165. +25 −0 keyboards/planck/keymaps/rai-suta/rules.mk
  166. +29 −0 keyboards/planck/keymaps/sgoodwin/rules.mk
  167. +3 −0 keyboards/planck/keymaps/smt/rules.mk
  168. +8 −0 keyboards/planck/keymaps/steno/rules.mk
  169. +28 −0 keyboards/planck/keymaps/tak3over/rules.mk
  170. +29 −0 keyboards/planck/keymaps/thermal_printer/rules.mk
  171. +62 −0 keyboards/planck/keymaps/tong92/rules.mk
  172. +11 −0 keyboards/planck/keymaps/unicode/rules.mk
  173. +25 −0 keyboards/planck/keymaps/vifon/rules.mk
  174. +6 −0 keyboards/planck/keymaps/xyverz/rules.mk
  175. +25 −0 keyboards/planck/keymaps/yale/rules.mk
  176. +10 −0 keyboards/planck/keymaps/yang/rules.mk
  177. +29 −0 keyboards/planck/keymaps/zach/rules.mk
  178. +1 −0 keyboards/planck/subproject.mk
  179. +21 −0 keyboards/preonic/keymaps/0xdec/rules.mk
  180. +25 −0 keyboards/preonic/keymaps/dale/rules.mk
  181. +3 −0 keyboards/preonic/keymaps/default/rules.mk
  182. +20 −0 keyboards/preonic/keymaps/jacwib/rules.mk
  183. +27 −0 keyboards/preonic/keymaps/kinesis/rules.mk
  184. +3 −0 keyboards/preonic/keymaps/nikchi/rules.mk
  185. +3 −0 keyboards/preonic/keymaps/smt/rules.mk
  186. +23 −0 keyboards/preonic/keymaps/xyverz/rules.mk
  187. +29 −0 keyboards/preonic/keymaps/zach/rules.mk
  188. 0 keyboards/{tv44/keymaps/jetpacktuxedo/Makefile → roadkit/keymaps/default/rules.mk}
  189. +21 −0 keyboards/roadkit/keymaps/flipphone/rules.mk
  190. +21 −0 keyboards/roadkit/keymaps/mjt/rules.mk
  191. +21 −0 keyboards/roadkit/keymaps/singles/rules.mk
  192. +22 −0 keyboards/roadkit/keymaps/singlesBrent/rules.mk
  193. +21 −0 keyboards/s60_x/keymaps/ansi_qwertz/rules.mk
  194. +18 −0 keyboards/s60_x/keymaps/bluebear/rules.mk
  195. +1 −0 keyboards/s60_x/subproject.mk
  196. +24 −0 keyboards/satan/keymaps/admiralStrokers/rules.mk
  197. +21 −0 keyboards/satan/keymaps/ben_iso/rules.mk
  198. +21 −0 keyboards/satan/keymaps/colemak/rules.mk
  199. +21 −0 keyboards/satan/keymaps/default/rules.mk
  200. +20 −0 keyboards/satan/keymaps/denolfe/rules.mk
  201. +16 −0 keyboards/satan/keymaps/iso_split_rshift/rules.mk
  202. +21 −0 keyboards/satan/keymaps/midi/rules.mk
  203. +21 −0 keyboards/satan/keymaps/sethbc/rules.mk
  204. +21 −0 keyboards/satan/keymaps/smt/rules.mk
  205. +21 −0 keyboards/satan/keymaps/unxmaal/rules.mk
  206. +21 −0 keyboards/tada68/keymaps/default/rules.mk
  207. +22 −0 keyboards/tada68/keymaps/maartenwut/rules.mk
  208. +21 −0 keyboards/tada68/keymaps/rgb/rules.mk
  209. +21 −0 keyboards/tiger_lily/keymaps/default/rules.mk
  210. +12 −0 keyboards/tv44/keymaps/belak/rules.mk
  211. +3 −0 keyboards/tv44/keymaps/core/rules.mk
  212. +21 −0 keyboards/tv44/keymaps/default/rules.mk
  213. +21 −0 keyboards/tv44/keymaps/jeebak/rules.mk
  214. +17 −0 keyboards/tv44/keymaps/jetpacktuxedo/rules.mk
  215. +21 −0 keyboards/tv44/keymaps/mjt/rules.mk
  216. +21 −0 keyboards/tv44/keymaps/smt/rules.mk
  217. +21 −0 keyboards/tv44/keymaps/tong92/rules.mk
  218. +21 −0 keyboards/tv44/keymaps/xyverz/rules.mk
  219. +21 −0 keyboards/vision_division/keymaps/default/rules.mk
  220. +5 −0 keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk
  221. +18 −0 keyboards/xd75/keymaps/default/rules.mk
  222. +37 −0 keyboards/xd75/keymaps/fabian/rules.mk
  223. +1 −1 lib/chibios
  224. +14 −6 quantum/template/readme.md
View
@@ -24,6 +24,9 @@ CMakeLists.txt
.DS_STORE
/util/wsl_downloaded
/util/win_downloaded
/keyboards/*/Makefile
/keyboards/*/*/Makefile
/keyboards/*/keymaps/Makefile
# Eclipse/PyCharm/Other IDE Settings
.cproject
View
@@ -89,7 +89,7 @@ ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
endif
# Only consider folders with makefiles, to prevent errors in case there are extra folders
KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
KEYBOARDS := $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk)))
#Compatibility with the old make variables, anything you specify directly on the command line
# always overrides the detected folders
@@ -261,7 +261,7 @@ endef
define PARSE_KEYBOARD
CURRENT_KB := $1
# A subproject is any keyboard subfolder with a makefile
SUBPROJECTS := $$(notdir $$(patsubst %/Makefile,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/*/Makefile)))
SUBPROJECTS := $$(notdir $$(patsubst %/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/*/rules.mk)))
# if the rule starts with allsp, then continue with looping over all subprojects
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allsp),true)
$$(eval $$(call PARSE_ALL_SUBPROJECTS))
@@ -300,7 +300,9 @@ define PARSE_SUBPROJECT
endif
ifeq ($$(CURRENT_SP),defaultsp)
SUBPROJECT_DEFAULT=
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/Makefile)
ifneq ("$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/subproject.mk)","")
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/subproject.mk)
endif
CURRENT_SP := $$(SUBPROJECT_DEFAULT)
endif
# If current subproject is empty (the default was not defined), and we have a list of subproject
@@ -503,7 +505,7 @@ if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
endef
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
SUBPROJECTS := $(notdir $(patsubst %/rules.mk,%,$(wildcard ./*/rules.mk)))
.PHONY: $(SUBPROJECTS)
$(SUBPROJECTS): %: %-allkm
View
@@ -91,11 +91,11 @@ MAIN_KEYMAP_C := $(MAIN_KEYMAP_PATH)/keymap.c
SUBPROJ_KEYMAP_PATH := $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
SUBPROJ_KEYMAP_C := $(SUBPROJ_KEYMAP_PATH)/keymap.c
ifneq ("$(wildcard $(SUBPROJ_KEYMAP_C))","")
-include $(SUBPROJ_KEYMAP_PATH)/Makefile
-include $(SUBPROJ_KEYMAP_PATH)/rules.mk
KEYMAP_C := $(SUBPROJ_KEYMAP_C)
KEYMAP_PATH := $(SUBPROJ_KEYMAP_PATH)
else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","")
-include $(MAIN_KEYMAP_PATH)/Makefile
-include $(MAIN_KEYMAP_PATH)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_C)
KEYMAP_PATH := $(MAIN_KEYMAP_PATH)
else ifneq ($(LAYOUTS),)
@@ -181,4 +181,3 @@ build: elf hex
include $(TMK_PATH)/rules.mk
@@ -1,8 +1,6 @@
# More detailed make instruction
The full syntax of the `make` command is the following, but parts of the command can be left out if you run it from other directories than the `root` (as you might already have noticed by reading the simple instructions).
`<keyboard>-<subproject>-<keymap>-<target>`, where:
The full syntax of the `make` command is `<keyboard>-<subproject>-<keymap>-<target>`, where:
* `<keyboard>` is the name of the keyboard, for example `planck`
* Use `allkb` to compile all keyboards
@@ -14,24 +12,13 @@ The full syntax of the `make` command is the following, but parts of the command
* Use `allkm` to compile all keymaps
* `<target>` will be explained in more detail below.
**Note:** When you leave some parts of the command out, you should also remove the dash (`-`).
As mentioned above, there are some shortcuts, when you are in a:
* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
* Note in order to support this shortcut, the keymap needs its own Makefile
* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
The `<target>` means the following
* If no target is given, then it's the same as `all` below
* `all` compiles the keyboard and generates a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests.
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for Infinity keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. **Note** that some operating systems needs root access for these commands to work, so in that case you need to run for example `sudo make dfu`.
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck-rev4-default-all` will generate a single .hex, while `make planck-rev-all` will generate a hex for every keymap available to the planck.
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck-rev4-default-dfu`.
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
Some other targets are supported but, but not important enough to be documented here. Check the source code of the make files for more information.
You can also add extra options at the end of the make command line, after the target
* `make COLOR=false` - turns off color output
@@ -44,25 +31,10 @@ The make command itself also has some additional options, type `make --help` for
Here are some examples commands
* `make allkb-allsp-allkm` builds everything (all keyboards, all subprojects, all keymaps). Running just `make` from the `root` will also run this.
* `make` from within a `keyboard` directory, is the same as `make keyboard-allsp-allkm`, which compiles all subprojects and keymaps of the keyboard. **NOTE** that this behaviour has changed. Previously it compiled just the default keymap.
* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard. This example uses the full syntax and can be run from any folder with a `Makefile`
* `make dfu COLOR=false` from within a keymap folder, builds and uploads the keymap, but without color output.
# The `Makefile`
* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard.
* `make planck-rev4-default-dfu COLOR=false` builds and uploads the keymap without color output.
There are 5 different `make` and `Makefile` locations:
* root (`/`)
* keyboard (`/keyboards/<keyboard>/`)
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
* subproject (`/keyboards/<keyboard>/<subproject>`)
* subproject keymap (`/keyboards/<keyboard>/<subproject>/keymaps/<keymap>`)
The root contains the code used to automatically figure out which keymap or keymaps to compile based on your current directory and commandline arguments. It's considered stable, and shouldn't be modified. The keyboard one will contain the MCU set-up and default settings for your keyboard, and shouldn't be modified unless you are the producer of that keyboard. The keymap Makefile can be modified by users, and is optional. It is included automatically if it exists. You can see an example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk) - the last few lines are the most important. The settings you set here will override any defaults set in the keyboard Makefile. **The file is required if you want to run `make` in the keymap folder.**
For keyboards and subprojects, the make files are split in two parts `Makefile` and `rules.mk`. All settings can be found in the `rules.mk` file, while the `Makefile` is just there for support and including the root `Makefile`. Keymaps contain just one `Makefile` for simplicity.
## Makefile options
## `rules.mk` options
Set these variables to `no` to disable them, and `yes` to enable them.
@@ -164,8 +136,6 @@ This enables [key lock](key_lock.md). This consumes an additional 260 bytes.
## Customizing Makefile options on a per-keymap basis
If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard.
So let's say your keyboard's makefile has `BACKLIGHT_ENABLE = yes` (or maybe doesn't even list the `BACKLIGHT_ENABLE` option, which would cause it to be off). You want your particular keymap to not have the debug console, so you make a file called `Makefile` and specify `BACKLIGHT_ENABLE = no`.
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
You can use the `docs/keymap_makefile_example.md` as a template/starting point.
So let's say your keyboard's `rules.mk` has `BACKLIGHT_ENABLE = yes`. You want your particular keyboard to not have the backlight, so you make a file called `rules.mk` and specify `BACKLIGHT_ENABLE = no`.
View
@@ -271,9 +271,9 @@ This would require our `KEYMAP` definition to look like this:
Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
### keymaps/default.c
### keymaps/<variant>/default.c
This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired-<keyboard>-<variant>`, which will pull `keymaps/<variant>/keymap.c`.
The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
@@ -0,0 +1,27 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
@@ -0,0 +1,27 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
@@ -0,0 +1,23 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
@@ -0,0 +1,15 @@
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
@@ -0,0 +1,4 @@
NKRO_ENABLE = true
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
@@ -0,0 +1,5 @@
TAP_DANCE_ENABLE = yes
NKRO_ENABLE = true
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
@@ -0,0 +1,37 @@
# Copyright 2017 Balz Guenat
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# QMK Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
# EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
# CONSOLE_ENABLE = no # Console for debug(+400)
# COMMAND_ENABLE = yes # Commands for debug and configuration
# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
# AUDIO_ENABLE = no # Audio output on port C6
# UNICODE_ENABLE = no # Unicode
# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
@@ -0,0 +1,37 @@
# Copyright 2017 Balz Guenat
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# QMK Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
# EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
# CONSOLE_ENABLE = no # Console for debug(+400)
# COMMAND_ENABLE = yes # Commands for debug and configuration
# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
# AUDIO_ENABLE = no # Audio output on port C6
# UNICODE_ENABLE = no # Unicode
# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
Oops, something went wrong.

0 comments on commit 4cdcbdb

Please sign in to comment.