]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge branch 'master' into makefile_overhaul
authorFred Sundvik <fsundvik@gmail.com>
Tue, 23 Aug 2016 06:38:05 +0000 (09:38 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Tue, 23 Aug 2016 06:38:05 +0000 (09:38 +0300)
110 files changed:
.travis.yml
Makefile
build_keyboard.mk [new file with mode: 0644]
keyboards/alps64/Makefile
keyboards/alps64/rules.mk [new file with mode: 0644]
keyboards/amj60/Makefile
keyboards/amj60/rules.mk [new file with mode: 0644]
keyboards/arrow_pad/Makefile
keyboards/arrow_pad/readme.md
keyboards/arrow_pad/rules.mk [new file with mode: 0644]
keyboards/atomic/Makefile
keyboards/atomic/readme.md
keyboards/atomic/rules.mk [new file with mode: 0644]
keyboards/atreus/Makefile
keyboards/atreus/readme.md
keyboards/atreus/rules.mk [new file with mode: 0644]
keyboards/bantam44/Makefile
keyboards/bantam44/readme.md
keyboards/bantam44/rules.mk [new file with mode: 0644]
keyboards/chibios_test/Makefile
keyboards/chibios_test/rules.mk [new file with mode: 0644]
keyboards/chibios_test/stm32_f072_onekey/Makefile
keyboards/chibios_test/stm32_f072_onekey/rules.mk [new file with mode: 0644]
keyboards/chibios_test/stm32_f103_onekey/Makefile
keyboards/chibios_test/stm32_f103_onekey/rules.mk [new file with mode: 0644]
keyboards/chibios_test/teensy_lc_onekey/Makefile
keyboards/chibios_test/teensy_lc_onekey/rules.mk [new file with mode: 0644]
keyboards/clueboard/Makefile
keyboards/clueboard/readme.md
keyboards/clueboard/rev1/Makefile
keyboards/clueboard/rev1/rules.mk [new file with mode: 0644]
keyboards/clueboard/rev2/Makefile
keyboards/clueboard/rev2/rules.mk [new file with mode: 0644]
keyboards/clueboard/rules.mk [new file with mode: 0644]
keyboards/cluecard/Makefile
keyboards/cluecard/readme.md
keyboards/cluecard/rules.mk [new file with mode: 0644]
keyboards/cluepad/Makefile
keyboards/cluepad/rules.mk [new file with mode: 0644]
keyboards/ergodox/Makefile
keyboards/ergodox/ez/Makefile
keyboards/ergodox/ez/rules.mk [new file with mode: 0644]
keyboards/ergodox/infinity/Makefile
keyboards/ergodox/infinity/rules.mk [new file with mode: 0644]
keyboards/ergodox/readme.md
keyboards/ergodox/rules.mk [new file with mode: 0644]
keyboards/gh60/Makefile
keyboards/gh60/readme.md
keyboards/gh60/rules.mk [new file with mode: 0644]
keyboards/handwired/CMD60/Makefile
keyboards/handwired/CMD60/rules.mk [new file with mode: 0644]
keyboards/handwired/Makefile
keyboards/handwired/fivethirteen/Makefile
keyboards/handwired/fivethirteen/rules.mk [new file with mode: 0644]
keyboards/handwired/minorca/Makefile
keyboards/handwired/minorca/rules.mk [new file with mode: 0644]
keyboards/handwired/onekey/Makefile
keyboards/handwired/onekey/rules.mk [new file with mode: 0644]
keyboards/handwired/rules.mk [new file with mode: 0644]
keyboards/handwired/traveller/Makefile
keyboards/handwired/traveller/rules.mk [new file with mode: 0644]
keyboards/hhkb/Makefile
keyboards/hhkb/readme.md
keyboards/hhkb/rules.mk [new file with mode: 0644]
keyboards/infinity_chibios/Makefile
keyboards/infinity_chibios/rules.mk [new file with mode: 0644]
keyboards/jd45/Makefile
keyboards/jd45/rules.mk [new file with mode: 0644]
keyboards/kc60/Makefile
keyboards/kc60/readme.md
keyboards/kc60/rules.mk [new file with mode: 0644]
keyboards/kinesis/Makefile
keyboards/kinesis/readme.md
keyboards/kinesis/rules.mk [new file with mode: 0644]
keyboards/lets_split/Makefile
keyboards/lets_split/rules.mk [new file with mode: 0644]
keyboards/phantom/Makefile
keyboards/phantom/rules.mk [new file with mode: 0644]
keyboards/planck/Makefile
keyboards/planck/readme.md
keyboards/planck/rev3/Makefile
keyboards/planck/rev3/rules.mk [new file with mode: 0644]
keyboards/planck/rev4/Makefile
keyboards/planck/rev4/rules.mk [new file with mode: 0644]
keyboards/planck/rules.mk [new file with mode: 0644]
keyboards/preonic/Makefile
keyboards/preonic/readme.md
keyboards/preonic/rules.mk [new file with mode: 0644]
keyboards/retro_refit/Makefile
keyboards/retro_refit/readme.md
keyboards/retro_refit/rules.mk [new file with mode: 0644]
keyboards/s60-x/Makefile
keyboards/s60-x/readme.md
keyboards/s60-x/rules.mk [new file with mode: 0644]
keyboards/satan/Makefile
keyboards/satan/rules.mk [new file with mode: 0644]
keyboards/sixkeyboard/Makefile
keyboards/sixkeyboard/rules.mk [new file with mode: 0644]
keyboards/tv44/Makefile
keyboards/tv44/readme.md
keyboards/tv44/rules.mk [new file with mode: 0644]
message.mk [new file with mode: 0644]
quantum/template/Makefile
quantum/template/rules.mk [new file with mode: 0644]
readme.md
tmk_core/chibios.mk
tmk_core/common.mk
tmk_core/common/command.c
tmk_core/rules.mk
util/install_dependencies.sh

index 297cf19a686925e67f68f66da6feccf04a8b5ad7..138a2c553214c4af259373a618cc26acee9e24a1 100644 (file)
@@ -21,4 +21,5 @@ addons:
     - gcc-arm-none-eabi
     - binutils-arm-none-eabi
     - libnewlib-arm-none-eabi
+    - diffutils
 after_success: bash util/travis_compiled_push.sh
index 693edc9f06cee4578413051d79153a55addeb970..c8122e5765ac04038b413f876eee35ea951455fc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,280 +2,459 @@ ifndef VERBOSE
 .SILENT:
 endif
 
-.DEFAULT_GOAL := all
-
-space := $(subst ,, )
-ESCAPED_ABS_PATH = $(subst $(space),_SPACE_,$(abspath $1))
-starting_makefile := $(call ESCAPED_ABS_PATH,$(firstword $(MAKEFILE_LIST)))
-mkfile_path := $(call ESCAPED_ABS_PATH,$(lastword $(MAKEFILE_LIST))))
-abs_tmk_root := $(patsubst %/,%,$(dir $(mkfile_path)))
-
-ifneq (,$(findstring /keyboards/,$(starting_makefile)))
-       possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(abs_tmk_root)/keyboards/%,%,$(starting_makefile))))
-       ifneq (,$(findstring /keymaps/,$(possible_keyboard)))
-               KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard)))
-               KEYBOARD_DIR:=$(firstword $(subst /keymaps/, ,$(possible_keyboard)))
-               ifneq (,$(findstring /,$(KEYBOARD_DIR)))
-                       # SUBPROJECT_DIR:=$(lastword $(subst /, ,$(KEYBOARD_DIR)))
-                       # KEYBOARD_DIR:=$(firstword $(subst /, ,$(KEYBOARD_DIR)))
-                       tmk_root = ../../..
-               else
-                       tmk_root = ../../../..
-               endif
-       else
-               KEYMAP_DIR:=default
-               KEYBOARD_DIR:=$(possible_keyboard)
-               ifneq (,$(findstring /,$(KEYBOARD_DIR)))
-                       # SUBPROJECT_DIR:=$(lastword $(subst /, ,$(KEYBOARD_DIR)))
-                       # KEYBOARD_DIR:=$(firstword $(subst /, ,$(KEYBOARD_DIR)))
-                       tmk_root = ../../..
-               else
-                       tmk_root = ../..
-               endif
-       endif
-else
-       tmk_root = .
-endif
-# $(info $(KEYBOARD_DIR))
-# $(info $(KEYMAP_DIR))
-# $(info $(SUBPROJECT_DIR))
-
-# Directory common source filess exist
-TOP_DIR = $(tmk_root)
-TMK_DIR = tmk_core
-TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
-LIB_PATH = $(TOP_DIR)/lib
-
-QUANTUM_DIR = quantum
-QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
-
-
+# Allow the silent with lower caps to work the same way as upper caps
+ifdef silent
+    SILENT = $(silent)
+endif
+
+ifdef SILENT
+    SUB_IS_SILENT := $(SILENT)
+endif
+
+# We need to make sure that silent is always turned off at the top level
+# Otherwise the [OK], [ERROR] and [WARN] messags won't be displayed correctly
+override SILENT := false
+
+ON_ERROR := error_occured=1
+
+STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
+ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
+ROOT_DIR := $(dir $(ROOT_MAKEFILE))
+ifeq ($(ROOT_DIR),)
+    ROOT_DIR := .
+endif
+ABS_STARTING_MAKEFILE := $(abspath $(STARTING_MAKEFILE))
+ABS_ROOT_MAKEFILE := $(abspath $(ROOT_MAKEFILE))
+ABS_STARTING_DIR := $(dir $(ABS_STARTING_MAKEFILE))
+ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE))
+STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR))
+
+MAKEFILE_INCLUDED=yes
+
+# Helper function to process the newt element of a space separated path 
+# It works a bit like the traditional functional head tail
+# so the CURRENT_PATH_ELEMENT will beome the new head
+# and the PATH_ELEMENTS are the rest that are still unprocessed
+define NEXT_PATH_ELEMENT
+    $$(eval CURRENT_PATH_ELEMENT := $$(firstword  $$(PATH_ELEMENTS)))
+    $$(eval PATH_ELEMENTS := $$(wordlist  2,9999,$$(PATH_ELEMENTS)))
+endef
+
+# We change the / to spaces so that we more easily can work with the elements 
+# separately
+PATH_ELEMENTS := $(subst /, ,$(STARTING_DIR))
+# Initialize the path elements list for further processing
+$(eval $(call NEXT_PATH_ELEMENT))
+
+# This function sets the KEYBOARD; KEYMAP and SUBPROJECT to the correct 
+# variables depending on which directory you stand in.
+# It's really a very simple if else chain, if you squint enough, 
+# but the makefile syntax makes it very verbose. 
+# If we are in a subfolder of keyboards
+ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
+    $(eval $(call NEXT_PATH_ELEMENT))
+    KEYBOARD := $(CURRENT_PATH_ELEMENT)
+    $(eval $(call NEXT_PATH_ELEMENT))
+    # If we are in a subfolder of keymaps, or in other words in a keymap
+    # folder
+    ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
+        $(eval $(call NEXT_PATH_ELEMENT))
+        KEYMAP := $(CURRENT_PATH_ELEMENT)
+     # else if we are not in the keyboard folder itself
+    else ifneq ($(CURRENT_PATH_ELEMENT),)
+        # the we can assume it's a subproject, as no other folders
+        # should have make files in them
+        SUBPROJECT := $(CURRENT_PATH_ELEMENT)
+        $(eval $(call NEXT_PATH_ELEMENT))
+        # if we are inside a keymap folder of a subproject
+        ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
+            $(eval $(call NEXT_PATH_ELEMENT))
+            KEYMAP := $(CURRENT_PATH_ELEMENT)
+        endif
+    endif
+endif
+
+# Only consider folders with makefiles, to prevent errors in case there are extra folders
+KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
+
+#Compability with the old make variables, anything you specify directly on the command line
+# always overrides the detected folders
 ifdef keyboard
-       KEYBOARD ?= $(keyboard)
-endif
-ifdef KEYBOARD_DIR
-       KEYBOARD ?= $(KEYBOARD_DIR)
-endif
-ifndef KEYBOARD
-       KEYBOARD=planck
+    KEYBOARD := $(keyboard)
 endif
-
-MASTER ?= left
-ifdef master
-       MASTER = $(master)
-endif
-
-
-# converts things to keyboards/subproject
-ifneq (,$(findstring /,$(KEYBOARD)))
-       TEMP:=$(KEYBOARD)
-       KEYBOARD:=$(firstword $(subst /, ,$(TEMP)))
-       SUBPROJECT:=$(lastword $(subst /, ,$(TEMP)))
-endif
-
-KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD)
-
 ifdef sub
-       SUBPROJECT=$(sub)
+    SUBPROJECT := $(sub)
 endif
 ifdef subproject
-       SUBPROJECT=$(subproject)
+    SUBPROJECT := $(subproject)
 endif
-
-ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","")
-       KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c
-       ifneq ($(call ESCAPED_ABS_PATH,$(KEYBOARD_PATH)/Makefile),$(starting_makefile))
-               -include $(KEYBOARD_PATH)/Makefile
-       endif
-else 
-$(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist)
-endif
-
-ifdef SUBPROJECT_DEFAULT
-       SUBPROJECT?=$(SUBPROJECT_DEFAULT)
-endif
-
-ifdef SUBPROJECT
-       SUBPROJECT_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD)/$(SUBPROJECT)
-       ifneq ("$(wildcard $(SUBPROJECT_PATH)/$(SUBPROJECT).c)","")
-               OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
-               SUBPROJECT_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/$(SUBPROJECT).c
-               ifneq ($(call ESCAPED_ABS_PATH,$(SUBPROJECT_PATH)/Makefile),$(starting_makefile))
-                       -include $(SUBPROJECT_PATH)/Makefile
-               endif
-       else 
-$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
-       endif
-endif
-
 ifdef keymap
-       KEYMAP ?= $(keymap)
-endif
-ifdef KEYMAP_DIR
-       KEYMAP ?= $(KEYMAP_DIR)
-endif
-ifndef KEYMAP
-       KEYMAP = default
-endif
-KEYMAP_PATH = $(KEYBOARD_PATH)/keymaps/$(KEYMAP)
-ifneq ("$(wildcard $(KEYMAP_PATH)/keymap.c)","")
-       KEYMAP_FILE = keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c
-       ifneq ($(call ESCAPED_ABS_PATH,$(KEYMAP_PATH)/Makefile),$(starting_makefile))
-               -include $(KEYMAP_PATH)/Makefile
-       endif
-else 
-       ifeq ("$(wildcard $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)/keymap.c)","")
-$(error "$(KEYMAP_PATH)/keymap.c" does not exist)
-       else
-               KEYMAP_PATH = $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
-               KEYMAP_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/$(KEYMAP)/keymap.c
-               ifneq ($(call ESCAPED_ABS_PATH,$(KEYMAP_PATH)/Makefile),$(starting_makefile))
-                       -include $(KEYMAP_PATH)/Makefile
-               endif
-       endif
-endif
-
-ifdef SUBPROJECT
-       TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
-else
-       TARGET ?= $(KEYBOARD)_$(KEYMAP)
-endif
-
-BUILD_DIR = $(TOP_DIR)/.build
-
-# Object files directory
-#     To put object files in current directory, use a dot (.), do NOT make
-#     this an empty or blank macro!
-OBJDIR = $(BUILD_DIR)/obj_$(TARGET)
-
-
-
-ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
-       CONFIG_H = $(KEYMAP_PATH)/config.h
-else
-       CONFIG_H = $(KEYBOARD_PATH)/config.h
-       ifdef SUBPROJECT
-               ifneq ("$(wildcard $(SUBPROJECT_PATH)/$(SUBPROJECT).c)","")
-                       CONFIG_H = $(SUBPROJECT_PATH)/config.h
-               endif
-       endif
+    KEYMAP := $(keymap)
 endif
 
