Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
ifndef VERBOSE
|
|
|
|
.SILENT:
|
|
|
|
endif
|
|
|
|
|
2016-06-18 07:10:17 +06:00
|
|
|
space := $(subst ,, )
|
|
|
|
starting_makefile := $(subst $(space),_SPACE_,$(abspath $(firstword $(MAKEFILE_LIST))))
|
|
|
|
mkfile_path := $(subst $(space),_SPACE_,$(abspath $(lastword $(MAKEFILE_LIST))))
|
2016-06-13 01:55:05 +06:00
|
|
|
abs_tmk_root := $(patsubst %/,%,$(dir $(mkfile_path)))
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
|
2016-06-22 08:39:54 +06:00
|
|
|
ifneq (,$(findstring /keyboards/,$(starting_makefile)))
|
|
|
|
possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(abs_tmk_root)/keyboards/%,%,$(starting_makefile))))
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
ifneq (,$(findstring /keymaps/,$(possible_keyboard)))
|
|
|
|
KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard)))
|
2016-06-30 02:21:41 +06:00
|
|
|
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
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
else
|
|
|
|
KEYMAP_DIR:=default
|
2016-06-30 02:21:41 +06:00
|
|
|
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
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
endif
|
2016-06-13 01:55:05 +06:00
|
|
|
else
|
|
|
|
tmk_root = .
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
endif
|
|
|
|
# $(info $(KEYBOARD_DIR))
|
|
|
|
# $(info $(KEYMAP_DIR))
|
2016-06-30 02:21:41 +06:00
|
|
|
# $(info $(SUBPROJECT_DIR))
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
|
|
|
|
# Directory common source filess exist
|
|
|
|
TOP_DIR = $(tmk_root)
|
|
|
|
TMK_DIR = tmk_core
|
|
|
|
TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
|
|
|
|
|
|
|
|
QUANTUM_DIR = quantum
|
|
|
|
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
|
|
|
|
|
2016-06-30 02:21:41 +06:00
|
|
|
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
ifdef keyboard
|
|
|
|
KEYBOARD ?= $(keyboard)
|
|
|
|
endif
|
|
|
|
ifdef KEYBOARD_DIR
|
|
|
|
KEYBOARD ?= $(KEYBOARD_DIR)
|
|
|
|
endif
|
|
|
|
ifndef KEYBOARD
|
|
|
|
KEYBOARD=planck
|
|
|
|
endif
|
2016-06-30 02:21:41 +06:00
|
|
|
|
|
|
|
# converts things to keyboards/subproject
|
|
|
|
ifneq (,$(findstring /,$(KEYBOARD)))
|
|
|
|
TEMP:=$(KEYBOARD)
|
|
|
|
KEYBOARD:=$(firstword $(subst /, ,$(TEMP)))
|
|
|
|
SUBPROJECT:=$(lastword $(subst /, ,$(TEMP)))
|
|
|
|
endif
|
|
|
|
|
2016-06-22 08:39:54 +06:00
|
|
|
KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD)
|
2016-06-30 02:21:41 +06:00
|
|
|
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","")
|
2016-06-22 08:39:54 +06:00
|
|
|
KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
ifndef ARCH
|
|
|
|
include $(KEYBOARD_PATH)/Makefile
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
$(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist)
|
|
|
|
endif
|
|
|
|
|
2016-06-30 02:21:41 +06:00
|
|
|
ifdef sub
|
|
|
|
SUBPROJECT=$(sub)
|
|
|
|
endif
|
|
|
|
ifdef subproject
|
|
|
|
SUBPROJECT=$(subproject)
|
|
|
|
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
|
|
|
|
-include $(SUBPROJECT_PATH)/Makefile
|
|
|
|
else
|
|
|
|
$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
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)","")
|
2016-06-22 08:39:54 +06:00
|
|
|
KEYMAP_FILE = keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
-include $(KEYMAP_PATH)/Makefile
|
|
|
|
else
|
|
|
|
$(error "$(KEYMAP_PATH)/keymap.c" does not exist)
|
|
|
|
endif
|
|
|
|
|
2016-06-30 02:21:41 +06:00
|
|
|
ifdef SUBPROJECT
|
|
|
|
TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
|
|
|
|
else
|
|
|
|
TARGET ?= $(KEYBOARD)_$(KEYMAP)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
|
|
|
|
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
|
|
|
CONFIG_H = $(KEYMAP_PATH)/config.h
|
|
|
|
else
|
|
|
|
CONFIG_H = $(KEYBOARD_PATH)/config.h
|
|
|
|
endif
|
|
|
|
|
|
|
|
# # project specific files
|
|
|
|
SRC += $(KEYBOARD_FILE) \
|
|
|
|
$(KEYMAP_FILE) \
|
|
|
|
$(QUANTUM_DIR)/quantum.c \
|
2016-06-19 00:30:24 +06:00
|
|
|
$(QUANTUM_DIR)/keymap.c \
|
2016-06-24 08:18:20 +06:00
|
|
|
$(QUANTUM_DIR)/keycode_config.c
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
|
2016-06-30 02:21:41 +06:00
|
|
|
ifdef SUBPROJECT
|
|
|
|
SRC += $(SUBPROJECT_FILE)
|
|
|
|
endif
|
|
|
|
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
ifndef CUSTOM_MATRIX
|
|
|
|
SRC += $(QUANTUM_DIR)/matrix.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|
|
|
SRC += $(QUANTUM_DIR)/audio/audio.c
|
|
|
|
SRC += $(QUANTUM_DIR)/audio/voices.c
|
|
|
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
|
|
|
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
|
|
|
SRC += $(QUANTUM_DIR)/rgblight.c
|
|
|
|
OPT_DEFS += -DRGBLIGHT_ENABLE
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Optimize size but this may cause error "relocation truncated to fit"
|
|
|
|
#EXTRALDFLAGS = -Wl,--relax
|
|
|
|
|
|
|
|
# Search Path
|
|
|
|
VPATH += $(KEYMAP_PATH)
|
2016-06-30 02:21:41 +06:00
|
|
|
ifdef SUBPROJECT
|
|
|
|
VPATH += $(SUBPROJECT_PATH)
|
|
|
|
endif
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 23:31:31 +06:00
|
|
|
VPATH += $(KEYBOARD_PATH)
|
|
|
|
VPATH += $(TOP_DIR)
|
|
|
|
VPATH += $(TMK_PATH)
|
|
|
|
VPATH += $(QUANTUM_PATH)
|
|
|
|
VPATH += $(QUANTUM_PATH)/keymap_extras
|
|
|
|
VPATH += $(QUANTUM_PATH)/audio
|
|
|
|
|
|
|
|
include $(TMK_PATH)/protocol/lufa.mk
|
|
|
|
include $(TMK_PATH)/common.mk
|
2016-06-14 21:26:42 +06:00
|
|
|
include $(TMK_PATH)/rules.mk
|
|
|
|
|
2016-06-17 03:16:51 +06:00
|
|
|
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")
|
2016-06-14 21:26:42 +06:00
|
|
|
OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
2016-06-17 03:16:51 +06:00
|
|
|
OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\" -DQMK_BUILDDATE=\"$(BUILD_DATE)\"
|