-# # project specific files
-SRC += $(KEYBOARD_FILE) \
-       $(KEYMAP_FILE) \
-       $(QUANTUM_DIR)/quantum.c \
-       $(QUANTUM_DIR)/keymap_common.c \
-       $(QUANTUM_DIR)/keycode_config.c \
-       $(QUANTUM_DIR)/process_keycode/process_leader.c
+# Uncomment these for debugging
+#$(info Keyboard: $(KEYBOARD))
+#$(info Keymap: $(KEYMAP))
+#$(info Subproject: $(SUBPROJECT))
+#$(info Keyboards: $(KEYBOARDS))
 
-ifdef SUBPROJECT
-       SRC += $(SUBPROJECT_FILE)
-endif
-
-ifdef SUBPROJECT
-       SRC += $(SUBPROJECT_FILE)
-endif
-
-ifdef SUBPROJECT
-       SRC += $(SUBPROJECT_FILE)
-endif
-
-ifndef CUSTOM_MATRIX
-       SRC += $(QUANTUM_DIR)/matrix.c
-endif
-
-ifeq ($(strip $(MIDI_ENABLE)), yes)
-    OPT_DEFS += -DMIDI_ENABLE
-       SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
-endif
-
-ifeq ($(strip $(AUDIO_ENABLE)), yes)
-    OPT_DEFS += -DAUDIO_ENABLE
-       SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
-       SRC += $(QUANTUM_DIR)/audio/audio.c
-       SRC += $(QUANTUM_DIR)/audio/voices.c
-       SRC += $(QUANTUM_DIR)/audio/luts.c
-endif
-
-ifeq ($(strip $(UCIS_ENABLE)), yes)
-       OPT_DEFS += -DUCIS_ENABLE
-       UNICODE_ENABLE = yes
-endif
-
-ifeq ($(strip $(UNICODE_ENABLE)), yes)
-    OPT_DEFS += -DUNICODE_ENABLE
-       SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
-endif
-
-ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
-       OPT_DEFS += -DRGBLIGHT_ENABLE
-       SRC += $(QUANTUM_DIR)/light_ws2812.c
-       SRC += $(QUANTUM_DIR)/rgblight.c
-endif
-
-ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
-       OPT_DEFS += -DTAP_DANCE_ENABLE
-       SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
-endif
-
-ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
-       SERIAL_DIR = $(QUANTUM_DIR)/serial_link
-       SERIAL_PATH = $(QUANTUM_PATH)/serial_link
-       SERIAL_SRC = $(wildcard $(SERIAL_PATH)/protocol/*.c)
-       SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
-       SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
-       OPT_DEFS += -DSERIAL_LINK_ENABLE
-       VAPTH += $(SERIAL_PATH)
-endif
-
-# Optimize size but this may cause error "relocation truncated to fit"
-#EXTRALDFLAGS = -Wl,--relax
-
-# Search Path
-VPATH += $(KEYMAP_PATH)
-ifdef SUBPROJECT
-       VPATH += $(SUBPROJECT_PATH)
-endif
-VPATH += $(KEYBOARD_PATH)
-VPATH += $(TOP_DIR)
-VPATH += $(TMK_PATH)
-VPATH += $(QUANTUM_PATH)
-VPATH += $(QUANTUM_PATH)/keymap_extras
-VPATH += $(QUANTUM_PATH)/audio
-VPATH += $(QUANTUM_PATH)/process_keycode
-
-
-# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA
-ifdef MCU_FAMILY
-       PLATFORM=CHIBIOS
-else
-       PLATFORM=AVR
-endif
-
-include $(TMK_PATH)/common.mk
-ifeq ($(PLATFORM),AVR)
-       include $(TMK_PATH)/protocol/lufa.mk
-       include $(TMK_PATH)/avr.mk
-else ifeq ($(PLATFORM),CHIBIOS)
-       include $(TMK_PATH)/protocol/chibios.mk
-       include $(TMK_PATH)/chibios.mk
-       OPT_OS = chibios
-else
-       $(error Unknown platform)
-endif
-
-ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
-       VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
-       VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
-       include $(VISUALIZER_PATH)/visualizer.mk
-endif
-
-include $(TMK_PATH)/rules.mk
 
+# Set the default goal depening on where we are running make from
+# this handles the case where you run make without any arguments
+.DEFAULT_GOAL := all
+ifneq ($(KEYMAP),)
+    ifeq ($(SUBPROJECT),)
+         # Inside a keymap folder, just build the keymap, with the 
+         # default subproject
+        .DEFAULT_GOAL := $(KEYBOARD)-$(KEYMAP)
+    else
+         # Inside a subproject keyamp folder, build the keymap
+         # for that subproject
+        .DEFAULT_GOAL := $(KEYBOARD)-$(SUBPROJECT)-$(KEYMAP)
+    endif
+else ifneq ($(SUBPROJECT),)
+     # Inside a subproject folder, build all keymaps for that subproject
+    .DEFAULT_GOAL := $(KEYBOARD)-$(SUBPROJECT)-allkm
+else ifneq ($(KEYBOARD),)
+     # Inside a keyboard folder, build all keymaps for all subprojects
+     # Note that this is different from the old behaviour, which would
+     # build only the default keymap of the default keyboard
+    .DEFAULT_GOAL := $(KEYBOARD)-allsp-allkm
+endif
+
+
+# Compare the start of the RULE variable with the first argument($1)
+# If the rules equals $1 or starts with $1-, RULE_FOUND is set to true
+#     and $1 is removed from the RULE variable
+# Otherwise the RULE_FOUND variable is set to false, and RULE left as it was
+# The function is a bit tricky, since there's no built in $(startswith) function
+define COMPARE_AND_REMOVE_FROM_RULE_HELPER
+    ifeq ($1,$$(RULE))
+        RULE:=
+        RULE_FOUND := true
+    else
+        STARTDASH_REMOVED=$$(subst START$1-,,START$$(RULE))
+        ifneq ($$(STARTDASH_REMOVED),START$$(RULE))
+            RULE_FOUND := true
+            RULE := $$(STARTDASH_REMOVED)
+        else
+            RULE_FOUND := false
+        endif
+    endif
+endef
+
+# This makes it easier to call COMPARE_AND_REMOVE_FROM_RULE, since it makes it behave like
+# a function that returns the value
+COMPARE_AND_REMOVE_FROM_RULE = $(eval $(call COMPARE_AND_REMOVE_FROM_RULE_HELPER,$1))$(RULE_FOUND)
+
+
+# Recursively try to find a match for the start of the rule to be checked
+# $1 The list to be checked
+# If a match is found, then RULE_FOUND is set to true
+# and MATCHED_ITEM to the item that was matched
+define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3
+    ifneq ($1,)
+        ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,$$(firstword $1)),true)
+            MATCHED_ITEM := $$(firstword $1)
+        else 
+            $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$$(wordlist 2,9999,$1)))
+        endif
+    endif
+endef
+
+# A recursive helper function for finding the longest match
+# $1 The list to be checed
+# It works by always removing the currently matched item from the list 
+# and call itself recursively, until a match is found
+define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
+    # Stop the recursion when the list is empty 
+    ifneq ($1,)
+        RULE_BEFORE := $$(RULE)
+        $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1))
+        # If a match is found in the current list, otherwise just return what we had before
+        ifeq ($$(RULE_FOUND),true)
+            # Save the best match so far and call itself recursivel
+            BEST_MATCH := $$(MATCHED_ITEM)
+            BEST_MATCH_RULE := $$(RULE)
+            RULE_FOUND := false
+            RULE := $$(RULE_BEFORE)
+            $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER2,$$(filter-out $$(MATCHED_ITEM),$1)))
+        endif
+     endif
+endef
+
+
+# Recursively try to find the longest match for the start of the rule to be checked
+# $1 The list to be checked
+# If a match is found, then RULE_FOUND is set to true
+# and MATCHED_ITEM to the item that was matched
+define TRY_TO_MATCH_RULE_FROM_LIST_HELPER
+    BEST_MATCH :=
+    $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER2,$1))
+    ifneq ($$(BEST_MATCH),)
+        RULE_FOUND := true
+        RULE := $$(BEST_MATCH_RULE)
+        MATCHED_ITEM := $$(BEST_MATCH)
+    else
+        RULE_FOUND := false
+        MATCHED_ITEM :=
+    endif
+endef
+
+# Make it easier to call TRY_TO_MATCH_RULE_FROM_LIST
+TRY_TO_MATCH_RULE_FROM_LIST = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER,$1))$(RULE_FOUND)
+
+define ALL_IN_LIST_LOOP
+    OLD_RULE$1 := $$(RULE)
+    $$(eval $$(call $1,$$(ITEM$1)))
+    RULE := $$(OLD_RULE$1)
+endef
+
+define PARSE_ALL_IN_LIST
+    $$(foreach ITEM$1,$2,$$(eval $$(call ALL_IN_LIST_LOOP,$1)))
+endef
+
+# The entry point for rule parsing
+# parses a rule in the format <keyboard>-<subproject>-<keymap>-<target>
+# but this particular function only deals with the first <keyboard> part
+define PARSE_RULE
+    RULE := $1
+    COMMANDS :=
+    # If the rule starts with allkb, then continue the parsing from
+    # PARSE_ALL_KEYBOARDS
+    ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true)
+        $$(eval $$(call PARSE_ALL_KEYBOARDS))
+    # If the rule starts with the name of a known keyboard, then continue
+    # the parsing from PARSE_KEYBOARD
+    else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true)
+        $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
+    # Otherwise use the KEYBOARD variable, which is determined either by
+    # the current directory you run make from, or passed in as an argument
+    else ifneq ($$(KEYBOARD),)
+        $$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD)))
+    else
+        $$(info make: *** No rule to make target '$1'. Stop.)
+        # Notice the tab instead of spaces below!
+               exit 1
+    endif
+endef
+
+# $1 = Keyboard
+# Parses a rule in the format <subproject>-<keymap>-<target>
+# the keyboard is already known when entering this function
+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)))
+    # 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))
+    # A special case for matching the defaultsp (default subproject)
+    else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,defaultsp),true)
+        $$(eval $$(call PARSE_SUBPROJECT,defaultsp))
+    # If the rule starts with the name of a known subproject
+    else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(SUBPROJECTS)),true)
+        $$(eval $$(call PARSE_SUBPROJECT,$$(MATCHED_ITEM)))
+    # Try to use the SUBPROJECT variable, which is either determined by the
+    # directory which invoked make, or passed as an argument to make
+    else ifneq ($$(SUBPROJECT),)
+        $$(eval $$(call PARSE_SUBPROJECT,$$(SUBPROJECT)))
+       # If there's no matching subproject, we assume it's the default
+       # This will allow you to leave the subproject part of the target out
+    else 
+        $$(eval $$(call PARSE_SUBPROJECT,defaultsp))
+    endif
+endef
+
+# if we are going to compile all keyboards, match the rest of the rule
+# for each of them
+define PARSE_ALL_KEYBOARDS
+    $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(KEYBOARDS)))
+endef
+
+# $1 Subproject
+# When entering this, the keyboard and subproject are known, so now we need
+# to determine which keymaps are going to get compiled
+define PARSE_SUBPROJECT
+    # If we want to compile the default subproject, then we need to 
+    # include the correct makefile to determine the actual name of it
+    ifeq ($1,defaultsp)
+        SUBPROJECT_DEFAULT=
+        $$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/Makefile)
+        CURRENT_SP := $$(SUBPROJECT_DEFAULT)
+    else
+        CURRENT_SP := $1
+    endif
+    # If current subproject is empty (the default was not defined), and we have a list of subproject
+    # then make all of them
+    ifeq ($$(CURRENT_SP),)
+        ifneq ($$(SUBPROJECTS),)
+            CURRENT_SP := allsp
+         endif
+    endif
+    # The special allsp is handled later
+    ifneq ($$(CURRENT_SP),allsp) 
+        # get a list of all keymaps
+        KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.)))
+        ifneq ($$(CURRENT_SP),)
+            # if the subproject is defined, then also look for keymaps inside the subproject folder
+            SP_KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/keymaps/*/.)))
+            KEYMAPS := $$(sort $$(KEYMAPS) $$(SP_KEYMAPS))
+        endif
+        # if the rule after removing the start of it is empty (we haven't specified a kemap or target)
+        # compile all the keymaps
+        ifeq ($$(RULE),)
+            $$(eval $$(call PARSE_ALL_KEYMAPS))
+        # The same if allkm was specified
+        else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkm),true)
+            $$(eval $$(call PARSE_ALL_KEYMAPS))
+        # Try to match the specified keyamp with the list of known keymaps
+        else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
+            $$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
+        # Otherwise try to match the keymap from the current folder, or arguments to the make command
+        else ifneq ($$(KEYMAP),)
+            $$(eval $$(call PARSE_KEYMAP,$$(KEYMAP)))
+        else
+            # Otherwise something is wrong with the target
+            # Try to give as much information as possible of what it it was trying to do
+            ifeq ($$(CURRENT_SP),)
+                $$(info make: *** No rule to make target '$$(CURRENT_KB)-$$(RULE)'. Stop.)
+            else
+                $$(info make: *** No rule to make target '$$(CURRENT_KB)-$$(CURRENT_SP)-$$(RULE)'. Stop.)
+            endif
+            # Notice the tab instead of spaces below!
+                       exit 1
+        endif
+    else
+        # As earlier mentione,d when allsb is specified, we call our self recursively
+        # for all of the subprojects
+        $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS)))
+    endif
+endef
+
+# If we want to parse all subprojects, but the keyboard doesn't have any, 
+# then use defaultsp instead
+define PARSE_ALL_SUBPROJECTS
+    ifeq ($$(SUBPROJECTS),)
+        $$(eval $$(call PARSE_SUBPROJECT,defaultsp))
+    else
+        $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$$(SUBPROJECTS)))
+    endif
+endef
+
+# $1 Keymap
+# This is the meat of compiling a keyboard, when entering this, everything is known
+# keyboard, subproject, and keymap
+# Note that we are not directly calling the command here, but instead building a list,
+# which will later be processed
+define PARSE_KEYMAP
+    CURRENT_KM = $1
+    # The rest of the rule is the target
+    # Remove the leading "-" from the target, as it acts as a separator
+    MAKE_TARGET := $$(patsubst -%,%,$$(RULE))
+    # We need to generate an unique indentifer to append to the COMMANDS list
+    COMMAND := COMMAND_KEYBOARD_$$(CURRENT_KB)_SUBPROJECT_$(CURRENT_SP)_KEYMAP_$$(CURRENT_KM)
+    COMMANDS += $$(COMMAND)
+    # If we are compiling a keyboard without a subproject, we want to display just the name
+    # of the keyboard, otherwise keyboard/subproject
+    ifeq ($$(CURRENT_SP),)
+        KB_SP := $(CURRENT_KB)
+    else
+        KB_SP := $(CURRENT_KB)/$$(CURRENT_SP)
+    endif
+    # Format it in bold
+    KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
+    # Specify the variables that we are passing forward to submake
+    MAKE_VARS := KEYBOARD=$$(CURRENT_KB) SUBPROJECT=$$(CURRENT_SP) KEYMAP=$$(CURRENT_KM)
+    MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR)
+    # And the first part of the make command
+    MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
+    # The message to display
+    MAKE_MSG := $$(MSG_MAKE_KB)
+    # We run the command differently, depending on if we want more output or not
+    # The true version for silent output and the false version otherwise
+    COMMAND_true_$$(COMMAND) := \
+        printf "$$(MAKE_MSG)" | \
+        $$(MAKE_MSG_FORMAT); \
+        LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \
+        if [ $$$$? -gt 0 ]; \
+            then $$(PRINT_ERROR_PLAIN); \
+        elif [ "$$$$LOG" != "" ] ; \
+            then $$(PRINT_WARNING_PLAIN); \
+        else \
+            $$(PRINT_OK); \
+        fi;
+    COMMAND_false_$$(COMMAND) := \
+        printf "$$(MAKE_MSG)\n\n"; \
+        $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false;
+endef
+
+# Just parse all the keymaps for a specifc keyboard
+define PARSE_ALL_KEYMAPS
+    $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS)))
+endef
+
+# Set the silent mode depending on if we are trying to compile multiple keyboards or not
+# By default it's on in that case, but it can be overriden by specifying silent=false 
+# from the command line
+define SET_SILENT_MODE
+    ifdef SUB_IS_SILENT
+        SILENT_MODE := $(SUB_IS_SILENT)
+    else ifeq ($$(words $$(COMMANDS)),1)
+        SILENT_MODE := false
+    else
+        SILENT_MODE := true
+    endif
+endef
+
+include $(ROOT_DIR)/message.mk
+
+RUN_COMMAND = \
+$(COMMAND_$(SILENT_MODE)_$(COMMAND))
+
+# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
+SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
+.PHONY: $(SUBPROJECTS)
+$(SUBPROJECTS): %: %-allkm 
+
+# Let's match everything, we handle all the rule parsing ourselves
+.PHONY: %
+%: 
+       # Check if we have the CMP tool installed
+       cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
+       # Check if the submodules are dirty, and display a warning if they are
+       git submodule status --recursive 2>/dev/null | \
+       while IFS= read -r x; do \
+               case "$$x" in \
+                       \ *) ;; \
+                       *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
+               esac \
+       done
+       $(eval $(call PARSE_RULE,$@))
+       $(eval $(call SET_SILENT_MODE))
+       # Run all the commands in the same shell, notice the + at the first line
+       # it has to be there to allow parallel execution of the submake
+       # This always tries to compile everything, even if error occurs in the middle
+       # But we return the error code at the end, to trigger travis failures
+       +error_occured=0; \
+       $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
+       if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi
+       
+
+# All should compile everything
+.PHONY: all
+all: all-keyboards 
+
+# Define some shortcuts, mostly for compability with the old syntax
+.PHONY: all-keyboards
+all-keyboards: allkb-allsp-allkm
+
+.PHONY: all-keyboards-defaults
+all-keyboards-defaults: allkb-allsp-default
+
+
+# Generate the version.h file
 GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
 BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
-OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
-
-$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(QUANTUM_PATH)/version.h)
-$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(QUANTUM_PATH)/version.h)
+$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
+$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
\ No newline at end of file
diff --git a/build_keyboard.mk b/build_keyboard.mk
new file mode 100644 (file)
index 0000000..a2a2871
--- /dev/null
@@ -0,0 +1,217 @@
+ifndef VERBOSE
+.SILENT:
+endif
+
+.DEFAULT_GOAL := all
+
+include message.mk
+
+
+# Directory common source filess exist
+TOP_DIR = .
+TMK_DIR = tmk_core
+TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
+LIB_PATH = $(TOP_DIR)/lib
+
+QUANTUM_DIR = quantum
+QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
+
+BUILD_DIR := $(TOP_DIR)/.build
+
+ifneq ($(SUBPROJECT),)
+       TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
+       KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
+else
+       TARGET ?= $(KEYBOARD)_$(KEYMAP)
+       KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
+endif
+
+# Force expansion
+TARGET := $(TARGET)
+
+
+MASTER ?= left
+ifdef master
+       MASTER = $(master)
+endif
+
+KEYBOARD_PATH := keyboards/$(KEYBOARD)
+KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
+
+ifneq ("$(wildcard $(KEYBOARD_C))","")
+    include $(KEYBOARD_PATH)/rules.mk
+else 
+    $(error "$(KEYBOARD_C)" does not exist)
+endif
+
+
+ifneq ($(SUBPROJECT),)
+    SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT)
+    SUBPROJECT_C := $(SUBPROJECT_PATH)/$(SUBPROJECT).c
+    ifneq ("$(wildcard $(SUBPROJECT_C))","")
+        OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
+        include $(SUBPROJECT_PATH)/rules.mk
+    else 
+        $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
+    endif
+endif
+
+# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA
+ifdef MCU_FAMILY
+       PLATFORM=CHIBIOS
+else
+       PLATFORM=AVR
+endif
+
+ifeq ($(PLATFORM),CHIBIOS)
+       include $(TMK_PATH)/protocol/chibios.mk
+       include $(TMK_PATH)/chibios.mk
+       OPT_OS = chibios
+       ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","")
+               OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h
+       else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
+               OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h
+       else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","")
+               OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
+       else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
+               OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
+       endif
+endif
+
+CONFIG_H = $(KEYBOARD_PATH)/config.h
+ifneq ($(SUBPROJECT),)
+       ifneq ("$(wildcard $(SUBPROJECT_C))","")
+               CONFIG_H = $(SUBPROJECT_PATH)/config.h
+       endif
+endif
+
+# Save the defines and includes here, so we don't include any keymap specific ones 
+PROJECT_DEFS := $(OPT_DEFS)
+PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
+PROJECT_CONFIG := $(CONFIG_H)
+
+MAIN_KEYMAP_PATH := $(KEYBOARD_PATH)/keymaps/$(KEYMAP)
+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
+    KEYMAP_C := $(SUBPROJ_KEYMAP_C)
+    KEYMAP_PATH := $(SUBPROJ_KEYMAP_PATH)
+else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","")
+    -include $(MAIN_KEYMAP_PATH)/Makefile
+    KEYMAP_C := $(MAIN_KEYMAP_C)
+    KEYMAP_PATH := $(MAIN_KEYMAP_PATH)
+else
+    $(error "$(MAIN_KEYMAP_C)/keymap.c" does not exist)
+endif
+
+
+# Object files directory
+#     To put object files in current directory, use a dot (.), do NOT make
+#     this an empty or blank macro!
+KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
+
+
+ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
+       CONFIG_H = $(KEYMAP_PATH)/config.h
+endif
+
+# # project specific files
+SRC += $(KEYBOARD_C) \
+       $(KEYMAP_C) \
+       $(QUANTUM_DIR)/quantum.c \
+       $(QUANTUM_DIR)/keymap_common.c \
+       $(QUANTUM_DIR)/keycode_config.c \
+       $(QUANTUM_DIR)/process_keycode/process_leader.c
+
+ifneq ($(SUBPROJECT),)
+       SRC += $(SUBPROJECT_C)
+endif
+
+ifndef CUSTOM_MATRIX
+       SRC += $(QUANTUM_DIR)/matrix.c
+endif
+
+ifeq ($(strip $(MIDI_ENABLE)), yes)
+    OPT_DEFS += -DMIDI_ENABLE
+       SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
+endif
+
+ifeq ($(strip $(AUDIO_ENABLE)), yes)
+    OPT_DEFS += -DAUDIO_ENABLE
+       SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
+       SRC += $(QUANTUM_DIR)/audio/audio.c
+       SRC += $(QUANTUM_DIR)/audio/voices.c
+       SRC += $(QUANTUM_DIR)/audio/luts.c
+endif
+
+ifeq ($(strip $(UNICODE_ENABLE)), yes)
+    OPT_DEFS += -DUNICODE_ENABLE
+       SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
+endif
+
+ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
+       OPT_DEFS += -DRGBLIGHT_ENABLE
+       SRC += $(QUANTUM_DIR)/light_ws2812.c
+       SRC += $(QUANTUM_DIR)/rgblight.c
+endif
+
+ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
+       OPT_DEFS += -DTAP_DANCE_ENABLE
+       SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
+endif
+
+ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
+       SERIAL_DIR = $(QUANTUM_DIR)/serial_link
+       SERIAL_PATH = $(QUANTUM_PATH)/serial_link
+       SERIAL_SRC = $(wildcard $(SERIAL_PATH)/protocol/*.c)
+       SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
+       SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
+       OPT_DEFS += -DSERIAL_LINK_ENABLE
+       VAPTH += $(SERIAL_PATH)
+endif
+
+# Optimize size but this may cause error "relocation truncated to fit"
+#EXTRALDFLAGS = -Wl,--relax
+
+# Search Path
+VPATH += $(KEYMAP_PATH)
+ifneq ($(SUBPROJECT),)
+       VPATH += $(SUBPROJECT_PATH)
+endif
+VPATH += $(KEYBOARD_PATH)
+VPATH += $(TOP_DIR)
+VPATH += $(TMK_PATH)
+VPATH += $(QUANTUM_PATH)
+VPATH += $(QUANTUM_PATH)/keymap_extras
+VPATH += $(QUANTUM_PATH)/audio
+VPATH += $(QUANTUM_PATH)/process_keycode
+
+
+include $(TMK_PATH)/common.mk
+ifeq ($(PLATFORM),AVR)
+       include $(TMK_PATH)/protocol/lufa.mk
+       include $(TMK_PATH)/avr.mk
+endif
+
+ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
+       VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
+       VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
+       include $(VISUALIZER_PATH)/visualizer.mk
+endif
+
+
+OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
+$(KEYMAP_OUTPUT)_SRC := $(SRC)
+$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" 
+$(KEYMAP_OUTPUT)_INC := $(EXTRAINCDIRS) $(VPATH)
+$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
+$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC)
+$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS)
+$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC)
+$(KEYBOARD_OUTPUT)_CONFIG  := $(PROJECT_CONFIG)
+
+
+include $(TMK_PATH)/rules.mk
+
index d8325e6c89dbd33bb251f75e15ece8fcb5804339..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,70 +1,3 @@
-
-
-# Target file name (without extension).
-
-# project specific files
-SRC = led.c
-
-# MCU name
-MCU = atmega32u2
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # 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
-#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk
new file mode 100644 (file)
index 0000000..c326d3e
--- /dev/null
@@ -0,0 +1,66 @@
+
+
+# Target file name (without extension).
+
+# project specific files
+SRC = led.c
+
+# MCU name
+MCU = atmega32u2
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # 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
+#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
+#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
\ No newline at end of file
index 1f695aa4d8a524ae33e03fdb5066c545bc6218a1..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,70 +1,3 @@
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-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   ?= yes # Console for debug(+400)
-COMMAND_ENABLE   ?= yes # Commands for debug and configuration
-NKRO_ENABLE      ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE  ?= yes # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
-MIDI_ENABLE      ?= no  # MIDI controls
-AUDIO_ENABLE     ?= no
-UNICODE_ENABLE   ?= no  # Unicode
-BLUETOOTH_ENABLE ?= no  # Enable Bluetooth with the Adafruit EZ-Key HID
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/amj60/rules.mk b/keyboards/amj60/rules.mk
new file mode 100644 (file)
index 0000000..18403ac
--- /dev/null
@@ -0,0 +1,66 @@
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+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   ?= yes # Console for debug(+400)
+COMMAND_ENABLE   ?= yes # Commands for debug and configuration
+NKRO_ENABLE      ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE  ?= yes # Enable keyboard underlight functionality (+4870)
+BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
+MIDI_ENABLE      ?= no  # MIDI controls
+AUDIO_ENABLE     ?= no
+UNICODE_ENABLE   ?= no  # Unicode
+BLUETOOTH_ENABLE ?= no  # Enable Bluetooth with the Adafruit EZ-Key HID
index 09fcf3e7a0e1b61072575f177ce84bc6867167fe..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,74 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   change yes to no to disable
-#
-BOOTMAGIC_ENABLE ?= yes      # 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
-KEYBOARD_LOCK_ENABLE ?= yes  # Allow locking of keyboard via magic key
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= yes           # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
index 5aa44cce541548bff51f0d2caf1bfbec19520e66..2e9a64f2ef2378b78d808a8e8404b31e6b1b5cfb 100644 (file)
@@ -12,13 +12,15 @@ Download or clone the whole firmware and navigate to the keyboards/arrow_pad fol
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
+
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
\ No newline at end of file
diff --git a/keyboards/arrow_pad/rules.mk b/keyboards/arrow_pad/rules.mk
new file mode 100644 (file)
index 0000000..3dca9b6
--- /dev/null
@@ -0,0 +1,70 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= yes      # 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
+KEYBOARD_LOCK_ENABLE ?= yes  # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= yes           # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
\ No newline at end of file
index 08e9205cbf1f30a6223dd98f0f40f094288556d8..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,73 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-# 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 ?= no            # 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 ?= 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
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
index ab1e7ba1ff8ded2afe672b0276d7742ef50f0e52..674dcf113b394ea3cd17c863f55408bf351e13f3 100644 (file)
@@ -13,13 +13,14 @@ Download or clone the whole firmware and navigate to the keyboards/atomic folder
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/atomic/rules.mk b/keyboards/atomic/rules.mk
new file mode 100644 (file)
index 0000000..d0f3a3a
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# 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 ?= no            # 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 ?= 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
\ No newline at end of file
index 5894d231f9dd9661eb223ddd0e8bf611fc6937b6..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,88 +1,3 @@
-
-
-ifdef TEENSY2
-    OPT_DEFS += -DATREUS_TEENSY2
-    ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
-else
-    OPT_DEFS += -DATREUS_ASTAR
-    OPT_DEFS += -DCATERINA_BOOTLOADER
-    ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
-                            avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
-endif
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-#BOOTMAGIC_ENABLE = yes        # 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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes             # USB Nkey Rollover - not yet supported in LUFA
-# BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality
-# MIDI_ENABLE ?= YES           # MIDI controls
-UNICODE_ENABLE ?= YES          # Unicode
-# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-USB ?= /dev/cu.usbmodem1411
-
-upload: build
-       $(ATREUS_UPLOAD_COMMAND)
-       
+endif
\ No newline at end of file
index 734f58f0f095602ca5882ff53c130cb9ab588ea9..a4077668e3662895f7b6e1b5fbff63236a59893a 100644 (file)
@@ -174,13 +174,14 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk
new file mode 100644 (file)
index 0000000..d71f50b
--- /dev/null
@@ -0,0 +1,82 @@
+
+
+ifdef TEENSY2
+    OPT_DEFS += -DATREUS_TEENSY2
+    ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
+else
+    OPT_DEFS += -DATREUS_ASTAR
+    OPT_DEFS += -DCATERINA_BOOTLOADER
+    ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+                            avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+endif
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+#BOOTMAGIC_ENABLE = yes        # 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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes             # USB Nkey Rollover - not yet supported in LUFA
+# BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality
+# MIDI_ENABLE ?= YES           # MIDI controls
+UNICODE_ENABLE ?= YES          # Unicode
+# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
+
+USB ?= /dev/cu.usbmodem1411
+
+upload: build
+       $(ATRUES_UPLOAD_COMMAND)
\ No newline at end of file
index 03893dbf8905f5f364d10d28a048cf9593b461b7..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,72 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # 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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-# NKRO_ENABLE ?= yes           # USB 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 ?= YES           # MIDI controls
-# UNICODE_ENABLE ?= YES                # Unicode
-# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
+endif
\ No newline at end of file
index 89d7f9d053e4e72ae1cb40bad7dbc0bdd92f92d4..462f67c12458caed189ca2ddd12eb76fdbff515c 100644 (file)
@@ -12,13 +12,14 @@ Download or clone the whole firmware and navigate to the keyboards/Bantam44 fold
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
\ No newline at end of file
diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk
new file mode 100644 (file)
index 0000000..baa0e9e
--- /dev/null
@@ -0,0 +1,67 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # 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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
+# NKRO_ENABLE ?= yes           # USB 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 ?= YES           # MIDI controls
+# UNICODE_ENABLE ?= YES                # Unicode
+# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
index d9f2b8b83bac6ab7d23b3a1ee4ccc52668e0bdc8..4b07a623432e97ec31a0e244cbf084a6d14a9200 100644 (file)
@@ -1,14 +1,5 @@
 SUBPROJECT_DEFAULT = stm32_f072_onekey
 
-#BOOTMAGIC_ENABLE = yes        # Virtual DIP switch configuration
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes  # Console for debug
-COMMAND_ENABLE ?= yes    # Commands for debug and configuration
-SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes         # USB Nkey Rollover
-CUSTOM_MATRIX ?= yes # Custom matrix file
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/chibios_test/rules.mk b/keyboards/chibios_test/rules.mk
new file mode 100644 (file)
index 0000000..4b5a845
--- /dev/null
@@ -0,0 +1,8 @@
+#BOOTMAGIC_ENABLE = yes        # Virtual DIP switch configuration
+MOUSEKEY_ENABLE ?= yes # Mouse keys
+EXTRAKEY_ENABLE ?= yes # Audio control and System control
+CONSOLE_ENABLE ?= yes  # Console for debug
+COMMAND_ENABLE ?= yes    # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes         # USB Nkey Rollover
+CUSTOM_MATRIX ?= yes # Custom matrix file
\ No newline at end of file
index eae38c4b2bcdbccab742299d693940a5bc4e0dc0..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,41 +1,3 @@
-# project specific files
-SRC =  matrix.c \
-           led.c
-
-## chip/board settings
-# the next two should match the directories in
-#  <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
-MCU_FAMILY = STM32
-MCU_SERIES = STM32F0xx
-# linker script to use
-# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
-#  or <this_dir>/ld/
-MCU_LDSCRIPT = STM32F072xB
-# startup code to use
-# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
-MCU_STARTUP = stm32f0xx
-# it should exist either in <chibios>/os/hal/boards/
-#  or <this_dir>/boards
-BOARD = ST_STM32F072B_DISCOVERY
-# Cortex version
-# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
-MCU  = cortex-m0
-# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
-ARMV = 6
-# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
-# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
-# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
-# a custom board definition that you plan to reuse).
-# If you're not setting it here, leave it commented out.
-# It is chip dependent, the correct number can be looked up here (page 175):
-# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
-# This also requires a patch to chibios:
-#   <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
-#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
-
-# Build Options
-#   comment out to disable the options.
-#
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/chibios_test/stm32_f072_onekey/rules.mk b/keyboards/chibios_test/stm32_f072_onekey/rules.mk
new file mode 100644 (file)
index 0000000..eae38c4
--- /dev/null
@@ -0,0 +1,41 @@
+# project specific files
+SRC =  matrix.c \
+           led.c
+
+## chip/board settings
+# the next two should match the directories in
+#  <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = STM32
+MCU_SERIES = STM32F0xx
+# linker script to use
+# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+#  or <this_dir>/ld/
+MCU_LDSCRIPT = STM32F072xB
+# startup code to use
+# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = stm32f0xx
+# it should exist either in <chibios>/os/hal/boards/
+#  or <this_dir>/boards
+BOARD = ST_STM32F072B_DISCOVERY
+# Cortex version
+# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
+MCU  = cortex-m0
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
+# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
+# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
+# a custom board definition that you plan to reuse).
+# If you're not setting it here, leave it commented out.
+# It is chip dependent, the correct number can be looked up here (page 175):
+# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+# This also requires a patch to chibios:
+#   <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
+#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
+
+# Build Options
+#   comment out to disable the options.
+#
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
index 307ca5b198ef28222c00f8f3b4b1cc357f9776fa..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,52 +1,3 @@
-# project specific files
-SRC =  matrix.c \
-           led.c
-
-# GENERIC STM32F103C8T6 board - stm32duino bootloader
-OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
-MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
-BOARD = GENERIC_STM32_F103
-
-# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
-# OPT_DEFS =
-# MCU_LDSCRIPT = STM32F103x8
-# BOARD = GENERIC_STM32_F103
-
-# MAPLE MINI
-# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
-# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader
-# BOARD = MAPLEMINI_STM32_F103
-
-## chip/board settings
-# the next two should match the directories in
-#  <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
-MCU_FAMILY = STM32
-MCU_SERIES = STM32F1xx
-# linker script to use
-# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
-#  or <this_dir>/ld/
-# startup code to use
-# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
-MCU_STARTUP = stm32f1xx
-# it should exist either in <chibios>/os/hal/boards/
-#  or <this_dir>/boards
-# Cortex version
-# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
-MCU  = cortex-m3
-# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
-ARMV = 7
-# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
-# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
-# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
-# a custom board definition that you plan to reuse).
-# If you're not setting it here, leave it commented out.
-# It is chip dependent, the correct number can be looked up here (page 175):
-# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
-# This also requires a patch to chibios:
-#   <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
-#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/chibios_test/stm32_f103_onekey/rules.mk b/keyboards/chibios_test/stm32_f103_onekey/rules.mk
new file mode 100644 (file)
index 0000000..307ca5b
--- /dev/null
@@ -0,0 +1,52 @@
+# project specific files
+SRC =  matrix.c \
+           led.c
+
+# GENERIC STM32F103C8T6 board - stm32duino bootloader
+OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
+MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
+BOARD = GENERIC_STM32_F103
+
+# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
+# OPT_DEFS =
+# MCU_LDSCRIPT = STM32F103x8
+# BOARD = GENERIC_STM32_F103
+
+# MAPLE MINI
+# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
+# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader
+# BOARD = MAPLEMINI_STM32_F103
+
+## chip/board settings
+# the next two should match the directories in
+#  <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = STM32
+MCU_SERIES = STM32F1xx
+# linker script to use
+# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+#  or <this_dir>/ld/
+# startup code to use
+# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = stm32f1xx
+# it should exist either in <chibios>/os/hal/boards/
+#  or <this_dir>/boards
+# Cortex version
+# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
+MCU  = cortex-m3
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 7
+# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
+# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
+# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
+# a custom board definition that you plan to reuse).
+# If you're not setting it here, leave it commented out.
+# It is chip dependent, the correct number can be looked up here (page 175):
+# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+# This also requires a patch to chibios:
+#   <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
+#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
+
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
index 43ea9d82d93830d3786e57b76160a2fea1401135..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,49 +1,3 @@
-# project specific files
-SRC =  matrix.c \
-           led.c
-
-## chip/board settings
-# - the next two should match the directories in
-#   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
-# - For Teensies, FAMILY = KINETIS and SERIES is either
-#   KL2x (LC) or K20x (3.0,3.1,3.2).
-MCU_FAMILY = KINETIS
-MCU_SERIES = KL2x
-
-# Linker script to use
-# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
-#   or <this_dir>/ld/
-# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
-# - LDSCRIPT =
-#   - MKL26Z64 for Teensy LC
-#   - MK20DX128 for Teensy 3.0
-#   - MK20DX256 for Teensy 3.1 and 3.2
-MCU_LDSCRIPT = MKL26Z64
-
-# Startup code to use
-#  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
-# - STARTUP =
-#   - kl2x for Teensy LC
-#   - k20x5 for Teensy 3.0
-#   - k20x7 for Teensy 3.1 and 3.2
-MCU_STARTUP = kl2x
-
-# Board: it should exist either in <chibios>/os/hal/boards/
-#  or <this_dir>/boards
-# - BOARD =
-#   - PJRC_TEENSY_LC for Teensy LC
-#   - PJRC_TEENSY_3 for Teensy 3.0
-#   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
-BOARD = PJRC_TEENSY_LC
-
-# Cortex version
-# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4
-MCU  = cortex-m0plus
-
-# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
-# I.e. 6 for Teensy LC; 7 for Teensy 3.x
-ARMV = 6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/chibios_test/teensy_lc_onekey/rules.mk b/keyboards/chibios_test/teensy_lc_onekey/rules.mk
new file mode 100644 (file)
index 0000000..43ea9d8
--- /dev/null
@@ -0,0 +1,49 @@
+# project specific files
+SRC =  matrix.c \
+           led.c
+
+## chip/board settings
+# - the next two should match the directories in
+#   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+# - For Teensies, FAMILY = KINETIS and SERIES is either
+#   KL2x (LC) or K20x (3.0,3.1,3.2).
+MCU_FAMILY = KINETIS
+MCU_SERIES = KL2x
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+#   or <this_dir>/ld/
+# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
+# - LDSCRIPT =
+#   - MKL26Z64 for Teensy LC
+#   - MK20DX128 for Teensy 3.0
+#   - MK20DX256 for Teensy 3.1 and 3.2
+MCU_LDSCRIPT = MKL26Z64
+
+# Startup code to use
+#  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+# - STARTUP =
+#   - kl2x for Teensy LC
+#   - k20x5 for Teensy 3.0
+#   - k20x7 for Teensy 3.1 and 3.2
+MCU_STARTUP = kl2x
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+#  or <this_dir>/boards
+# - BOARD =
+#   - PJRC_TEENSY_LC for Teensy LC
+#   - PJRC_TEENSY_3 for Teensy 3.0
+#   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
+BOARD = PJRC_TEENSY_LC
+
+# Cortex version
+# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4
+MCU  = cortex-m0plus
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+# I.e. 6 for Teensy LC; 7 for Teensy 3.x
+ARMV = 6
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
\ No newline at end of file
index e6b13f955abe4438937801760515b7a6c8cbfa6b..b9bada8f8d73aa3a06f9f27ca37f0129e4c19728 100644 (file)
@@ -1,109 +1,5 @@
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make coff = Convert ELF to AVR COFF.
-#
-# make extcoff = Convert ELF to AVR Extended COFF.
-#
-# make program = Download the hex file to the device.
-#                Please customize your programmer settings(PROGRAM_CMD)
-#
-# make teensy = Download the hex file to the device, using teensy_loader_cli.
-#               (must have teensy_loader_cli installed).
-#
-# make dfu = Download the hex file to the device, using dfu-programmer (must
-#            have dfu-programmer installed).
-#
-# make flip = Download the hex file to the device, using Atmel FLIP (must
-#             have Atmel FLIP installed).
-#
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
-#               (must have dfu-programmer installed).
-#
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
-#                (must have Atmel FLIP installed).
-#
-# make debug = Start either simulavr or avarice as specified for debugging,
-#              with avr-gdb or avr-insight as the front end for debugging.
-#
-# make filename.s = Just compile filename.c into the assembler code only.
-#
-# make filename.i = Create a preprocessed source file for use in submitting
-#                   bug reports to the GCC project.
-#
-# To rebuild project do "make clean" then "make all".
-#----------------------------------------------------------------------------
-
 SUBPROJECT_DEFAULT = rev2
 
-# MCU name
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   change to no to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no  # 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             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= no   # Enable keyboard underlight functionality
-MIDI_ENABLE ?= no              # MIDI controls
-UNICODE_ENABLE ?= no           # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
index 6c29c09eca23a6c9e6c3763d0d4bf81f0ccb81cb..4a76e2908c5e76615bd95ae8d0de707e2d75a31c 100644 (file)
@@ -31,36 +31,36 @@ If you would like to use one of the alternative keymaps, or create your own, see
 
 ## Clueboard 1.0
 
-If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `SUBPROJECT=rev1` to your make command, like this:
+If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `rev1` to your make command, like this:
 
 ```
-$ make SUBPROJECT=rev1
+$ make rev1
 ```
 
 And when flashing your keyboard:
 
 ```
-$ make SUBPROJECT=rev1 dfu
+$ make rev1-dfu
 ```
 
-If you are flashing an alternative layout to your rev1, include both `SUBPROJECT=rev1` and `KEYMAP=<keymap>` in your command, for example when flashing max:
+If you are flashing an alternative layout to your rev1, include both `rev1` and `<keymap>` in your command, for example when flashing max:
 
 ```
-$ make SUBPROJECT=rev1 KEYMAP=max dfu
+$ make rev1-max-dfu
 ```
 
 ## Alternate Keymaps
 
-There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `KEYMAP=<keymap>` to your command:
+There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `<keymap>` to your command:
 
 ```
-$ make KEYMAP=skully
+$ make skully
 ```
 
-And when flashing your keyboard, put `KEYMAP=<keymap>` between "make" and "dfu":
+And when flashing your keyboard, put `<keymap>` between "make" and "dfu":
 
 ```
-$ make KEYMAP=skully dfu
+$ make skully-dfu
 ```
 
 ### Notable Layouts
@@ -76,15 +76,15 @@ These layouts are notable for one reason or another. If you are looking for idea
 There are a lot of possibilities when creating your own keymap, and the primary documentation for doing that is [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. As a way to get started, here is the procedure I recommend:
 
 * Copy `[keymaps/default](keymaps/default/)` to `keymaps/<your_layout>`.
-* Compile the firmware (`$ make KEYMAP=<your_layout>`)
-* Flash the firmware (`$ make KEYMAP=<your_layout> dfu`)
+* Compile the firmware (`$ make <your_layout>`)
+* Flash the firmware (`$ make <your_layout>-dfu`)
 * Make sure everything works like the default keyboard
 * Modify `keymaps/<your_layout>/readme.md` to tell others about your layout.
 * Modify `keymaps/<your_layout>/keymap.c` to reflect your desired layout.
-* Compile your new custom firmware (`$ make KEYMAP=<your_layout>`)
+* Compile your new custom firmware (`$ make <your_layout>`)
 ** If you have warnings you may flash without fixing them, but something may not work right.
 ** If you have any errors you must fix them before continuing.
-* Flash the firmware (`$ make KEYMAP=<your_layout> dfu`)
+* Flash the firmware (`$ make <your_layout>-dfu`)
 
 ## Share Your Keymap
 
index 80a942d06f7cc35dc8abf7a43d371a2381a84204..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,5 +1,3 @@
-BACKLIGHT_ENABLE = no
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/clueboard/rev1/rules.mk b/keyboards/clueboard/rev1/rules.mk
new file mode 100644 (file)
index 0000000..80a942d
--- /dev/null
@@ -0,0 +1,5 @@
+BACKLIGHT_ENABLE = no
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
index cea967b7955c7958daea51ae2380494d782922fc..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,5 +1,3 @@
-BACKLIGHT_ENABLE = yes
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/clueboard/rev2/rules.mk b/keyboards/clueboard/rev2/rules.mk
new file mode 100644 (file)
index 0000000..cea967b
--- /dev/null
@@ -0,0 +1,5 @@
+BACKLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
diff --git a/keyboards/clueboard/rules.mk b/keyboards/clueboard/rules.mk
new file mode 100644 (file)
index 0000000..3909fbd
--- /dev/null
@@ -0,0 +1,103 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device.
+#                Please customize your programmer settings(PROGRAM_CMD)
+#
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+# make dfu = Download the hex file to the device, using dfu-programmer (must
+#            have dfu-programmer installed).
+#
+# make flip = Download the hex file to the device, using Atmel FLIP (must
+#             have Atmel FLIP installed).
+#
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
+#               (must have dfu-programmer installed).
+#
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
+#                (must have Atmel FLIP installed).
+#
+# make debug = Start either simulavr or avarice as specified for debugging,
+#              with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+#                   bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= no  # 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             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+AUDIO_ENABLE ?= no
+RGBLIGHT_ENABLE ?= no   # Enable keyboard underlight functionality
+MIDI_ENABLE ?= no              # MIDI controls
+UNICODE_ENABLE ?= no           # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
\ No newline at end of file
index 029d0b96700a70c62131a8263e1546bdf9eea1a0..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,76 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   change yes to no to disable
-#
-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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-RGBLIGHT_ENABLE ?= yes       # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= yes       # Enable keyboard backlight functionality by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= yes           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-
+endif
\ No newline at end of file
index ae1afbbfddb179364ca070adab7e512430100edf..be13fc01713cbb21b1c52e653a9addee55358d6f 100644 (file)
@@ -13,16 +13,16 @@ Depending on which keymap you would like to use, you will have to compile slight
 
 ### Default
 
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
 
 ```
-$ make keymap=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
 
 Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
diff --git a/keyboards/cluecard/rules.mk b/keyboards/cluecard/rules.mk
new file mode 100644 (file)
index 0000000..4542358
--- /dev/null
@@ -0,0 +1,70 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+RGBLIGHT_ENABLE ?= yes       # Enable keyboard underlight functionality (+4870)
+BACKLIGHT_ENABLE ?= yes       # Enable keyboard backlight functionality by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= yes           # Audio output on port C6
index a331ff4dcd97b9a66fa8ddc990f1f89529459ca4..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,70 +1,3 @@
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # 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             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE ?= yes  # Enable numpad's backlight functionality
-RGBLIGHT_ENABLE ?= yes
-# MIDI_ENABLE ?= YES           # MIDI controls
-# UNICODE_ENABLE ?= YES                # Unicode
-# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/cluepad/rules.mk b/keyboards/cluepad/rules.mk
new file mode 100644 (file)
index 0000000..19b16b9
--- /dev/null
@@ -0,0 +1,65 @@
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # 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             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE ?= yes  # Enable numpad's backlight functionality
+RGBLIGHT_ENABLE ?= yes
+# MIDI_ENABLE ?= YES           # MIDI controls
+# UNICODE_ENABLE ?= YES                # Unicode
+# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
\ No newline at end of file
index 05fb588d110b8333bd6da8eb23eaf3b2fda34e4a..7165350050a6296d0f6cfec18d16b7341b051cda 100644 (file)
@@ -1,34 +1,5 @@
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make = Make software.
-#
-# make clean = Clean out built project files.
-#
-# That's pretty much all you need. To compile, always go make clean, 
-# followed by make.
-#
-# For advanced users only:
-# make teensy = Download the hex file to the device, using teensy_loader_cli.
-#               (must have teensy_loader_cli installed).
-#
-#----------------------------------------------------------------------------
 SUBPROJECT_DEFAULT = ez
 
-# Build Options
-#   comment out to disable the options.
-#
-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
-CUSTOM_MATRIX    ?= yes # Custom matrix file for the ErgoDox EZ
-SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
-NKRO_ENABLE      ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-MIDI_ENABLE      ?= no  # MIDI controls
-UNICODE_ENABLE   ?= yes # Unicode
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
index 37e554b30457804a43576c2c13856f5ab6ee35dc..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,76 +1,3 @@
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make = Make software.
-#
-# make clean = Clean out built project files.
-#
-# That's pretty much all you need. To compile, always go make clean, 
-# followed by make.
-#
-# For advanced users only:
-# make teensy = Download the hex file to the device, using teensy_loader_cli.
-#               (must have teensy_loader_cli installed).
-#
-#----------------------------------------------------------------------------
-
-# # project specific files
-SRC = twimaster.c \
-         matrix.c
-
-# MCU name
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   comment out to disable the options.
-#
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox/ez/rules.mk
new file mode 100644 (file)
index 0000000..37e554b
--- /dev/null
@@ -0,0 +1,76 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make = Make software.
+#
+# make clean = Clean out built project files.
+#
+# That's pretty much all you need. To compile, always go make clean, 
+# followed by make.
+#
+# For advanced users only:
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+#----------------------------------------------------------------------------
+
+# # project specific files
+SRC = twimaster.c \
+         matrix.c
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   comment out to disable the options.
+#
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
index ccb735a485beede2222294951d429ab0e754dc79..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,77 +1,3 @@
-# project specific files
-SRC =  matrix.c \
-       led.c
-
-## chip/board settings
-# - the next two should match the directories in
-#   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
-# - For Teensies, FAMILY = KINETIS and SERIES is either
-#   KL2x (LC) or K20x (3.0,3.1,3.2).
-# - For Infinity KB, SERIES = K20x
-MCU_FAMILY = KINETIS
-MCU_SERIES = K20x
-
-# Linker script to use
-# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
-#   or <this_dir>/ld/
-# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
-# - LDSCRIPT =
-#   - MKL26Z64 for Teensy LC
-#   - MK20DX128 for Teensy 3.0
-#   - MK20DX256 for Teensy 3.1 and 3.2
-#   - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader
-#   - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
-MCU_LDSCRIPT = MK20DX256BLDR8
-
-# Startup code to use
-#  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
-# - STARTUP =
-#   - kl2x for Teensy LC
-#   - k20x5 for Teensy 3.0 and Infinity 60%
-#   - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox
-MCU_STARTUP = k20x7
-
-# Board: it should exist either in <chibios>/os/hal/boards/
-#  or <this_dir>/boards
-# - BOARD =
-#   - PJRC_TEENSY_LC for Teensy LC
-#   - PJRC_TEENSY_3 for Teensy 3.0
-#   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
-#   - MCHCK_K20 for Infinity KB
-#BOARD = MCHCK_K20
-BOARD = PJRC_TEENSY_3_1
-
-# Cortex version
-# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
-MCU  = cortex-m4
-
-# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
-# I.e. 6 for Teensy LC; 7 for Teensy 3.x
-ARMV = 7
-
-# Vector table for application
-# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
-# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
-OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
-
-# Build Options
-#   comment out to disable the options.
-#
-CUSTOM_MATRIX ?= yes # Custom matrix file
-SERIAL_LINK_ENABLE = yes
-VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
-LCD_ENABLE ?= yes
-LED_ENABLE ?= yes
-LCD_BACKLIGHT_ENABLE ?= yes
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
-
-ifdef LCD_ENABLE
-include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
-endif
-
-ifdef LED_ENABLE
-include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/ergodox/infinity/rules.mk b/keyboards/ergodox/infinity/rules.mk
new file mode 100644 (file)
index 0000000..ccb735a
--- /dev/null
@@ -0,0 +1,77 @@
+# project specific files
+SRC =  matrix.c \
+       led.c
+
+## chip/board settings
+# - the next two should match the directories in
+#   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+# - For Teensies, FAMILY = KINETIS and SERIES is either
+#   KL2x (LC) or K20x (3.0,3.1,3.2).
+# - For Infinity KB, SERIES = K20x
+MCU_FAMILY = KINETIS
+MCU_SERIES = K20x
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+#   or <this_dir>/ld/
+# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
+# - LDSCRIPT =
+#   - MKL26Z64 for Teensy LC
+#   - MK20DX128 for Teensy 3.0
+#   - MK20DX256 for Teensy 3.1 and 3.2
+#   - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader
+#   - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
+MCU_LDSCRIPT = MK20DX256BLDR8
+
+# Startup code to use
+#  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+# - STARTUP =
+#   - kl2x for Teensy LC
+#   - k20x5 for Teensy 3.0 and Infinity 60%
+#   - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox
+MCU_STARTUP = k20x7
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+#  or <this_dir>/boards
+# - BOARD =
+#   - PJRC_TEENSY_LC for Teensy LC
+#   - PJRC_TEENSY_3 for Teensy 3.0
+#   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
+#   - MCHCK_K20 for Infinity KB
+#BOARD = MCHCK_K20
+BOARD = PJRC_TEENSY_3_1
+
+# Cortex version
+# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
+MCU  = cortex-m4
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+# I.e. 6 for Teensy LC; 7 for Teensy 3.x
+ARMV = 7
+
+# Vector table for application
+# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
+# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
+OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
+
+# Build Options
+#   comment out to disable the options.
+#
+CUSTOM_MATRIX ?= yes # Custom matrix file
+SERIAL_LINK_ENABLE = yes
+VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
+LCD_ENABLE ?= yes
+LED_ENABLE ?= yes
+LCD_BACKLIGHT_ENABLE ?= yes
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
+
+ifdef LCD_ENABLE
+include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
+endif
+
+ifdef LED_ENABLE
+include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
+endif
index f81d7cd8df1338eec5a877eb457a5a2ca8da3b22..a96e415def86be40250e2f12bca32c6b21d4b66b 100644 (file)
@@ -19,10 +19,10 @@ If you are just compiling an existing keymap and don't want to create your own,
 3. Set up a build environment as per the readme.
 4. Copy `keyboards/ergodox/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`)
 5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work.
-6. Compile your firmware by running `make keymap=keymap_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `subproject=infinity` to the make command.
-7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make teensy keymap=keymap_name`.
+6. Compile your firmware by running `make keymap_name`. For example, `make german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `infinity` to the make command like this `make infinity-german`.
+7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make keymap_name-teensy`.
 
-   **Infinity ErgoDox** - Flash the firmware by running `make dfu-util keymap=keymap_name subproject=infinity`
+   **Infinity ErgoDox** - Flash the firmware by running `make infinity-keymap_name-dfu-util`
 8. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics.
 
 Good luck! :)
diff --git a/keyboards/ergodox/rules.mk b/keyboards/ergodox/rules.mk
new file mode 100644 (file)
index 0000000..ac63d4e
--- /dev/null
@@ -0,0 +1,28 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make = Make software.
+#
+# make clean = Clean out built project files.
+#
+# That's pretty much all you need. To compile, always go make clean, 
+# followed by make.
+#
+# For advanced users only:
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+#----------------------------------------------------------------------------
+# Build Options
+#   comment out to disable the options.
+#
+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
+CUSTOM_MATRIX    ?= yes # Custom matrix file for the ErgoDox EZ
+SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE      ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+MIDI_ENABLE      ?= no  # MIDI controls
+UNICODE_ENABLE   ?= yes # Unicode
index 39a9cc0ae1caa9204284c01c754ea897d2a69018..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,74 +1,3 @@
-\r
-\r
-# MCU name\r
-#MCU = at90usb1287\r
-MCU = atmega32u4\r
-\r
-# Processor frequency.\r
-#     This will define a symbol, F_CPU, in all source code files equal to the\r
-#     processor frequency in Hz. You can then use this symbol in your source code to\r
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
-#     automatically to create a 32-bit value in your source code.\r
-#\r
-#     This will be an integer division of F_USB below, as it is sourced by\r
-#     F_USB after it has run through any CPU prescalers. Note that this value\r
-#     does not *change* the processor frequency - it should merely be updated to\r
-#     reflect the processor speed set externally so that the code can use accurate\r
-#     software delays.\r
-F_CPU = 16000000\r
-\r
-\r
-#\r
-# LUFA specific\r
-#\r
-# Target architecture (see library "Board Types" documentation).\r
-ARCH = AVR8\r
-\r
-# Input clock frequency.\r
-#     This will define a symbol, F_USB, in all source code files equal to the\r
-#     input clock frequency (before any prescaling is performed) in Hz. This value may\r
-#     differ from F_CPU if prescaling is used on the latter, and is required as the\r
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed\r
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
-#     at the end, this will be done automatically to create a 32-bit value in your\r
-#     source code.\r
-#\r
-#     If no clock division is performed on the input clock inside the AVR (via the\r
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_USB = $(F_CPU)\r
-\r
-# Interrupt driven control endpoint task(+60)\r
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT\r
-\r
-\r
-# Boot Section Size in *bytes*\r
-#   Teensy halfKay   512\r
-#   Teensy++ halfKay 1024\r
-#   Atmel DFU loader 4096\r
-#   LUFA bootloader  4096\r
-#   USBaspLoader     2048\r
-OPT_DEFS += -DBOOTLOADER_SIZE=4096\r
-\r
-\r
-# Build Options\r
-#   comment out to disable the options.\r
-#\r
-BOOTMAGIC_ENABLE ?= yes                # Virtual DIP switch configuration(+1000)\r
-MOUSEKEY_ENABLE ?= yes         # Mouse keys(+4700)\r
-EXTRAKEY_ENABLE ?= yes         # Audio control and System control(+450)\r
-# CONSOLE_ENABLE ?= yes                # Console for debug(+400)\r
-# COMMAND_ENABLE ?= yes                # Commands for debug and configuration\r
-KEYBOARD_LOCK_ENABLE ?= yes    # Allow locking of keyboard via magic key\r
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE\r
-# SLEEP_LED_ENABLE ?= yes      # Breathing sleep LED during USB suspend\r
-NKRO_ENABLE ?= yes                     # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work\r
-# BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality\r
-# MIDI_ENABLE ?= YES                   # MIDI controls\r
-# UNICODE_ENABLE ?= YES                # Unicode\r
-# BLUETOOTH_ENABLE ?= yes      # Enable Bluetooth with the Adafruit EZ-Key HID\r
-\r
-\r
-ifndef QUANTUM_DIR\r
-       include ../../Makefile\r
-endif\r
-\r
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
index 92302d507ccb4d22d9e70b17bc4bc9104fe162ea..20afb0db0775d04599ef47a856f7387bae8cff6d 100644 (file)
@@ -48,13 +48,15 @@ Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c fo
 Depending on which keymap you would like to use, you will have to compile slightly differently.\r
 \r
 ### Default\r
-To build with the default keymap, simply run `make`.\r
+To build with the default keymap, simply run `make default`.\r
 \r
 ### Other Keymaps\r
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.\r
 \r
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:\r
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:\r
+\r
 ```\r
-$ make KEYMAP=[default|jack|<name>]\r
+$ make [default|jack|<name>]\r
 ```\r
+\r
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.\r
diff --git a/keyboards/gh60/rules.mk b/keyboards/gh60/rules.mk
new file mode 100644 (file)
index 0000000..73f4bd7
--- /dev/null
@@ -0,0 +1,68 @@
+\r
+\r
+# MCU name\r
+#MCU = at90usb1287\r
+MCU = atmega32u4\r
+\r
+# Processor frequency.\r
+#     This will define a symbol, F_CPU, in all source code files equal to the\r
+#     processor frequency in Hz. You can then use this symbol in your source code to\r
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+#     automatically to create a 32-bit value in your source code.\r
+#\r
+#     This will be an integer division of F_USB below, as it is sourced by\r
+#     F_USB after it has run through any CPU prescalers. Note that this value\r
+#     does not *change* the processor frequency - it should merely be updated to\r
+#     reflect the processor speed set externally so that the code can use accurate\r
+#     software delays.\r
+F_CPU = 16000000\r
+\r
+\r
+#\r
+# LUFA specific\r
+#\r
+# Target architecture (see library "Board Types" documentation).\r
+ARCH = AVR8\r
+\r
+# Input clock frequency.\r
+#     This will define a symbol, F_USB, in all source code files equal to the\r
+#     input clock frequency (before any prescaling is performed) in Hz. This value may\r
+#     differ from F_CPU if prescaling is used on the latter, and is required as the\r
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+#     at the end, this will be done automatically to create a 32-bit value in your\r
+#     source code.\r
+#\r
+#     If no clock division is performed on the input clock inside the AVR (via the\r
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_USB = $(F_CPU)\r
+\r
+# Interrupt driven control endpoint task(+60)\r
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT\r
+\r
+\r
+# Boot Section Size in *bytes*\r
+#   Teensy halfKay   512\r
+#   Teensy++ halfKay 1024\r
+#   Atmel DFU loader 4096\r
+#   LUFA bootloader  4096\r
+#   USBaspLoader     2048\r
+OPT_DEFS += -DBOOTLOADER_SIZE=4096\r
+\r
+\r
+# Build Options\r
+#   comment out to disable the options.\r
+#\r
+BOOTMAGIC_ENABLE ?= yes                # Virtual DIP switch configuration(+1000)\r
+MOUSEKEY_ENABLE ?= yes         # Mouse keys(+4700)\r
+EXTRAKEY_ENABLE ?= yes         # Audio control and System control(+450)\r
+# CONSOLE_ENABLE ?= yes                # Console for debug(+400)\r
+# COMMAND_ENABLE ?= yes                # Commands for debug and configuration\r
+KEYBOARD_LOCK_ENABLE ?= yes    # Allow locking of keyboard via magic key\r
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE\r
+# SLEEP_LED_ENABLE ?= yes      # Breathing sleep LED during USB suspend\r
+NKRO_ENABLE ?= yes                     # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work\r
+# BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality\r
+# MIDI_ENABLE ?= YES                   # MIDI controls\r
+# UNICODE_ENABLE ?= YES                # Unicode\r
+# BLUETOOTH_ENABLE ?= yes      # Enable Bluetooth with the Adafruit EZ-Key HID\r
index 711759917370a6886c1e3e79a9fde4c7a5fff1f7..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,73 +1,3 @@
-
-# MCU name
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   change yes to no to disable
-#
-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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
-
-
+endif
\ No newline at end of file
diff --git a/keyboards/handwired/CMD60/rules.mk b/keyboards/handwired/CMD60/rules.mk
new file mode 100644 (file)
index 0000000..7117599
--- /dev/null
@@ -0,0 +1,73 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   change yes to no to disable
+#
+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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
+
+
index 57493a47caffa019f6112be7d716a01f18e7b6ab..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,3 +1,3 @@
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
index 711759917370a6886c1e3e79a9fde4c7a5fff1f7..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,73 +1,3 @@
-
-# MCU name
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   change yes to no to disable
-#
-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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
-
-
+endif
\ No newline at end of file
diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk
new file mode 100644 (file)
index 0000000..7117599
--- /dev/null
@@ -0,0 +1,73 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   change yes to no to disable
+#
+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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
+
+
index 155c1f9a296fff6fbebdc5876b8331354fd5c8e8..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,71 +1,3 @@
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-# 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 ?= yes      # 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 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
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk
new file mode 100644 (file)
index 0000000..c51371a
--- /dev/null
@@ -0,0 +1,67 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+# 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 ?= yes      # 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 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
\ No newline at end of file
index c6d10856a187c74e24d0c916c83f406418128090..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,65 +1,3 @@
-
-
-# MCU name
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-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
-#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk
new file mode 100644 (file)
index 0000000..c6d1085
--- /dev/null
@@ -0,0 +1,65 @@
+
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+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
+#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
+#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/handwired/rules.mk b/keyboards/handwired/rules.mk
new file mode 100644 (file)
index 0000000..e69de29
index 12a4b71f4e13e2eebea753d346231d16b1572c9e..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,89 +1,3 @@
-
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-# for avr upload
-USB ?= /dev/cu.usbmodem1421
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-
-ifdef TEENSY2
-    OPT_DEFS += -DATREUS_TEENSY2
-    ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
-else
-    OPT_DEFS += -DATREUS_ASTAR
-    OPT_DEFS += -DCATERINA_BOOTLOADER
-    ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
-                            avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
-endif
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# MCU name
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   change yes to no to disable
-#
-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 ?= no        # Commands for debug and configuration
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-RGBLIGHT_ENABLE = yes
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
-endif
-
-upload: build
-       $(ATREUS_UPLOAD_COMMAND)
-
+endif
\ No newline at end of file
diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk
new file mode 100644 (file)
index 0000000..12a4b71
--- /dev/null
@@ -0,0 +1,89 @@
+
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+# for avr upload
+USB ?= /dev/cu.usbmodem1421
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+
+ifdef TEENSY2
+    OPT_DEFS += -DATREUS_TEENSY2
+    ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
+else
+    OPT_DEFS += -DATREUS_ASTAR
+    OPT_DEFS += -DCATERINA_BOOTLOADER
+    ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+                            avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+endif
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# MCU name
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+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 ?= no        # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+RGBLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
+
+upload: build
+       $(ATREUS_UPLOAD_COMMAND)
+
index 6fe973e1ebb6892e542e618d4a3e783cf586664a..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,90 +1,3 @@
-
-
-# project specific files
-SRC = matrix.c
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-#OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-# as per original hasu settings
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # 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
-CUSTOM_MATRIX    ?= yes # Custom matrix file for the HHKB
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-# NKRO_ENABLE ?= yes           # USB 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 ?= YES           # MIDI controls
-# UNICODE_ENABLE ?= YES                # Unicode
-# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
-
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-ifneq (, $(findstring yes, $(HHKB_JP)))
-       OPT_DEFS += -DHHKB_JP
-endif
-
-debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
-debug-on: all
-
-debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
-debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
-debug-off: all
+endif
\ No newline at end of file
index 39d49b32a1766312c361e1cbdbf7cf77300ff93e..367c0a08f7e51b866594ad3d7608f31f46bfe34a 100644 (file)
@@ -168,13 +168,15 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
+
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk
new file mode 100644 (file)
index 0000000..b43b5e2
--- /dev/null
@@ -0,0 +1,84 @@
+
+
+# project specific files
+SRC = matrix.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+#OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# as per original hasu settings
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # 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
+CUSTOM_MATRIX    ?= yes # Custom matrix file for the HHKB
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
+# NKRO_ENABLE ?= yes           # USB 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 ?= YES           # MIDI controls
+# UNICODE_ENABLE ?= YES                # Unicode
+# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
+
+ifneq (, $(findstring yes, $(HHKB_JP)))
+       OPT_DEFS += -DHHKB_JP
+endif
+
+debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
+debug-on: all
+
+debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
+debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
+debug-off: all
index 649b43e64ddeb4064a0e7645de100cc17a8eacad..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,70 +1,3 @@
-# project specific files
-SRC =  matrix.c \
-       led.c
-
-## chip/board settings
-# - the next two should match the directories in
-#   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
-# - For Teensies, FAMILY = KINETIS and SERIES is either
-#   KL2x (LC) or K20x (3.0,3.1,3.2).
-# - For Infinity KB, SERIES = K20x
-MCU_FAMILY = KINETIS
-MCU_SERIES = K20x
-
-# Linker script to use
-# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
-#   or <this_dir>/ld/
-# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
-# - LDSCRIPT =
-#   - MKL26Z64 for Teensy LC
-#   - MK20DX128 for Teensy 3.0
-#   - MK20DX256 for Teensy 3.1 and 3.2
-#   - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
-MCU_LDSCRIPT = MK20DX128BLDR4
-
-# Startup code to use
-#  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
-# - STARTUP =
-#   - kl2x for Teensy LC
-#   - k20x5 for Teensy 3.0 and Infinity KB
-#   - k20x7 for Teensy 3.1 and 3.2
-MCU_STARTUP = k20x5
-
-# Board: it should exist either in <chibios>/os/hal/boards/
-#  or <this_dir>/boards
-# - BOARD =
-#   - PJRC_TEENSY_LC for Teensy LC
-#   - PJRC_TEENSY_3 for Teensy 3.0
-#   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
-#   - MCHCK_K20 for Infinity KB
-BOARD = MCHCK_K20
-
-# Cortex version
-# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
-MCU  = cortex-m4
-
-# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
-# I.e. 6 for Teensy LC; 7 for Teensy 3.x
-ARMV = 7
-
-# Vector table for application
-# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
-# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
-OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration
-## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
-MOUSEKEY_ENABLE ?= yes # Mouse keys
-EXTRAKEY_ENABLE ?= yes # Audio control and System control
-CONSOLE_ENABLE ?= yes  # Console for debug
-COMMAND_ENABLE ?= yes    # Commands for debug and configuration
-SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes         # USB Nkey Rollover
-CUSTOM_MATRIX ?= yes # Custom matrix file
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/infinity_chibios/rules.mk b/keyboards/infinity_chibios/rules.mk
new file mode 100644 (file)
index 0000000..56d6470
--- /dev/null
@@ -0,0 +1,66 @@
+# project specific files
+SRC =  matrix.c \
+       led.c
+
+## chip/board settings
+# - the next two should match the directories in
+#   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+# - For Teensies, FAMILY = KINETIS and SERIES is either
+#   KL2x (LC) or K20x (3.0,3.1,3.2).
+# - For Infinity KB, SERIES = K20x
+MCU_FAMILY = KINETIS
+MCU_SERIES = K20x
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+#   or <this_dir>/ld/
+# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
+# - LDSCRIPT =
+#   - MKL26Z64 for Teensy LC
+#   - MK20DX128 for Teensy 3.0
+#   - MK20DX256 for Teensy 3.1 and 3.2
+#   - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
+MCU_LDSCRIPT = MK20DX128BLDR4
+
+# Startup code to use
+#  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+# - STARTUP =
+#   - kl2x for Teensy LC
+#   - k20x5 for Teensy 3.0 and Infinity KB
+#   - k20x7 for Teensy 3.1 and 3.2
+MCU_STARTUP = k20x5
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+#  or <this_dir>/boards
+# - BOARD =
+#   - PJRC_TEENSY_LC for Teensy LC
+#   - PJRC_TEENSY_3 for Teensy 3.0
+#   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
+#   - MCHCK_K20 for Infinity KB
+BOARD = MCHCK_K20
+
+# Cortex version
+# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
+MCU  = cortex-m4
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+# I.e. 6 for Teensy LC; 7 for Teensy 3.x
+ARMV = 7
+
+# Vector table for application
+# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
+# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
+OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration
+## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
+MOUSEKEY_ENABLE ?= yes # Mouse keys
+EXTRAKEY_ENABLE ?= yes # Audio control and System control
+CONSOLE_ENABLE ?= yes  # Console for debug
+COMMAND_ENABLE ?= yes    # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes         # USB Nkey Rollover
+CUSTOM_MATRIX ?= yes # Custom matrix file
\ No newline at end of file
index 75d544f16aa8e07d059adef8c5c75aa8f321b797..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,71 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # 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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-# NKRO_ENABLE ?= yes           # USB Nkey Rollover - not yet supported in LUFA
-BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality
-MIDI_ENABLE ?= YES             # MIDI controls
-# UNICODE_ENABLE ?= YES                # Unicode
-BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk
new file mode 100644 (file)
index 0000000..2f1e266
--- /dev/null
@@ -0,0 +1,67 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # 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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
+# NKRO_ENABLE ?= yes           # USB Nkey Rollover - not yet supported in LUFA
+BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality
+MIDI_ENABLE ?= YES             # MIDI controls
+# UNICODE_ENABLE ?= YES                # Unicode
+BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
\ No newline at end of file
index b00a488b9162c89a9ce0d6f13d4c617ec475fb7c..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,76 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   change yes to no to disable
-#
-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
-KEYBOARD_LOCK_ENABLE ?= yes  # Allow locking of keyboard via magic key
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
+endif
\ No newline at end of file
index acc0df68dc4d17e3679c8ac7d34b06377ddedb87..0639512dd3e5b1977648e90f93738083311aa42c 100644 (file)
@@ -10,18 +10,20 @@ Download or clone the whole firmware and navigate to the keyboards/kc60 folder.
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
+
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
 
 ## WS2812 Support
 ![Image of KC60 with RGB Underglow](keymaps/ws2812/ws2812_example.jpg)
 
-Build with WS2812 Support by running `make KEYMAP=ws2812`.
+Build with WS2812 Support by running `make ws2812`.
diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk
new file mode 100644 (file)
index 0000000..4efd6f9
--- /dev/null
@@ -0,0 +1,70 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+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
+KEYBOARD_LOCK_ENABLE ?= yes  # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
index ca077e63662065c94c8c87adfa2ff51531b2d6fa..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,79 +1,3 @@
-
-## Project specific files
-
-SRC=  matrix.c 
-
-# MCU name
-MCU = at90usb1286
-#MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=1024
-
-
-# Build Options
-#   change yes to no to disable
-#
-BOOTMAGIC_ENABLE ?= yes      # 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 ?= no
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output should be port E6, current quantum library hardcodes C6, which we use for programming
-CUSTOM_MATRIX=yes # need to do our own thing with the matrix
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-
+endif
\ No newline at end of file
index a990f9cb997437d82a3baa90e21b0d04eae3d2e3..79c86581e6930c7bdf5121080ea16c2c2ec8d1d2 100644 (file)
@@ -27,16 +27,16 @@ Depending on which keymap you would like to use, you will have to compile slight
 
 ### Default
 
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
 
 ```
-$ make keymap=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
 
 Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk
new file mode 100644 (file)
index 0000000..a4a2b7d
--- /dev/null
@@ -0,0 +1,73 @@
+
+## Project specific files
+
+SRC=  matrix.c 
+
+# MCU name
+MCU = at90usb1286
+#MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=1024
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= yes      # 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 ?= no
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output should be port E6, current quantum library hardcodes C6, which we use for programming
+CUSTOM_MATRIX=yes # need to do our own thing with the matrix
index b9f07636be0c25186f1fd745e46c040003b31e8d..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,78 +1,3 @@
-SRC += matrix.c \
-          i2c.c \
-          split_util.c \
-          serial.c
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-# 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 ?= no            # 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 ?= 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
-
-CUSTOM_MATRIX = yes
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
new file mode 100644 (file)
index 0000000..6961fbd
--- /dev/null
@@ -0,0 +1,74 @@
+SRC += matrix.c \
+          i2c.c \
+          split_util.c \
+          serial.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# 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 ?= no            # 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 ?= 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
+
+CUSTOM_MATRIX = yes
\ No newline at end of file
index 3a71fd0ee3e56db8271343a1db792e8f57f75f16..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,74 +1,3 @@
-
-
-SRC = led.c
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no  # 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             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE ?=yes   # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= no  # Enable keyboard backlight functionality (+1150)
-MIDI_ENABLE ?= no              # MIDI controls
-AUDIO_ENABLE ?= no
-UNICODE_ENABLE ?= no           # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk
new file mode 100644 (file)
index 0000000..c6b8ca6
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+SRC = led.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= no  # 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             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE ?=yes   # Enable keyboard underlight functionality (+4870)
+BACKLIGHT_ENABLE ?= no  # Enable keyboard backlight functionality (+1150)
+MIDI_ENABLE ?= no              # MIDI controls
+AUDIO_ENABLE ?= no
+UNICODE_ENABLE ?= no           # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
index 23944f92ea3b5785ee452bf66d942951fa865cf6..7d49c5ef967d46e5f0beacd470bbc34e90b393c1 100644 (file)
@@ -1,74 +1,5 @@
-
 SUBPROJECT_DEFAULT = rev4
 
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-# 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 ?= no            # 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 ?= 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
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
index f89fdeb931a9da1f8fa02def16d41fa2de94b908..4b24a690e04d2d8f3632b89a1264decc5a114511 100644 (file)
@@ -13,15 +13,17 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
+
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
 
 ### Notable forks (which some of the keymap files are from)
index 3ed1445e434f081285ea25e3b0c6cdde98b9e62c..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,5 +1,3 @@
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk
new file mode 100644 (file)
index 0000000..3ed1445
--- /dev/null
@@ -0,0 +1,5 @@
+AUDIO_ENABLE ?= no           # Audio output on port C6
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
\ No newline at end of file
index ed09f85a4d49fb5ac4a2a1113f033255e2e6cab6..191c6bb664de85727cd5fb1c36ab6f14ab207d96 100644 (file)
@@ -1,5 +1,3 @@
-AUDIO_ENABLE ?= yes           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../../Makefile
 endif
\ No newline at end of file
diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk
new file mode 100644 (file)
index 0000000..ed09f85
--- /dev/null
@@ -0,0 +1,5 @@
+AUDIO_ENABLE ?= yes           # Audio output on port C6
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk
new file mode 100644 (file)
index 0000000..25db53a
--- /dev/null
@@ -0,0 +1,67 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# 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 ?= no            # 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 ?= 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
\ No newline at end of file
index 08e9205cbf1f30a6223dd98f0f40f094288556d8..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,73 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-# 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 ?= no            # 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 ?= 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
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
 endif
\ No newline at end of file
index f0be255a0952ce08610358115d70cf428d276184..10763ee97a406bf61082ca80ce70f342c552c4b4 100644 (file)
@@ -13,13 +13,15 @@ Download or clone the whole firmware and navigate to the keyboards/preonic folde
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap, create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
+
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk
new file mode 100644 (file)
index 0000000..d0f3a3a
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# 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 ?= no            # 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 ?= 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
\ No newline at end of file
index 2dd8cc5f79af574aadce97b5c477cf1fff18f0ab..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,74 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes                # 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
-KEYBOARD_LOCK_ENABLE ?= yes    # Allow locking of keyboard via magic key
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-# SLEEP_LED_ENABLE ?= yes      # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes                     # USB 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 ?= YES                   # MIDI controls
-# UNICODE_ENABLE ?= YES                # Unicode
-# BLUETOOTH_ENABLE ?= yes      # Enable Bluetooth with the Adafruit EZ-Key HID
-
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
+endif
\ No newline at end of file
index b01a1a9ca994ec9a8eb9d8e468a4d98bb72de050..77df861cef30ddf1b22c1dba4e37432df34c848a 100644 (file)
@@ -12,13 +12,15 @@ Download or clone the whole firmware and navigate to the keyboards/retro_refit f
 Depending on which keymap you would like to use, you will have to compile slightly differently.
 
 ### Default
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
 ```
-$ make KEYMAP=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
+
 Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
\ No newline at end of file
diff --git a/keyboards/retro_refit/rules.mk b/keyboards/retro_refit/rules.mk
new file mode 100644 (file)
index 0000000..10fbfa5
--- /dev/null
@@ -0,0 +1,68 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes                # 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
+KEYBOARD_LOCK_ENABLE ?= yes    # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE ?= yes      # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes                     # USB 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 ?= YES                   # MIDI controls
+# UNICODE_ENABLE ?= YES                # Unicode
+# BLUETOOTH_ENABLE ?= yes      # Enable Bluetooth with the Adafruit EZ-Key HID
index 8b51d4609f8edb457ae5a1fbcf1dae69b444bf60..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,75 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   change yes to no to disable
-#
-BOOTMAGIC_ENABLE ?= yes      # 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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-
+endif
\ No newline at end of file
index 099d5869914f0c4c65ac9587006d29df0a06e2d4..94ce829223b4305a4f54c2cfa005a41310c8b10a 100644 (file)
@@ -42,9 +42,9 @@ The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.
 
 ## Building the firmware
 
-To build firmware binary hex file with a certain keymap just run `make` with the `keymap` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
 
-    $ make keymap=[custom|poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|<name>]
+    $ make [custom|poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|<name>]
 
 For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started).
 
diff --git a/keyboards/s60-x/rules.mk b/keyboards/s60-x/rules.mk
new file mode 100644 (file)
index 0000000..7ec9393
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= yes      # 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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
\ No newline at end of file
index a0879fc9c9bf358ec13eba7b384a7b5ad28698e2..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,70 +1,3 @@
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-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 ?= yes  # Console for debug(+400)
-COMMAND_ENABLE ?= yes    # Commands for debug and configuration
-NKRO_ENABLE ?= yes             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE ?= yes   # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality (+1150)
-MIDI_ENABLE ?= no              # MIDI controls
-AUDIO_ENABLE ?= no
-UNICODE_ENABLE ?= no           # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
+endif
\ No newline at end of file
diff --git a/keyboards/satan/rules.mk b/keyboards/satan/rules.mk
new file mode 100644 (file)
index 0000000..1102584
--- /dev/null
@@ -0,0 +1,66 @@
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+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 ?= yes  # Console for debug(+400)
+COMMAND_ENABLE ?= yes    # Commands for debug and configuration
+NKRO_ENABLE ?= yes             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE ?= yes   # Enable keyboard underlight functionality (+4870)
+BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality (+1150)
+MIDI_ENABLE ?= no              # MIDI controls
+AUDIO_ENABLE ?= no
+UNICODE_ENABLE ?= no           # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
index 6f273064a7aadf589b93ede1caec4b825d5ed5eb..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,75 +1,3 @@
-
-
-SRC = matrix.c
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega16u2
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= no         # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no          # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= no          # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no           # Console for debug(+400)
-COMMAND_ENABLE ?= no           # Commands for debug and configuration
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= no                      # USB 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
-UNICODE_ENABLE ?= no           # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-CUSTOM_MATRIX = yes
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
+endif
\ No newline at end of file
diff --git a/keyboards/sixkeyboard/rules.mk b/keyboards/sixkeyboard/rules.mk
new file mode 100644 (file)
index 0000000..2c99985
--- /dev/null
@@ -0,0 +1,70 @@
+
+
+SRC = matrix.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega16u2
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= no         # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= no          # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= no          # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no           # Console for debug(+400)
+COMMAND_ENABLE ?= no           # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= no                      # USB 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
+UNICODE_ENABLE ?= no           # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
+CUSTOM_MATRIX = yes
\ No newline at end of file
index 45ca1278074c490f71e9f2cbbe54a6f0cd267caa..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,75 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-#   change yes to no to disable
-#
-BOOTMAGIC_ENABLE ?= yes      # 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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= yes           # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-
+endif
\ No newline at end of file
index e3b557fe2de8becaea37aad83a0b97e408f2afd4..4f691a4ca0ec1635b7826a2a09fae26e7f417aac 100644 (file)
@@ -13,16 +13,16 @@ Depending on which keymap you would like to use, you will have to compile slight
 
 ### Default
 
-To build with the default keymap, simply run `make`.
+To build with the default keymap, simply run `make default`.
 
 ### Other Keymaps
 
 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
 
-To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
 
 ```
-$ make keymap=[default|jack|<name>]
+$ make [default|jack|<name>]
 ```
 
 Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
\ No newline at end of file
diff --git a/keyboards/tv44/rules.mk b/keyboards/tv44/rules.mk
new file mode 100644 (file)
index 0000000..dbba6ba
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= yes      # 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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= yes           # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
diff --git a/message.mk b/message.mk
new file mode 100644 (file)
index 0000000..fb1a7a1
--- /dev/null
@@ -0,0 +1,71 @@
+COLOR ?= true
+
+ifeq ($(COLOR),true)
+       NO_COLOR=\033[0m
+       OK_COLOR=\033[32;01m
+       ERROR_COLOR=\033[31;01m
+       WARN_COLOR=\033[33;01m
+       BLUE=\033[0;34m
+       BOLD=\033[1m
+endif
+
+ifneq ($(shell awk --version 2>/dev/null),)
+       AWK=awk
+else
+       AWK=cat && test
+endif
+
+ON_ERROR ?= exit 1
+
+OK_STRING=$(OK_COLOR)[OK]$(NO_COLOR)\n
+ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)\n
+WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)\n
+
+TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }'
+TAB_LOG_PLAIN = printf "$$LOG\n"
+AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
+AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }'
+PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && $(ON_ERROR)
+PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
+PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && $(ON_ERROR)
+PRINT_WARNING_PLAIN = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN)
+PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS)
+BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi;
+MAKE_MSG_FORMAT = $(AWK) '{ printf "%-118s", $$0;}'
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_ERRORS = $(ERROR_COLOR)Make finished with errors\n$(NO_COLOR)
+MSG_BEGIN = -------- begin --------
+MSG_END = --------  end  --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_COFF = Converting to AVR COFF:
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
+MSG_FLASH = Creating load file for Flash:
+MSG_EEPROM = Creating load file for EEPROM:
+MSG_BIN = Creating binary load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling:
+MSG_COMPILING_CPP = Compiling:
+MSG_ASSEMBLING = Assembling:
+MSG_CLEANING = Cleaning project:
+MSG_CREATING_LIBRARY = Creating library:
+MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
+       Some git sub-modules are out of date or modified, please consider runnning:$(BOLD)\n\
+       git submodule sync --recursive\n\
+       git submodule update --init --recursive$(NO_COLOR)\n\n\
+       You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\
+       or if you have modified the ChibiOS libraries yourself. \n\n
+MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR)
+
+define GENERATE_MSG_MAKE_KB
+    MSG_MAKE_KB_ACTUAL := Making $$(KB_SP) with keymap $(BOLD)$$(CURRENT_KM)$(NO_COLOR)
+    ifneq ($$(MAKE_TARGET),)
+        MSG_MAKE_KB_ACTUAL += and target $(BOLD)$$(MAKE_TARGET)$(NO_COLOR)
+    endif
+endef
+MSG_MAKE_KB = $(eval $(call GENERATE_MSG_MAKE_KB))$(MSG_MAKE_KB_ACTUAL)
index 3f6d133c9b39a73c68f72aa9783d43a7e17a8388..4e2a6f00fd8ea2e3d2f25fa611a2cba9d6d98783 100644 (file)
@@ -1,75 +1,3 @@
-
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
-
-# Build Options
-#   change yes to no to disable
-#
-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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no            # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no            # MIDI controls
-UNICODE_ENABLE ?= no         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no           # Audio output on port C6
-
-ifndef QUANTUM_DIR
+ifndef MAKEFILE_INCLUDED
        include ../../Makefile
-endif
-
-
+endif
\ No newline at end of file
diff --git a/quantum/template/rules.mk b/quantum/template/rules.mk
new file mode 100644 (file)
index 0000000..5589814
--- /dev/null
@@ -0,0 +1,67 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+#   change yes to no to disable
+#
+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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
index 05c55110904517b15178b72f4684326b43bf3bb2..f2c202e358fc0fe859d0a8dd04632d73b548827d 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -157,43 +157,103 @@ In every keymap folder, the following files are recommended:
 
 ## The `make` command
 
-The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). You can run `make` from the root (`/`), your keyboard folder (`/keyboards/<keyboard>/`), or your keymap folder (`/keyboards/<keyboard>/keymaps/<keymap>/`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)).
+The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys).
 
-By default, this will generate 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.
+**NOTE:** To abort a make command press `Ctrl-c`
 
-Below are some definitions that will be useful:
+The following instruction refers to these folders.
 
-* The "root" (`/`) folder is the qmk_firmware folder, in which are `doc`, `keyboard`, `quantum`, etc.
-* The "keyboard" folder is any keyboard project's folder, like `/keyboards/planck`.
-* The "keymap" folder is any keymap's folder, like `/keyboards/planck/keymaps/default`.
+* The `root` (`/`) folder is the qmk_firmware folder, in which are `doc`, `keyboard`, `quantum`, etc.
+* The `keyboard` folder is any keyboard project's folder, like `/keyboards/planck`.
+* The `keymap` folder is any keymap's folder, like `/keyboards/planck/keymaps/default`.
+* The `subproject` folder is the subproject folder of a keyboard, like `/keyboards/ergodox/ez`
 
-Below is a list of the useful `make` commands in QMK:
+### Simple instructions for building and uploading a keyboard
 
-* `make` - builds your keyboard and keymap depending on which folder you're in. This defaults to the "default" layout (unless in a keymap folder), and Planck keyboard in the root folder
-  * `make keyboard=<keyboard>` - specifies the keyboard (only to be used in root)
-  * `make keymap=<keymap>` - specifies the keymap (only to be used in root and keyboard folder - not needed when in keymap folder)
-* `make clean` - cleans the `.build` folder, ensuring that everything is re-built
-* `make dfu` - (requires dfu-programmer) builds and flashes the keymap to your keyboard once placed in reset/dfu mode (button or press `KC_RESET`). This does not work for Teensy-based keyboards like the ErgoDox EZ.
-  * `keyboard=` and `keymap=` are compatible with this
-* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root)
-* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root)
-* `make all-keymaps [keyboard=<keyboard>]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `<keyboard>`
-* `make all-keyboards-*`, `make all-keyboards-default-*` and `make all-keymaps-* [keyboard=<keyboard>]` - like the normal "make-all-*" commands, but the last string aftter the `-` (for example clean) is passed to the keyboard make command.
-Other, less useful functionality:
+**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
+
+If the `keymap` folder contains a file name `Makefile`
+
+1. Change the directory to the `keymap` folder 
+2. Run `make <subproject>-<programmer>`
+
+Otherwise, if there's no `Makefile` in the `keymap` folder
+
+1. Enter the `keyboard` folder
+2. Run `make <subproject>-<keymap>-<programmer>`
+
+In the above commands, replace:
+
+* `<keymap>` with the name of your keymap
+* `<subproject>` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
+  * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command.
+* `<programmer>` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use.
+  * If you  don't add `-<programmer` to the command line, the firmware will be still be compiled into a hex file, but the upload will be skipped.
+
+**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make dfu`
+
+### 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:
+
+* `<keyboard>` is the name of the keyboard, for example `planck`
+  * Use `allkb` to compile all keyboards
+* `<subproject>` is the name of the subproject (revision or sub-model of the keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
+  * If the keyboard doesn't have any subprojects, it can be left out
+  * To compile the default subproject, you can leave it out, or specify `defaultsp`
+  * Use `allsp` to compile all subprojects
+* `<keymap>` is the name of the keymap, for example `algernon`
+  * 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 (see the example [here](/doc/keymap_makefile_example.mk))
+* `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`.
+* `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
 * `make SILENT=true` - turns off output besides errors/warnings
-* `make VERBOSE=true` - outputs all of the avr-gcc stuff (not interesting)
+* `make VERBOSE=true` - outputs all of the gcc stuff (not interesting, unless you need to debug)
+
+The make command itself also has some additional options, type `make --help` for more information. The most useful is probably `-jx`, which specifies that you want to compile using more than one CPU, the `x` represents the number of CPUs that you want to use. Setting that can greatly reduce the compile times, especially if you are compiling many keyboards/keymaps. I usually set it to one less than the number of CPUs that I have, so that I have some left for doing other things while it's compiling. Note that not all operating systems and make versions supports that option.
+
+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`
 
-There are 3 different `make` and `Makefile` locations:
+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](/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.**
 
-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](/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. **It 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
 
index cb67ac6f25ba311815b8c005c9388c6903d583d8..062a712bd106d5c5b3d4e601a59c938a3aee6e79 100644 (file)
@@ -89,9 +89,9 @@ CHIBISRC = $(STARTUPSRC) \
           $(STARTUPASM) \
           $(PORTASM) \
           $(OSALASM)         
-          
-SRC += $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC))
 
+CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC))
+          
 EXTRAINCDIRS += $(CHIBIOS)/os/license \
          $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
          $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
@@ -143,14 +143,6 @@ MCUFLAGS = -mcpu=$(MCU)
 
 DEBUG = gdb
 
-# Define ASM defines here
-# bootloader definitions may be used in the startup .s file
-ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","")
-    OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
-else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
-    OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
-endif
-
 # List any extra directories to look for libraries here.
 EXTRALIBDIRS = $(RULESPATH)/ld
 
index 429c57143535b29d36c354bd2ce8c50466610e66..0b767eb047dbf0d06f980dbe275b65644f4a5831 100644 (file)
@@ -110,9 +110,6 @@ $(error MASTER does not have a valid value(left/right))
 endif
 
 
-# Version string
-OPT_DEFS += -DVERSION=$(GIT_VERSION)
-
 # Bootloader address
 ifdef STM32_BOOTLOADER_ADDRESS
     OPT_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS)
index 084c9fe1555fac3b5d44d8a12c7f72da1d37865c..476fc6fe3c59cce819c0bfbeebbb0ace19bcdb6e 100644 (file)
@@ -34,6 +34,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "command.h"
 #include "backlight.h"
 #include "quantum.h"
+#include "version.h"
 
 #ifdef MOUSEKEY_ENABLE
 #include "mousekey.h"
@@ -180,7 +181,7 @@ static void print_version(void)
     print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") "
           "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") "
           "VER: " STR(DEVICE_VER) "\n");
-    print("BUILD: " STR(VERSION) " (" __TIME__ " " __DATE__ ")\n");
+    print("BUILD: " STR(QMK_VERSION) " (" __TIME__ " " __DATE__ ")\n");
 
     /* build options */
     print("OPTIONS:"
index d2350f27c12c8f2619ba9ff3fd44bf3e9cd421bc..21011c2808f5898e23026fd6338b32df2791d19f 100644 (file)
@@ -25,6 +25,18 @@ vpath %.hpp $(VPATH_SRC)
 vpath %.S $(VPATH_SRC)
 VPATH :=
 
+# Convert all SRC to OBJ
+define OBJ_FROM_SRC
+$(patsubst %.c,$1/%.o,$(patsubst %.cpp,$1/%.o,$(patsubst %.S,$1/%.o,$($1_SRC))))
+endef
+$(foreach OUTPUT,$(OUTPUTS),$(eval $(OUTPUT)_OBJ +=$(call OBJ_FROM_SRC,$(OUTPUT))))
+
+# Define a list of all objects
+OBJ := $(foreach OUTPUT,$(OUTPUTS),$($(OUTPUT)_OBJ))
+
+MASTER_OUTPUT := $(firstword $(OUTPUTS))
+
+
 
 # Output format. (can be srec, ihex, binary)
 FORMAT = ihex
@@ -34,50 +46,8 @@ FORMAT = ihex
 #     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
 OPT = s
 
-COLOR ?= true
-
-ifeq ($(COLOR),true)
-       NO_COLOR=\033[0m
-       OK_COLOR=\033[32;01m
-       ERROR_COLOR=\033[31;01m
-       WARN_COLOR=\033[33;01m
-       BLUE=\033[0;34m
-       BOLD=\033[1m
-endif
-
 AUTOGEN ?= false
 
-ifneq ($(shell awk --version 2>/dev/null),)
-       AWK=awk
-else
-       AWK=cat && test
-endif
-
-OK_STRING=$(OK_COLOR)[OK]$(NO_COLOR)\n
-ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)\n
-WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)\n
-
-ifndef $(SILENT)
-       SILENT = false
-endif
-
-TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }'
-TAB_LOG_PLAIN = printf "$$LOG\n"
-AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
-AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }'
-PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && exit 1
-PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
-PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && exit 1
-PRINT_WARNING_PLAIN = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN)
-PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS)
-BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi;
-
-# List any extra directories to look for include files here.
-#     Each directory must be seperated by a space.
-#     Use forward slashes for directory separators.
-#     For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS += $(subst :, ,$(VPATH_SRC))
-
 
 # Compiler flag to set the C Standard level.
 #     c89   = "ANSI" C
@@ -88,17 +58,18 @@ CSTANDARD = -std=gnu99
 
 
 # Place -D or -U options here for C sources
-CDEFS += $(OPT_DEFS)
+#CDEFS +=
 
 
 # Place -D or -U options here for ASM sources
-ADEFS += $(OPT_DEFS)
+#ADEFS +=
 
 
 # Place -D or -U options here for C++ sources
 #CPPDEFS += -D__STDC_LIMIT_MACROS
 #CPPDEFS += -D__STDC_CONSTANT_MACROS
-CPPDEFS += $(OPT_DEFS)
+#CPPDEFS +=
+
 
 
 
@@ -126,11 +97,7 @@ CFLAGS += -Wstrict-prototypes
 #CFLAGS += -Wunreachable-code
 #CFLAGS += -Wsign-compare
 CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
 CFLAGS += $(CSTANDARD)
-ifdef CONFIG_H
-    CFLAGS += -include $(CONFIG_H)
-endif
 
 
 #---------------- Compiler Options C++ ----------------
@@ -153,12 +120,7 @@ CPPFLAGS += -Wundef
 #CPPFLAGS += -Wunreachable-code
 #CPPFLAGS += -Wsign-compare
 CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
-CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
 #CPPFLAGS += $(CSTANDARD)
-ifdef CONFIG_H
-    CPPFLAGS += -include $(CONFIG_H)
-endif
-
 
 #---------------- Assembler Options ----------------
 #  -Wa,...:   tell GCC to pass this to the assembler.
@@ -169,11 +131,8 @@ endif
 #             files -- see avr-libc docs [FIXME: not yet described there]
 #  -listing-cont-lines: Sets the maximum number of continuation lines of hex
 #       dump that will be displayed for a given single line of source input.
-ASFLAGS += $(ADEFS) -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
-ASFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-ifdef CONFIG_H
-    ASFLAGS += -include $(CONFIG_H)
-endif
+ASFLAGS += $(ADEFS) 
+ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
 
 #---------------- Library Options ----------------
 # Minimalistic printf version
@@ -228,48 +187,6 @@ COPY = cp
 WINSHELL = cmd
 SECHO = $(SILENT) || echo
 
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = -------- begin --------
-MSG_END = --------  end  --------
-MSG_SIZE_BEFORE = Size before:
-MSG_SIZE_AFTER = Size after:
-MSG_COFF = Converting to AVR COFF:
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
-MSG_FLASH = Creating load file for Flash:
-MSG_EEPROM = Creating load file for EEPROM:
-MSG_BIN = Creating binary load file for Flash:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling:
-MSG_COMPILING_CPP = Compiling:
-MSG_ASSEMBLING = Assembling:
-MSG_CLEANING = Cleaning project:
-MSG_CREATING_LIBRARY = Creating library:
-MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
-       Some git sub-modules are out of date or modified, please consider runnning:$(BOLD)\n\
-       git submodule sync --recursive\n\
-       git submodule update --init --recursive$(NO_COLOR)\n\n\
-       You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\
-       or if you have modified the ChibiOS libraries yourself. \n\n
-
-
-# Define all object files.
-OBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(patsubst %.cpp,$(OBJDIR)/%.o,$(patsubst %.S,$(OBJDIR)/%.o,$(SRC))))
-# The files in the lib folder are shared between all keymaps, so generate that folder name by removing
-# the keymap from the name
-KBOBJDIR=$(subst _$(KEYMAP),,$(OBJDIR))
-# And fixup the object files to match
-LIBOBJ = $(foreach v,$(OBJ),$(if $(findstring /lib/,$v),$v))
-NONLIBOBJ := $(filter-out $(LIBOBJ),$(OBJ))
-LIBOBJ := $(subst _$(KEYMAP)/,/,$(LIBOBJ))
-OBJ := $(LIBOBJ) $(NONLIBOBJ)
-
-# Define all listing files.
-LST = $(patsubst %.c,$(OBJDIR)/%.lst,$(patsubst %.cpp,$(OBJDIR)/%.lst,$(patsubst %.S,$(OBJDIR)/%.lst,$(SRC))))
-
 
 # Compiler flags to generate dependency files.
 #GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
@@ -302,15 +219,6 @@ sym: $(BUILD_DIR)/$(TARGET).sym
 LIBNAME=lib$(TARGET).a
 lib: $(LIBNAME)
 
-check_submodule:
-       git submodule status --recursive | \
-       while IFS= read -r x; do \
-               case "$$x" in \
-                       \ *) ;; \
-                       *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
-               esac \
-       done
-
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
 #ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
@@ -364,91 +272,79 @@ gccversion :
        $(eval CMD=$(BIN) $< $@ || exit 0)
        @$(BUILD_CMD)
 
-# Create library from object files.
-.SECONDARY : $(BUILD_DIR)/$(TARGET).a
-.PRECIOUS : $(OBJ)
-%.a: $(OBJ)
-       @$(SILENT) || printf "$(MSG_CREATING_LIBRARY) $@" | $(AWK_CMD)
-       $(eval CMD=$(AR) $@ $(OBJ) )
-       @$(BUILD_CMD)
-
-BEGIN = gccversion check_submodule sizebefore
+BEGIN = gccversion sizebefore
 
 # Link: create ELF output file from object files.
 .SECONDARY : $(BUILD_DIR)/$(TARGET).elf
 .PRECIOUS : $(OBJ)
 # Note the obj.txt depeendency is there to force linking if a source file is deleted
-%.elf: $(OBJ) $(OBJDIR)/cflags.txt $(OBJDIR)/ldflags.txt $(OBJDIR)/obj.txt | $(BEGIN)
+%.elf: $(OBJ) $(MASTER_OUTPUT)/cflags.txt $(MASTER_OUTPUT)/ldflags.txt $(MASTER_OUTPUT)/obj.txt | $(BEGIN)
        @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
        $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS))
        @$(BUILD_CMD)
+       
 
 define GEN_OBJRULE
+$1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC))
+ifdef $1_CONFIG
+$1_CONFIG_FLAGS += -include $$($1_CONFIG)
+endif
+$1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
+$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
+$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
+
 # Compile: create object files from C source files.
 $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)
        @mkdir -p $$(@D)
        @$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
-       $$(eval CMD=$$(CC) -c $$(ALL_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
+       $$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
        @$$(BUILD_CMD)
 
 # Compile: create object files from C++ source files.
 $1/%.o : %.cpp $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN)
        @mkdir -p $$(@D)
        @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD)
-       $$(eval CMD=$$(CC) -c $$(ALL_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
+       $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
        @$(BUILD_CMD)
 
 # Assemble: create object files from assembler source files.
 $1/%.o : %.S $1/asflags.txt $1/compiler.txt | $(BEGIN)
        @mkdir -p $$(@D)
        @$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD)
-       $$(eval CMD=$$(CC) -c $$(ALL_ASFLAGS) $$< -o $$@)
+       $$(eval CMD=$$(CC) -c $$($1_ASFLAGS) $$< -o $$@)
        @$$(BUILD_CMD)
 
 $1/force:
 
 $1/cflags.txt: $1/force
-       echo '$$(ALL_CFLAGS)' | cmp -s - $$@ || echo '$$(ALL_CFLAGS)' > $$@
+       echo '$$($1_CFLAGS)' | cmp -s - $$@ || echo '$$($1_CFLAGS)' > $$@
 
 $1/cppflags.txt: $1/force
-       echo '$$(ALL_CPPFLAGS)' | cmp -s - $$@ || echo '$$(ALL_CPPFLAGS)' > $$@
+       echo '$$($1_CPPFLAGS)' | cmp -s - $$@ || echo '$$($1_CPPFLAGS)' > $$@
 
 $1/asflags.txt: $1/force
-       echo '$$(ALL_ASFLAGS)' | cmp -s - $$@ || echo '$$(ALL_ASFLAGS)' > $$@
-
-$1/ldflags.txt: $1/force
-       echo '$$(LDFLAGS)' | cmp -s - $$@ || echo '$$(LDFLAGS)' > $$@
-
-$1/obj.txt: $1/force
-       echo '$$(OBJ)' | cmp -s - $$@ || echo '$$(OBJ)' > $$@
+       echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@
 
 $1/compiler.txt: $1/force
        $$(CC) --version | cmp -s - $$@ || $$(CC) --version > $$@
 endef
 
+$(MASTER_OUTPUT)/obj.txt: $(MASTER_OUTPUT)/force
+       echo '$(OBJ)' | cmp -s - $$@ || echo '$(OBJ)' > $$@
+
+$(MASTER_OUTPUT)/ldflags.txt: $(MASTER_OUTPUT)/force
+       echo '$(LDFLAGS)' | cmp -s - $$@ || echo '$(LDFLAGS)' > $$@
+
+
 # We have to use static rules for the .d files for some reason
 DEPS = $(patsubst %.o,%.d,$(OBJ))
 # Keep the .d files
 .PRECIOUS: $(DEPS)
 # Empty rule to force recompilation if the .d file is missing
 $(DEPS):
+       
 
-# Since the object files could be in two different folders, generate
-# separate rules for them, rather than having too generic rules
-$(eval $(call GEN_OBJRULE,$(OBJDIR)))
-$(eval $(call GEN_OBJRULE,$(KBOBJDIR)))
-
-# Compile: create assembler files from C source files.
-%.s : %.c | $(BEGIN)
-       @$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
-       $(eval CMD=$(CC) -S $(ALL_CFLAGS) $< -o $@)
-       @$(BUILD_CMD)
-
-# Compile: create assembler files from C++ source files.
-%.s : %.cpp | $(BEGIN)
-       @$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
-       $(eval CMD=$(CC) -S $(ALL_CPPFLAGS) $< -o $@)
-       @$(BUILD_CMD)
+$(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT))))
 
 # Create preprocessed source for use in sending a bug report.
 %.i : %.c | $(BEGIN)
@@ -456,71 +352,19 @@ $(eval $(call GEN_OBJRULE,$(KBOBJDIR)))
 
 # Target: clean project.
 clean:
-       $(REMOVE) -r $(OBJDIR) 2>/dev/null
-       $(REMOVE) -r $(KBOBJDIR) 2>/dev/null
+       $(foreach OUTPUT,$(OUTPUTS), $(REMOVE) -r $(OUTPUT) 2>/dev/null)
        $(REMOVE) $(BUILD_DIR)/$(TARGET).*
 
 show_path:
        @echo VPATH=$(VPATH)
        @echo SRC=$(SRC)
-
-SUBDIRS := $(filter-out %/util/ %/doc/ %/keymaps/ %/old_keymap_files/,$(dir $(wildcard $(TOP_DIR)/keyboards/**/*/Makefile)))
-SUBDIRS := $(SUBDIRS) $(dir $(wildcard $(TOP_DIR)/keyboards/*/.))
-SUBDIRS := $(sort $(SUBDIRS))
-# $(error $(SUBDIRS))
-all-keyboards-defaults-%:
-       @for x in $(SUBDIRS) ; do \
-               printf "Compiling with default: $$x" | $(AWK_CMD); \
-               LOG=$$($(MAKE) -C $$x $(subst all-keyboards-defaults-,,$@) VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
-       done
-
-all-keyboards-defaults: all-keyboards-defaults-all
-
-KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboards/%/=/keyboards/%)
-all-keyboards-all: $(addsuffix -all,$(KEYBOARDS))
-all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS))
-all-keyboards: all-keyboards-all
-
-define make_keyboard
-$(eval KEYBOARD=$(patsubst /keyboards/%,%,$1))
-$(eval SUBPROJECT=$(lastword $(subst /, ,$(KEYBOARD))))
-$(eval KEYBOARD=$(firstword $(subst /, ,$(KEYBOARD))))
-$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboards/$(KEYBOARD)/keymaps/*/.))))
-$(eval KEYMAPS+=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/*/.))))
-@for x in $(KEYMAPS) ; do \
-       printf "Compiling $(BOLD)$(KEYBOARD)/$(SUBPROJECT)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-118s", $$0; }'; \
-       LOG=$$($(MAKE) -C $(TOP_DIR)$1 $2 keymap=$$x VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
-done
-endef
-
-define make_keyboard_helper
-# Just remove the -all and so on from the first argument and pass it forward
-$(call make_keyboard,$(subst -$2,,$1),$2)
-endef
-
-/keyboards/%-all:
-       $(call make_keyboard_helper,$@,all)
-/keyboards/%-clean:
-       $(call make_keyboard_helper,$@,clean)
-/keyboards/%:
-       $(call make_keyboard_helper,$@,all)
-
-all-keymaps-%:
-       $(eval MAKECONFIG=$(call get_target,all-keymaps,$@))
-       $(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboards/$(KEYBOARD)/keymaps/*/.))))
-       @for x in $(KEYMAPS) ; do \
-               printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-118s", $$0; }'; \
-               LOG=$$($(MAKE) $(subst all-keymaps-,,$@) keyboard=$(KEYBOARD) keymap=$$x VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
-       done
-
-all-keymaps: all-keymaps-all
+       @echo OBJ=$(OBJ)
 
 # Create build directory
 $(shell mkdir $(BUILD_DIR) 2>/dev/null)
 
 # Create object files directory
-$(shell mkdir $(OBJDIR) 2>/dev/null)
-$(shell mkdir $(KBOBJDIR) 2>/dev/null)
+$(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir $(OUTPUT) 2>/dev/null)))
 
 # Include the dependency files.
 -include $(patsubst %.o,%.d,$(OBJ))
@@ -528,8 +372,6 @@ $(shell mkdir $(KBOBJDIR) 2>/dev/null)
 
 # Listing of phony targets.
 .PHONY : all finish sizebefore sizeafter gccversion \
-build elf hex eep lss sym coff extcoff check_submodule \
+build elf hex eep lss sym coff extcoff \
 clean clean_list debug gdb-config show_path \
-program teensy dfu flip dfu-ee flip-ee dfu-start \
-all-keyboards-defaults all-keyboards all-keymaps \
-all-keyboards-defaults-% all-keyboards-% all-keymaps-%
+program teensy dfu flip dfu-ee flip-ee dfu-start 
\ No newline at end of file
index 24564a2ac541ac4bc97afc40d4210a308312c846..49ac86e07235d0d1b5ca18baabea28616c489eee 100644 (file)
@@ -20,7 +20,8 @@ if [[ -n "$(type -P pacman )" ]]; then
     arm-none-eabi-gcc \
     arm-none-eabi-binutils \
     arm-none-eabi-newlib \
-    git
+    git \
+    diffutils
 
 elif [[ -n "$(type -P apt-get)" ]]; then
   # Debian and derivatives
@@ -47,7 +48,8 @@ elif [[ -n "$(type -P apt-get)" ]]; then
     gcc-arm-none-eabi \
     binutils-arm-none-eabi \
     libnewlib-arm-none-eabi \
-    git
+    git \
+    diffutils
 
 elif [[ -n "$(type -P yum)" ]]; then
   # Fedora, CentOS or RHEL and derivatives
@@ -69,7 +71,8 @@ elif [[ -n "$(type -P yum)" ]]; then
     gcc-arm-none-eabi \
     binutils-arm-none-eabi \
     libnewlib-arm-none-eabi \
-    git
+    git \
+    diffutils
   # The listed eabi pacackes do unfortunately not exist for CentOS,
   # But at least in Fedora they do, so try to install them anyway
   # TODO: Build them from sources, if the installation fails
@@ -85,7 +88,8 @@ elif [[ -n "$(type -P zypper)" ]]; then
     patch \
     wget \
     dfu-programmer \
-    git
+    git \
+    diffutils
   # TODO: The avr and eabi tools are not available as default packages, so we need 
   # another way to install them