Compare commits
8 Commits
0.15.17
...
python_opt
Author | SHA1 | Date | |
---|---|---|---|
e293bf243d | |||
286acfe7fd | |||
6d20b28354 | |||
846da06380 | |||
243fc17e41 | |||
f394f23ac6 | |||
0ca53fa307 | |||
8c361d6c41 |
113
.gitattributes
vendored
113
.gitattributes
vendored
@ -2,70 +2,69 @@
|
||||
* text=auto
|
||||
|
||||
# sources
|
||||
*.c text eol=lf
|
||||
*.cc text eol=lf
|
||||
*.cxx text eol=lf
|
||||
*.cpp text eol=lf
|
||||
*.c++ text eol=lf
|
||||
*.hpp text eol=lf
|
||||
*.h text eol=lf
|
||||
*.h++ text eol=lf
|
||||
*.hh text eol=lf
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.coffee text eol=lf
|
||||
*.css text eol=lf
|
||||
*.htm text eol=lf
|
||||
*.html text eol=lf
|
||||
*.inc text eol=lf
|
||||
*.ini text eol=crlf
|
||||
*.js text eol=lf
|
||||
*.jsx text eol=lf
|
||||
*.json text eol=lf
|
||||
*.less text eol=lf
|
||||
*.php text eol=lf
|
||||
*.pl text eol=lf
|
||||
*.py text eol=lf
|
||||
*.rb text eol=lf
|
||||
*.sass text eol=lf
|
||||
*.scm text eol=lf
|
||||
*.scss text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.sql text eol=lf
|
||||
*.styl text eol=lf
|
||||
*.ts text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.xhtml text eol=lf
|
||||
*.c text
|
||||
*.cc text
|
||||
*.cxx text
|
||||
*.cpp text
|
||||
*.c++ text
|
||||
*.hpp text
|
||||
*.h text
|
||||
*.h++ text
|
||||
*.hh text
|
||||
*.bat text
|
||||
*.coffee text
|
||||
*.css text
|
||||
*.htm text
|
||||
*.html text
|
||||
*.inc text
|
||||
*.ini text
|
||||
*.js text
|
||||
*.jsx text
|
||||
*.json text
|
||||
*.less text
|
||||
*.php text
|
||||
*.pl text
|
||||
*.py text
|
||||
*.rb text
|
||||
*.sass text
|
||||
*.scm text
|
||||
*.scss text
|
||||
*.sh text
|
||||
*.sql text
|
||||
*.styl text
|
||||
*.ts text
|
||||
*.xml text
|
||||
*.xhtml text
|
||||
|
||||
# make files (need to always use lf for compatibility with Windows 10 bash)
|
||||
Makefile eol=lf
|
||||
*.mk eol=lf
|
||||
*.mk eol=lf
|
||||
|
||||
# make files (need to always use lf for compatibility with Windows 10 bash)
|
||||
*.sh eol=lf
|
||||
|
||||
# documentation
|
||||
*.markdown text eol=lf
|
||||
*.md text eol=lf
|
||||
*.mdwn text eol=lf
|
||||
*.mdown text eol=lf
|
||||
*.mkd text eol=lf
|
||||
*.mkdn text eol=lf
|
||||
*.mdtxt text eol=lf
|
||||
*.mdtext text eol=lf
|
||||
*.txt text eol=lf
|
||||
AUTHORS text eol=lf
|
||||
CHANGELOG text eol=lf
|
||||
CHANGES text eol=lf
|
||||
CONTRIBUTING text eol=lf
|
||||
COPYING text eol=lf
|
||||
INSTALL text eol=lf
|
||||
license text eol=lf
|
||||
LICENSE text eol=lf
|
||||
NEWS text eol=lf
|
||||
readme text eol=lf
|
||||
*README* text eol=lf
|
||||
TODO text eol=lf
|
||||
*.markdown text
|
||||
*.md text
|
||||
*.mdwn text
|
||||
*.mdown text
|
||||
*.mkd text
|
||||
*.mkdn text
|
||||
*.mdtxt text
|
||||
*.mdtext text
|
||||
*.txt text
|
||||
AUTHORS text
|
||||
CHANGELOG text
|
||||
CHANGES text
|
||||
CONTRIBUTING text
|
||||
COPYING text
|
||||
INSTALL text
|
||||
license text
|
||||
LICENSE text
|
||||
NEWS text
|
||||
readme text
|
||||
*README* text
|
||||
TODO text
|
||||
|
||||
GRAPHICS
|
||||
*.ai binary
|
||||
@ -83,7 +82,7 @@ GRAPHICS
|
||||
*.png binary
|
||||
*.psb binary
|
||||
*.psd binary
|
||||
*.svg text eol=lf
|
||||
*.svg text
|
||||
*.svgz binary
|
||||
*.tif binary
|
||||
*.tiff binary
|
||||
|
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@ -22,6 +22,7 @@ keymap:
|
||||
via:
|
||||
- keyboards/**/keymaps/via/*
|
||||
cli:
|
||||
- bin/qmk
|
||||
- requirements.txt
|
||||
- lib/python/**/*
|
||||
python:
|
||||
|
3
.github/workflows/api.yml
vendored
3
.github/workflows/api.yml
vendored
@ -7,12 +7,11 @@ on:
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/qmk_cli
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
7
.github/workflows/cli.yml
vendored
7
.github/workflows/cli.yml
vendored
@ -4,10 +4,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- future
|
||||
pull_request:
|
||||
paths:
|
||||
- 'lib/python/**'
|
||||
- 'bin/qmk'
|
||||
- 'requirements.txt'
|
||||
- '.github/workflows/cli.yml'
|
||||
|
||||
@ -15,7 +16,7 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/qmk_cli
|
||||
container: qmkfm/base_container
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -24,4 +25,4 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements-dev.txt
|
||||
- name: Run tests
|
||||
run: qmk pytest
|
||||
run: bin/qmk pytest
|
||||
|
3
.github/workflows/develop_api.yml
vendored
3
.github/workflows/develop_api.yml
vendored
@ -7,12 +7,11 @@ on:
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/qmk_cli
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who work in their fork on develop
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/qmk_cli
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
25
.github/workflows/format.yaml
vendored
25
.github/workflows/format.yaml
vendored
@ -16,12 +16,10 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/qmk_cli
|
||||
container: qmkfm/base_container
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y dos2unix
|
||||
- uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@ -33,19 +31,12 @@ jobs:
|
||||
output: ' '
|
||||
fileOutput: ' '
|
||||
|
||||
- name: Run qmk formatters
|
||||
- name: Run qmk cformat and qmk pyformat
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt
|
||||
qmk format-c --core-only $(< ~/files_changed.txt) || true
|
||||
qmk format-python $(< ~/files_changed.txt) || true
|
||||
qmk format-text $(< ~/files_changed.txt) || true
|
||||
qmk cformat --core-only -n $(< ~/files.txt)
|
||||
cformat_exit=$?
|
||||
qmk pyformat -n
|
||||
pyformat_exit=$?
|
||||
|
||||
- name: Fail when formatting required
|
||||
run: |
|
||||
git diff
|
||||
for file in $(git diff --name-only); do
|
||||
echo "File '${file}' Requires Formatting"
|
||||
echo "::error file=${file}::Requires Formatting"
|
||||
done
|
||||
test -z "$(git diff --name-only)"
|
||||
exit $((cformat_exit + pyformat_exit))
|
||||
|
49
.github/workflows/format_push.yaml
vendored
49
.github/workflows/format_push.yaml
vendored
@ -1,49 +0,0 @@
|
||||
name: Lint Format
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y dos2unix
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run qmk formatters
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
qmk format-c -a
|
||||
qmk format-python -a
|
||||
qmk format-text -a
|
||||
git diff
|
||||
|
||||
- uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Become QMK Bot
|
||||
run: |
|
||||
git config user.name 'QMK Bot'
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
delete-branch: true
|
||||
branch: bugfix/format_${{ env.GITHUB_REF_SLUG }}
|
||||
author: QMK Bot <hello@qmk.fm>
|
||||
committer: QMK Bot <hello@qmk.fm>
|
||||
commit-message: Format code according to conventions
|
||||
title: '[CI] Format code according to conventions'
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/qmk_cli
|
||||
container: qmkfm/base_container
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
30
.github/workflows/unit_test.yml
vendored
30
.github/workflows/unit_test.yml
vendored
@ -1,30 +0,0 @@
|
||||
name: Unit Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
paths:
|
||||
- 'builddefs/**'
|
||||
- 'quantum/**'
|
||||
- 'platforms/**'
|
||||
- 'tmk_core/**'
|
||||
- 'tests/**'
|
||||
- '*.mk'
|
||||
- 'Makefile'
|
||||
- '.github/workflows/unit_test.yml'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/base_container
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Run tests
|
||||
run: make test:all
|
91
.gitignore
vendored
91
.gitignore
vendored
@ -1,32 +1,36 @@
|
||||
# Junk files
|
||||
*.bak
|
||||
*.swp
|
||||
*~
|
||||
.DS_Store
|
||||
|
||||
# Build artifacts
|
||||
.clang_complete
|
||||
.build/
|
||||
.history/
|
||||
.dep
|
||||
*.o
|
||||
*.bin
|
||||
*.eep
|
||||
*.elf
|
||||
*.hex
|
||||
*.uf2
|
||||
*.qmk
|
||||
!util/bootloader.hex
|
||||
!quantum/tools/eeprom_reset.hex
|
||||
*.log
|
||||
*.lss
|
||||
*.lst
|
||||
*.map
|
||||
*.o
|
||||
*.stackdump
|
||||
*.sym
|
||||
|
||||
# QMK-specific
|
||||
*.swp
|
||||
tags
|
||||
*~
|
||||
api_data/v1
|
||||
doxygen/
|
||||
build/
|
||||
.build/
|
||||
*.bak
|
||||
.vagrant/
|
||||
quantum/version.h
|
||||
*.bin
|
||||
*.eep
|
||||
*.hex
|
||||
*.qmk
|
||||
*.uf2
|
||||
|
||||
# Old-style QMK Makefiles
|
||||
.idea/
|
||||
CMakeLists.txt
|
||||
cmake-build-debug
|
||||
.clang_complete
|
||||
doxygen/
|
||||
.DS_Store
|
||||
/util/wsl_downloaded
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
/keyboards/*/*/Makefile
|
||||
/keyboards/*/*/*/Makefile
|
||||
@ -39,55 +43,40 @@ quantum/version.h
|
||||
/keyboards/*/*/*/*/*/keymaps/Makefile
|
||||
|
||||
# Eclipse/PyCharm/Other IDE Settings
|
||||
*.iml
|
||||
.browse.VC.db*
|
||||
.cproject
|
||||
.idea
|
||||
.idea/
|
||||
.project
|
||||
.settings/
|
||||
.vagrant/
|
||||
|
||||
# ?
|
||||
.dep
|
||||
.history/
|
||||
build/
|
||||
cmake-build-debug
|
||||
CMakeLists.txt
|
||||
|
||||
.idea
|
||||
*.iml
|
||||
.browse.VC.db*
|
||||
*.stackdump
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
*.code-workspace
|
||||
.stfolder
|
||||
.tags
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/ipch/
|
||||
.vscode/last.sql
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
.vscode/temp.sql
|
||||
tags
|
||||
.vscode/ipch/
|
||||
.stfolder
|
||||
.tags
|
||||
|
||||
# Ignore image files
|
||||
# ignore image files
|
||||
*.png
|
||||
*.gif
|
||||
*.jpg
|
||||
*.png
|
||||
|
||||
# Things Travis sees
|
||||
/.vs
|
||||
id_rsa_*
|
||||
# things travis sees
|
||||
secrets.tar
|
||||
id_rsa_*
|
||||
/.vs
|
||||
|
||||
# Python things
|
||||
# python things
|
||||
__pycache__
|
||||
.python-version
|
||||
|
||||
# Prerequisites for updating ChibiOS
|
||||
# prerequisites for updating ChibiOS
|
||||
/util/fmpp*
|
||||
|
||||
# Allow to exist but don't include it in the repo
|
||||
user_song_list.h
|
||||
|
||||
# clangd
|
||||
compile_commands.json
|
||||
.clangd/
|
||||
.cache/
|
||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -6,6 +6,10 @@
|
||||
path = lib/chibios-contrib
|
||||
url = https://github.com/qmk/ChibiOS-Contrib
|
||||
branch = master
|
||||
[submodule "lib/ugfx"]
|
||||
path = lib/ugfx
|
||||
url = https://github.com/qmk/uGFX
|
||||
branch = master
|
||||
[submodule "lib/googletest"]
|
||||
path = lib/googletest
|
||||
url = https://github.com/qmk/googletest
|
||||
|
38
.travis.yml
Normal file
38
.travis.yml
Normal file
@ -0,0 +1,38 @@
|
||||
os: linux
|
||||
dist: trusty
|
||||
group: edge
|
||||
language: c
|
||||
branches:
|
||||
except:
|
||||
- /^.*-automated-build$/
|
||||
- /^[0-9]+\.[0-9]+\.[0-9]+/
|
||||
env:
|
||||
global:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
- MAKEFLAGS="-j3 --output-sync"
|
||||
services:
|
||||
- docker
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- diffutils
|
||||
- clang-format-7
|
||||
- libstdc++-7-dev
|
||||
script:
|
||||
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
|
||||
- git rev-parse --short HEAD
|
||||
- git diff --name-only HEAD $TRAVIS_BRANCH
|
||||
- bash util/travis_test.sh
|
||||
- bash util/travis_build.sh
|
||||
after_script:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/afce403d65f143dfac09
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@ -5,6 +5,7 @@
|
||||
"xaver.clang-format",
|
||||
"ms-vscode.cpptools",
|
||||
"bierner.github-markdown-preview",
|
||||
"donjayamanne.git-extension-pack"
|
||||
"donjayamanne.git-extension-pack",
|
||||
"CoenraadS.bracket-pair-colorizer-2"
|
||||
]
|
||||
}
|
||||
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -23,8 +23,5 @@
|
||||
"editor.trimAutoWhitespace": false,
|
||||
"files.trimTrailingWhitespace": false
|
||||
},
|
||||
"python.formatting.provider": "yapf",
|
||||
"[json]": {
|
||||
"editor.formatOnSave": false
|
||||
}
|
||||
"python.formatting.provider": "yapf"
|
||||
}
|
||||
|
24
CODE_OF_CONDUCT.md
Normal file
24
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,24 @@
|
||||
# Code Of Conduct
|
||||
|
||||
QMK strives to be an inclusive, tolerant, and welcoming community. We encourage participation from anyone regardless of age, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, political belief, race, religion, or sexual identity and orientation.
|
||||
|
||||
> “A gentle word turns away wrath, but a harsh word stirs up anger."
|
||||
|
||||
Our users, contributors, and collaborators are expected to treat each other with kindness and respect, to assume good intentions, and to gently correct, where possible, rather than react with escalation. While our goal is to be as accurate as possible, kindness and understanding are more valuable than correctness. Some examples of behavior we will not tolerate include, but is not limited to:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Unwelcome advances, sexual or otherwise
|
||||
* Deliberate intimidation, stalking, or following
|
||||
* Insults or derogatory comments, or personal or political attacks
|
||||
* Publishing others’ private information without explicit permission
|
||||
* Sustained disruption of talks or other events
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* Advocating for, or encouraging, any of the above behaviour
|
||||
|
||||
# Reporting
|
||||
|
||||
If someone is violating this Code of Conduct, please email hello@qmk.fm or reach out to one of the Collaborators to bring it to our attention. All complaints will be reviewed and investigated.
|
||||
|
||||
QMK will seek to use the least punitive means available to resolve an issue. If the circumstances require asking an offender to leave, we will do that.
|
||||
|
||||
Reports will be taken and kept in strict confidence. You will not be required to confront an offender directly.
|
@ -1,6 +1,7 @@
|
||||
FROM qmkfm/qmk_cli
|
||||
FROM qmkfm/base_container
|
||||
|
||||
VOLUME /qmk_firmware
|
||||
WORKDIR /qmk_firmware
|
||||
COPY . .
|
||||
|
||||
CMD qmk compile -kb all -km default
|
||||
CMD make all:default
|
||||
|
123
Makefile
123
Makefile
@ -30,7 +30,11 @@ endif
|
||||
endif
|
||||
|
||||
# Determine which qmk cli to use
|
||||
QMK_BIN := qmk
|
||||
ifeq (,$(shell which qmk))
|
||||
QMK_BIN = bin/qmk
|
||||
else
|
||||
QMK_BIN = qmk
|
||||
endif
|
||||
|
||||
# avoid 'Entering|Leaving directory' messages
|
||||
MAKEFLAGS += --no-print-directory
|
||||
@ -54,6 +58,8 @@ BUILD_DIR := $(ROOT_DIR)/.build
|
||||
TEST_DIR := $(BUILD_DIR)/test
|
||||
ERROR_FILE := $(BUILD_DIR)/error_occurred
|
||||
|
||||
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 become the new head
|
||||
@ -91,8 +97,31 @@ distclean: clean
|
||||
rm -f *.bin *.hex *.uf2
|
||||
echo 'done.'
|
||||
|
||||
#Compatibility with the old make variables, anything you specify directly on the command line
|
||||
# always overrides the detected folders
|
||||
ifdef keyboard
|
||||
KEYBOARD := $(keyboard)
|
||||
endif
|
||||
ifdef keymap
|
||||
KEYMAP := $(keymap)
|
||||
endif
|
||||
|
||||
# Uncomment these for debugging
|
||||
# $(info Keyboard: $(KEYBOARD))
|
||||
# $(info Keymap: $(KEYMAP))
|
||||
|
||||
|
||||
# Set the default goal depending on where we are running make from
|
||||
# this handles the case where you run make without any arguments
|
||||
.DEFAULT_GOAL := all:all
|
||||
ifneq ($(KEYMAP),)
|
||||
.DEFAULT_GOAL := $(KEYBOARD):$(KEYMAP)
|
||||
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):all
|
||||
endif
|
||||
|
||||
|
||||
# Compare the start of the RULE variable with the first argument($1)
|
||||
@ -216,23 +245,18 @@ define PARSE_RULE
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true)
|
||||
KEYBOARD_RULE=$$(MATCHED_ITEM)
|
||||
$$(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.)
|
||||
$$(info |)
|
||||
$$(info | QMK's make format is:)
|
||||
$$(info | make keyboard_folder:keymap_folder[:target])
|
||||
$$(info |)
|
||||
$$(info | Where `keyboard_folder` is the path to the keyboard relative to)
|
||||
$$(info | `qmk_firmware/keyboards/`, and `keymap_folder` is the name of the)
|
||||
$$(info | keymap folder under that board's `keymaps/` directory.)
|
||||
$$(info |)
|
||||
$$(info | Examples:)
|
||||
$$(info | keyboards/dz60, keyboards/dz60/keymaps/default)
|
||||
$$(info | -> make dz60:default)
|
||||
$$(info | -> qmk compile -kb dz60 -km default)
|
||||
$$(info | keyboards/planck/rev6, keyboards/planck/keymaps/default)
|
||||
$$(info | -> make planck/rev6:default:flash)
|
||||
$$(info | -> qmk flash -kb planck/rev6 -km default)
|
||||
$$(info | QMK's make format recently changed to use folder locations and colons:)
|
||||
$$(info | make project_folder:keymap[:target])
|
||||
$$(info | Examples:)
|
||||
$$(info | make dz60:default)
|
||||
$$(info | make planck/rev6:default:flash)
|
||||
$$(info |)
|
||||
endif
|
||||
endef
|
||||
@ -270,8 +294,37 @@ define PARSE_KEYBOARD
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.)))
|
||||
# this might be needed, but in a different form
|
||||
#KEYMAPS := $$(sort $$(filter-out $$(KEYBOARD_FOLDER_1) $$(KEYBOARD_FOLDER_2) \
|
||||
$$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS)))
|
||||
|
||||
KEYBOARD_LAYOUTS :=
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
|
||||
KEYBOARD_LAYOUTS := $(shell $(QMK_BIN) list-layouts --keyboard $1)
|
||||
LAYOUT_KEYMAPS :=
|
||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
||||
|
||||
@ -378,12 +431,11 @@ define PARSE_ALL_KEYMAPS
|
||||
endef
|
||||
|
||||
define BUILD_TEST
|
||||
TEST_PATH := $1
|
||||
TEST_NAME := $$(notdir $$(TEST_PATH))
|
||||
TEST_NAME := $1
|
||||
MAKE_TARGET := $2
|
||||
COMMAND := $1
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
|
||||
MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
|
||||
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)"
|
||||
MAKE_MSG := $$(MSG_MAKE_TEST)
|
||||
$$(eval $$(call BUILD))
|
||||
ifneq ($$(MAKE_TARGET),clean)
|
||||
@ -407,7 +459,7 @@ define PARSE_TEST
|
||||
ifeq ($$(TEST_NAME),all)
|
||||
MATCHED_TESTS := $$(TEST_LIST)
|
||||
else
|
||||
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME), $$(notdir $$(TEST))), $$(TEST),))
|
||||
MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),))
|
||||
endif
|
||||
$$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET))))
|
||||
endef
|
||||
@ -426,8 +478,7 @@ define SET_SILENT_MODE
|
||||
endif
|
||||
endef
|
||||
|
||||
include paths.mk
|
||||
include $(BUILDDEFS_PATH)/message.mk
|
||||
include $(ROOT_DIR)/message.mk
|
||||
|
||||
ifeq ($(strip $(BREAK_ON_ERRORS)), yes)
|
||||
HANDLE_ERROR = exit 1
|
||||
@ -463,6 +514,7 @@ endef
|
||||
ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
|
||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
|
||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
|
||||
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
|
||||
if [ ! -e lib/vusb ]; then git submodule sync lib/vusb && git submodule update --depth 50 --init lib/vusb; fi
|
||||
if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi
|
||||
@ -496,14 +548,29 @@ git-submodule:
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive --progress
|
||||
|
||||
# Generate the version.h file
|
||||
ifdef SKIP_GIT
|
||||
VERSION_H_FLAGS := --skip-git
|
||||
endif
|
||||
ifdef SKIP_VERSION
|
||||
VERSION_H_FLAGS := --skip-all
|
||||
SKIP_GIT := yes
|
||||
endif
|
||||
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h)
|
||||
|
||||
# Generate the version.h file
|
||||
ifndef SKIP_GIT
|
||||
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
|
||||
CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
|
||||
CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
|
||||
else
|
||||
GIT_VERSION := NA
|
||||
CHIBIOS_VERSION := NA
|
||||
CHIBIOS_CONTRIB_VERSION := NA
|
||||
endif
|
||||
ifndef SKIP_VERSION
|
||||
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
|
||||
else
|
||||
BUILD_DATE := 2020-01-01-00:00:00
|
||||
endif
|
||||
|
||||
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
|
||||
include $(ROOT_DIR)/testlist.mk
|
||||
|
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@ -68,13 +68,13 @@ Vagrant.configure(2) do |config|
|
||||
["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type|
|
||||
config.vm.provider type do |virt, override|
|
||||
override.vm.provision "docker" do |d|
|
||||
d.run "qmkfm/qmk_cli",
|
||||
d.run "qmkfm/base_container",
|
||||
cmd: "tail -f /dev/null",
|
||||
args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'"
|
||||
end
|
||||
|
||||
override.vm.provision "shell", inline: <<-SHELL
|
||||
echo 'docker restart qmkfm-qmk_cli && exec docker exec -it qmkfm-qmk_cli /bin/bash -l' >> ~vagrant/.bashrc
|
||||
echo 'docker restart qmkfm-base_container && exec docker exec -it qmkfm-base_container /bin/bash -l' >> ~vagrant/.bashrc
|
||||
SHELL
|
||||
end
|
||||
end
|
||||
|
58
bin/qmk
Executable file
58
bin/qmk
Executable file
@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
"""CLI wrapper for running QMK commands.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add the QMK python libs to our path
|
||||
script_dir = Path(os.path.realpath(__file__)).parent
|
||||
qmk_dir = script_dir.parent
|
||||
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
||||
sys.path.append(str(python_lib_dir))
|
||||
|
||||
# Setup the CLI
|
||||
import milc # noqa
|
||||
|
||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||
|
||||
|
||||
@milc.cli.entrypoint('QMK Helper Script')
|
||||
def qmk_main(cli):
|
||||
"""The function that gets run when no subcommand is provided.
|
||||
"""
|
||||
cli.print_help()
|
||||
|
||||
|
||||
def main():
|
||||
"""Setup our environment and then call the CLI entrypoint.
|
||||
"""
|
||||
# Change to the root of our checkout
|
||||
os.environ['ORIG_CWD'] = os.getcwd()
|
||||
os.environ['DEPRECATED_BIN_QMK'] = '1'
|
||||
os.chdir(qmk_dir)
|
||||
|
||||
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
|
||||
|
||||
# Import the subcommands
|
||||
import milc.subcommand.config # noqa
|
||||
import qmk.cli # noqa
|
||||
|
||||
# Execute
|
||||
return_code = milc.cli()
|
||||
|
||||
if return_code is False:
|
||||
exit(1)
|
||||
|
||||
elif return_code is not True and isinstance(return_code, int):
|
||||
if return_code < 0 or return_code > 255:
|
||||
milc.cli.log.error('Invalid return_code: %d', return_code)
|
||||
exit(255)
|
||||
|
||||
exit(return_code)
|
||||
|
||||
exit(0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
46
book.json
Normal file
46
book.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"structure": {
|
||||
"summary": "_summary.md"
|
||||
},
|
||||
"plugins" : [
|
||||
"edit-link",
|
||||
"forkmegithub",
|
||||
"hints",
|
||||
"page-toc",
|
||||
"terminal",
|
||||
"toolbar",
|
||||
"bulk-redirect"
|
||||
],
|
||||
"pluginsConfig": {
|
||||
"edit-link": {
|
||||
"base": "https://github.com/qmk/qmk_firmware/edit/master/docs",
|
||||
"label": "Suggest an edit"
|
||||
},
|
||||
"forkmegithub": {
|
||||
"color": "red",
|
||||
"url": "https://github.com/qmk/qmk_firmware"
|
||||
},
|
||||
"page-toc": {
|
||||
"selector": ".markdown-section h1, .markdown-section h2"
|
||||
},
|
||||
"terminal": {
|
||||
"copyButtons": true,
|
||||
"fade": false,
|
||||
"style": "flat"
|
||||
},
|
||||
"toolbar": {
|
||||
"buttons": [
|
||||
{
|
||||
"label": "QMK Firmware",
|
||||
"icon": "fa fa-github",
|
||||
"url": "https://github.com/qmk/qmk_firmware"
|
||||
}
|
||||
]
|
||||
},
|
||||
"bulk-redirect": {
|
||||
"basepath": "/",
|
||||
"redirectsFile": "docs/redirects.json"
|
||||
}
|
||||
},
|
||||
"root": "./docs/"
|
||||
}
|
@ -21,21 +21,18 @@
|
||||
# Current options:
|
||||
#
|
||||
# AVR:
|
||||
# halfkay PJRC Teensy
|
||||
# caterina Pro Micro (Sparkfun/generic)
|
||||
# atmel-dfu Atmel factory DFU
|
||||
# lufa-dfu LUFA DFU
|
||||
# qmk-dfu QMK DFU (LUFA + blinkenlight)
|
||||
# qmk-hid QMK HID (LUFA + blinkenlight)
|
||||
# bootloadhid HIDBootFlash compatible (ATmega32A)
|
||||
# usbasploader USBaspLoader (ATmega328P)
|
||||
# halfkay PJRC Teensy
|
||||
# caterina Pro Micro (Sparkfun/generic)
|
||||
# atmel-dfu Atmel factory DFU
|
||||
# lufa-dfu LUFA DFU
|
||||
# qmk-dfu QMK DFU (LUFA + blinkenlight)
|
||||
# bootloadHID HIDBootFlash compatible (ATmega32A)
|
||||
# USBasp USBaspLoader (ATmega328P)
|
||||
# ARM:
|
||||
# kiibohd Input:Club Kiibohd bootloader (only used on their boards)
|
||||
# stm32duino STM32Duino (STM32F103x8)
|
||||
# stm32-dfu STM32 USB DFU in ROM
|
||||
# apm32-dfu APM32 USB DFU in ROM
|
||||
# RISC-V:
|
||||
# gd32v-dfu GD32V USB DFU in ROM
|
||||
# kiibohd Input:Club Kiibohd bootloader (only used on their boards)
|
||||
# stm32duino STM32Duino (STM32F103x8)
|
||||
# stm32-dfu STM32 USB DFU in ROM
|
||||
# apm32-dfu APM32 USB DFU in ROM
|
||||
#
|
||||
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
||||
# you add any possible configuration to this list
|
||||
@ -54,27 +51,22 @@ ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE ?= 4096
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE ?= 8192
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE ?= 4096
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE ?= 8192
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-hid)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_HID
|
||||
OPT_DEFS += -DBOOTLOADER_HID
|
||||
BOOTLOADER_SIZE ?= 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
||||
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
||||
ifeq ($(strip $(MCU)), atmega32u4)
|
||||
@ -88,11 +80,11 @@ ifeq ($(strip $(BOOTLOADER)), caterina)
|
||||
OPT_DEFS += -DBOOTLOADER_CATERINA
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID))
|
||||
ifeq ($(strip $(BOOTLOADER)), bootloadHID)
|
||||
OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp))
|
||||
ifeq ($(strip $(BOOTLOADER)), USBasp)
|
||||
OPT_DEFS += -DBOOTLOADER_USBASP
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
@ -127,13 +119,6 @@ ifeq ($(strip $(BOOTLOADER)), apm32-dfu)
|
||||
DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 314B -p 0106
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), gd32v-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_GD32V_DFU
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 28E9:0189 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 28E9 -p 0189
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), kiibohd)
|
||||
OPT_DEFS += -DBOOTLOADER_KIIBOHD
|
||||
ifeq ($(strip $(MCU_ORIG)), MK20DX128)
|
@ -13,24 +13,21 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$(TEST)_INC := \
|
||||
tests\test_common\common_config.h
|
||||
#include $(TMK_PATH)/protocol.mk
|
||||
|
||||
$(TEST)_SRC := \
|
||||
TEST_PATH=tests/$(TEST)
|
||||
|
||||
$(TEST)_SRC= \
|
||||
$(TEST_PATH)/keymap.c \
|
||||
$(TMK_COMMON_SRC) \
|
||||
$(QUANTUM_SRC) \
|
||||
$(SRC) \
|
||||
tests/test_common/keymap.c \
|
||||
tests/test_common/matrix.c \
|
||||
tests/test_common/test_driver.cpp \
|
||||
tests/test_common/keyboard_report_util.cpp \
|
||||
tests/test_common/test_fixture.cpp \
|
||||
tests/test_common/test_keymap_key.cpp \
|
||||
tests/test_common/test_logger.cpp \
|
||||
$(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
|
||||
tests/test_common/test_fixture.cpp
|
||||
$(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
|
||||
|
||||
$(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS)
|
||||
|
||||
$(TEST)_CONFIG := $(TEST_PATH)/config.h
|
||||
|
||||
VPATH += $(TOP_DIR)/tests/test_common
|
||||
$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS)
|
||||
$(TEST)_CONFIG=$(TEST_PATH)/config.h
|
||||
VPATH+=$(TOP_DIR)/tests/test_common
|
||||
|
@ -1,17 +1,31 @@
|
||||
# Look for a json keymap file
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
endif
|
||||
|
||||
# Load the keymap-level rules.mk if exists
|
||||
ifneq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||
-include $(KEYMAP_PATH)/rules.mk
|
||||
endif
|
||||
|
||||
# Generate the keymap.c
|
||||
$(KEYMAP_C): $(KEYMAP_JSON)
|
||||
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||
|
@ -10,8 +10,7 @@ endif
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
include paths.mk
|
||||
include $(BUILDDEFS_PATH)/message.mk
|
||||
include common.mk
|
||||
|
||||
# Set the qmk cli to use
|
||||
QMK_BIN ?= qmk
|
||||
@ -24,14 +23,19 @@ KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
|
||||
# Force expansion
|
||||
TARGET := $(TARGET)
|
||||
|
||||
ifneq ($(FORCE_LAYOUT),)
|
||||
TARGET := $(TARGET)_$(FORCE_LAYOUT)
|
||||
# For split boards we need to set a master half.
|
||||
MASTER ?= left
|
||||
ifdef master
|
||||
MASTER = $(master)
|
||||
endif
|
||||
|
||||
# Object files and generated keymap 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)
|
||||
ifeq ($(MASTER),right)
|
||||
OPT_DEFS += -DMASTER_IS_ON_RIGHT
|
||||
else
|
||||
ifneq ($(MASTER),left)
|
||||
$(error MASTER does not have a valid value(left/right))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SKIP_VERSION
|
||||
OPT_DEFS += -DSKIP_VERSION
|
||||
@ -96,13 +100,21 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||
|
||||
# Pull in rules from info.json
|
||||
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
|
||||
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
|
||||
include $(INFO_RULES_MK)
|
||||
|
||||
ifneq ($(FORCE_LAYOUT),)
|
||||
TARGET := $(TARGET)_$(FORCE_LAYOUT)
|
||||
endif
|
||||
|
||||
# Object files and generated keymap 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)
|
||||
|
||||
# Check for keymap.json first, so we can regenerate keymap.c
|
||||
include build_json.mk
|
||||
|
||||
# Pull in keymap level rules.mk
|
||||
ifeq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||
# Look through the possible keymap folders until we find a matching keymap.c
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
@ -134,38 +146,15 @@ ifeq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||
endif
|
||||
endif
|
||||
|
||||
# Have we found a keymap.json?
|
||||
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
|
||||
KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c
|
||||
KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h
|
||||
|
||||
# Load the keymap-level rules.mk if exists
|
||||
-include $(KEYMAP_PATH)/rules.mk
|
||||
|
||||
# Load any rules.mk content from keymap.json
|
||||
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk)
|
||||
include $(INFO_RULES_MK)
|
||||
|
||||
# Add rules to generate the keymap files - indentation here is important
|
||||
$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||
|
||||
$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
|
||||
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)
|
||||
|
||||
generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTPC)), yes)
|
||||
CONVERT_TO_PROTON_C=yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
|
||||
include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk
|
||||
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
|
||||
endif
|
||||
|
||||
include $(BUILDDEFS_PATH)/mcu_selection.mk
|
||||
include quantum/mcu_selection.mk
|
||||
|
||||
# Find all the C source files to be compiled in subfolders.
|
||||
KEYBOARD_SRC :=
|
||||
@ -248,7 +237,6 @@ ifdef MCU_FAMILY
|
||||
PLATFORM=CHIBIOS
|
||||
PLATFORM_KEY=chibios
|
||||
FIRMWARE_FORMAT?=bin
|
||||
OPT_DEFS += -DMCU_$(MCU_FAMILY)
|
||||
else ifdef ARM_ATSAM
|
||||
PLATFORM=ARM_ATSAM
|
||||
PLATFORM_KEY=arm_atsam
|
||||
@ -333,7 +321,6 @@ ifeq ("$(USER_NAME)","")
|
||||
endif
|
||||
USER_PATH := users/$(USER_NAME)
|
||||
|
||||
# Pull in user level rules.mk
|
||||
-include $(USER_PATH)/rules.mk
|
||||
ifneq ("$(wildcard $(USER_PATH)/config.h)","")
|
||||
CONFIG_H += $(USER_PATH)/config.h
|
||||
@ -343,38 +330,16 @@ ifneq ("$(wildcard $(USER_PATH)/post_config.h)","")
|
||||
endif
|
||||
|
||||
# Disable features that a keyboard doesn't support
|
||||
-include $(BUILDDEFS_PATH)/disable_features.mk
|
||||
|
||||
# Pull in post_rules.mk files from all our subfolders
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_1)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_2)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_3)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_4)/post_rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_rules.mk)","")
|
||||
include $(KEYBOARD_PATH_5)/post_rules.mk
|
||||
endif
|
||||
-include disable_features.mk
|
||||
|
||||
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||
CONFIG_H += $(KEYMAP_PATH)/config.h
|
||||
endif
|
||||
ifneq ("$(KEYMAP_H)","")
|
||||
CONFIG_H += $(KEYMAP_H)
|
||||
endif
|
||||
|
||||
# project specific files
|
||||
SRC += \
|
||||
$(KEYBOARD_SRC) \
|
||||
SRC += $(KEYBOARD_SRC) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_SRC) \
|
||||
$(QUANTUM_DIR)/main.c \
|
||||
$(QUANTUM_SRC)
|
||||
|
||||
# Optimize size but this may cause error "relocation truncated to fit"
|
||||
#EXTRALDFLAGS = -Wl,--relax
|
||||
@ -386,10 +351,9 @@ VPATH += $(KEYBOARD_PATHS)
|
||||
VPATH += $(COMMON_VPATH)
|
||||
|
||||
include common_features.mk
|
||||
include $(BUILDDEFS_PATH)/generic_features.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
include $(PLATFORM_PATH)/common.mk
|
||||
include $(BUILDDEFS_PATH)/bootloader.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include bootloader.mk
|
||||
|
||||
SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
|
||||
SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
|
||||
@ -404,9 +368,7 @@ ifneq ($(REQUIRE_PLATFORM_KEY),)
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
|
||||
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk
|
||||
|
||||
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||
ifneq ($(strip $(PROTOCOL)),)
|
||||
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
||||
else
|
||||
@ -418,19 +380,26 @@ PROJECT_DEFS := $(OPT_DEFS)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||
PROJECT_CONFIG := $(CONFIG_H)
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
||||
VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
|
||||
include $(VISUALIZER_PATH)/visualizer.mk
|
||||
endif
|
||||
|
||||
CONFIG_H += $(POST_CONFIG_H)
|
||||
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
|
||||
|
||||
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
||||
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) \
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" \
|
||||
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\"
|
||||
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
|
||||
-DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H
|
||||
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
||||
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
|
||||
$(KEYBOARD_OUTPUT)_SRC := $(PLATFORM_SRC)
|
||||
$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS)
|
||||
$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC)
|
||||
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC)
|
||||
$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(GFXDEFS)
|
||||
$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
@ -446,7 +415,7 @@ check-size: build
|
||||
check-md5: build
|
||||
objs-size: build
|
||||
|
||||
include $(BUILDDEFS_PATH)/show_options.mk
|
||||
include show_options.mk
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
||||
# Ensure we have generated files available for each of the objects
|
||||
|
@ -7,6 +7,7 @@ define SEARCH_LAYOUTS_REPO
|
||||
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
|
||||
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","")
|
||||
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
|
||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
||||
KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON)
|
||||
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
|
||||
else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
|
||||
@ -30,3 +31,6 @@ ifneq ($(FORCE_LAYOUT),)
|
||||
endif
|
||||
|
||||
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
|
||||
|
||||
# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated
|
||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||
|
@ -4,8 +4,7 @@ endif
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
include paths.mk
|
||||
include $(BUILDDEFS_PATH)/message.mk
|
||||
include common.mk
|
||||
|
||||
TARGET=test/$(TEST)
|
||||
|
||||
@ -16,15 +15,16 @@ TEST_OBJ = $(BUILD_DIR)/test_obj
|
||||
OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
|
||||
|
||||
GTEST_INC := \
|
||||
$(LIB_PATH)/googletest/googletest/include \
|
||||
$(LIB_PATH)/googletest/googlemock/include
|
||||
$(LIB_PATH)/googletest/googletest/include\
|
||||
$(LIB_PATH)/googletest/googlemock/include\
|
||||
|
||||
GTEST_INTERNAL_INC := \
|
||||
$(LIB_PATH)/googletest/googletest \
|
||||
GTEST_INTERNAL_INC :=\
|
||||
$(LIB_PATH)/googletest/googletest\
|
||||
$(LIB_PATH)/googletest/googlemock
|
||||
|
||||
$(GTEST_OUTPUT)_SRC := \
|
||||
$(GTEST_OUTPUT)_SRC :=\
|
||||
googletest/src/gtest-all.cc\
|
||||
googletest/src/gtest_main.cc\
|
||||
googlemock/src/gmock-all.cc
|
||||
|
||||
$(GTEST_OUTPUT)_DEFS :=
|
||||
@ -33,10 +33,9 @@ $(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC)
|
||||
LDFLAGS += -lstdc++ -lpthread -shared-libgcc
|
||||
CREATE_MAP := no
|
||||
|
||||
VPATH += \
|
||||
$(LIB_PATH)/googletest \
|
||||
$(LIB_PATH)/googlemock \
|
||||
$(LIB_PATH)/printf
|
||||
VPATH +=\
|
||||
$(LIB_PATH)/googletest\
|
||||
$(LIB_PATH)/googlemock
|
||||
|
||||
all: elf
|
||||
|
||||
@ -44,38 +43,25 @@ VPATH += $(COMMON_VPATH)
|
||||
PLATFORM:=TEST
|
||||
PLATFORM_KEY:=test
|
||||
|
||||
ifeq ($(strip $(DEBUG)), 1)
|
||||
CONSOLE_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include tests/test_common/build.mk
|
||||
include $(TEST_PATH)/test.mk
|
||||
include tests/$(TEST)/rules.mk
|
||||
endif
|
||||
|
||||
include common_features.mk
|
||||
include $(BUILDDEFS_PATH)/generic_features.mk
|
||||
include $(PLATFORM_PATH)/common.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include $(QUANTUM_PATH)/debounce/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/encoder/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
|
||||
include $(PLATFORM_PATH)/test/rules.mk
|
||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include build_full_test.mk
|
||||
endif
|
||||
|
||||
$(TEST)_SRC += \
|
||||
tests/test_common/main.c \
|
||||
$(LIB_PATH)/printf/printf.c \
|
||||
$(QUANTUM_PATH)/logging/print.c
|
||||
|
||||
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
||||
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
||||
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
||||
$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
|
||||
|
||||
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
|
||||
include $(TMK_PATH)/native.mk
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
# Copyright 2021 QMK
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SPACE_CADET_ENABLE ?= yes
|
||||
GRAVE_ESC_ENABLE ?= yes
|
||||
|
||||
GENERIC_FEATURES = \
|
||||
COMBO \
|
||||
COMMAND \
|
||||
DEFERRED_EXEC \
|
||||
DIGITIZER \
|
||||
DIP_SWITCH \
|
||||
DYNAMIC_KEYMAP \
|
||||
DYNAMIC_MACRO \
|
||||
ENCODER \
|
||||
GRAVE_ESC \
|
||||
HAPTIC \
|
||||
KEY_LOCK \
|
||||
KEY_OVERRIDE \
|
||||
LEADER \
|
||||
PROGRAMMABLE_BUTTON \
|
||||
SPACE_CADET \
|
||||
SWAP_HANDS \
|
||||
TAP_DANCE \
|
||||
VELOCIKEY \
|
||||
WPM \
|
||||
DYNAMIC_TAPPING_TERM \
|
||||
|
||||
define HANDLE_GENERIC_FEATURE
|
||||
# $$(info "Processing: $1_ENABLE $2.c")
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
||||
OPT_DEFS += -D$1_ENABLE
|
||||
endef
|
||||
|
||||
$(foreach F,$(GENERIC_FEATURES),\
|
||||
$(if $(filter yes, $(strip $($(F)_ENABLE))),\
|
||||
$(eval $(call HANDLE_GENERIC_FEATURE,$(F),$(shell echo $(F) | tr '[:upper:]' '[:lower:]'))) \
|
||||
) \
|
||||
)
|
File diff suppressed because it is too large
Load Diff
@ -1,148 +0,0 @@
|
||||
BUILD_OPTION_NAMES = \
|
||||
BOOTMAGIC_ENABLE \
|
||||
MOUSEKEY_ENABLE \
|
||||
EXTRAKEY_ENABLE \
|
||||
CONSOLE_ENABLE \
|
||||
COMMAND_ENABLE \
|
||||
NKRO_ENABLE \
|
||||
TERMINAL_ENABLE \
|
||||
CUSTOM_MATRIX \
|
||||
DEBOUNCE_TYPE \
|
||||
SPLIT_KEYBOARD \
|
||||
DYNAMIC_KEYMAP_ENABLE \
|
||||
USB_HID_ENABLE \
|
||||
VIA_ENABLE
|
||||
|
||||
HARDWARE_OPTION_NAMES = \
|
||||
SLEEP_LED_ENABLE \
|
||||
BACKLIGHT_ENABLE \
|
||||
BACKLIGHT_DRIVER \
|
||||
RGBLIGHT_ENABLE \
|
||||
RGBLIGHT_CUSTOM_DRIVER \
|
||||
RGB_MATRIX_ENABLE \
|
||||
RGB_MATRIX_DRIVER \
|
||||
CIE1931_CURVE \
|
||||
MIDI_ENABLE \
|
||||
BLUETOOTH_ENABLE \
|
||||
BLUETOOTH_DRIVER \
|
||||
AUDIO_ENABLE \
|
||||
HD44780_ENABLE \
|
||||
ENCODER_ENABLE \
|
||||
LED_TABLES \
|
||||
POINTING_DEVICE_ENABLE \
|
||||
DIP_SWITCH_ENABLE
|
||||
|
||||
OTHER_OPTION_NAMES = \
|
||||
UNICODE_ENABLE \
|
||||
UCIS_ENABLE \
|
||||
UNICODEMAP_ENABLE \
|
||||
UNICODE_COMMON \
|
||||
AUTO_SHIFT_ENABLE \
|
||||
AUTO_SHIFT_MODIFIERS \
|
||||
DYNAMIC_TAPPING_TERM_ENABLE \
|
||||
COMBO_ENABLE \
|
||||
KEY_LOCK_ENABLE \
|
||||
KEY_OVERRIDE_ENABLE \
|
||||
LEADER_ENABLE \
|
||||
PRINTING_ENABLE \
|
||||
STENO_ENABLE \
|
||||
TAP_DANCE_ENABLE \
|
||||
VIRTSER_ENABLE \
|
||||
OLED_ENABLE \
|
||||
OLED_DRIVER \
|
||||
LED_BACK_ENABLE \
|
||||
LED_UNDERGLOW_ENABLE \
|
||||
LED_ANIMATIONS \
|
||||
IOS_DEVICE_ENABLE \
|
||||
HELIX ZINC \
|
||||
AUTOLOG_ENABLE \
|
||||
DEBUG_ENABLE \
|
||||
ENCODER_ENABLE_CUSTOM \
|
||||
GERMAN_ENABLE \
|
||||
HAPTIC_ENABLE \
|
||||
HHKB_RN42_ENABLE \
|
||||
ISSI_ENABLE \
|
||||
KEYLOGGER_ENABLE \
|
||||
LCD_BACKLIGHT_ENABLE \
|
||||
MACROS_ENABLED \
|
||||
PS2_MOUSE_ENABLE \
|
||||
RAW_ENABLE \
|
||||
SWAP_HANDS_ENABLE \
|
||||
RING_BUFFERED_6KRO_REPORT_ENABLE \
|
||||
WATCHDOG_ENABLE \
|
||||
ERGOINU \
|
||||
NO_USB_STARTUP_CHECK \
|
||||
DISABLE_PROMICRO_LEDs \
|
||||
MITOSIS_DATAGROK_BOTTOMSPACE \
|
||||
MITOSIS_DATAGROK_SLOWUART \
|
||||
RGB_MATRIX_KEYPRESSES \
|
||||
LED_MIRRORED \
|
||||
RGBLIGHT_FULL_POWER \
|
||||
LTO_ENABLE \
|
||||
PROGRAMMABLE_BUTTON_ENABLE
|
||||
|
||||
define NAME_ECHO
|
||||
@printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)"
|
||||
|
||||
endef
|
||||
|
||||
define YAML_NAME_ECHO
|
||||
@echo ' $1 : "$(strip $($1))"'
|
||||
|
||||
endef
|
||||
|
||||
.PHONY: show_build_options0 show_build_options
|
||||
show_build_options0:
|
||||
@echo " KEYBOARD = $(KEYBOARD)"
|
||||
@echo " KEYMAP = $(KEYMAP)"
|
||||
@echo " MCU = $(MCU)"
|
||||
@echo " MCU_SERIES = $(MCU_SERIES)"
|
||||
@echo " PLATFORM = $(PLATFORM)"
|
||||
@echo " BOOTLOADER = $(BOOTLOADER)"
|
||||
@echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)"
|
||||
@echo
|
||||
@echo "Build Options:"
|
||||
$(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\
|
||||
$(call NAME_ECHO,$(A_OPTION_NAME)))
|
||||
|
||||
show_build_options: show_build_options0
|
||||
@echo
|
||||
@echo "If you want to know more, please try 'show_all_features' or 'show_full_features'"
|
||||
@echo
|
||||
|
||||
.PHONY: show_all_features
|
||||
show_all_features: show_build_options0
|
||||
@echo
|
||||
@echo "Hardware Options:"
|
||||
$(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
|
||||
$(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME))))
|
||||
@echo
|
||||
@echo "Other Options:"
|
||||
$(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
|
||||
$(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME))))
|
||||
|
||||
.PHONY: show_full_features
|
||||
show_full_features: show_build_options0
|
||||
@echo
|
||||
@echo "Hardware Options:"
|
||||
$(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
|
||||
$(call NAME_ECHO,$(A_OPTION_NAME)))
|
||||
@echo
|
||||
@echo "Other Options:"
|
||||
$(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
|
||||
$(call NAME_ECHO,$(A_OPTION_NAME)))
|
||||
|
||||
.PHONY: yaml_build_options
|
||||
yaml_build_options:
|
||||
@echo '- KEYBOARD : "$(KEYBOARD)"'
|
||||
@echo ' KEYMAP : "$(KEYMAP)"'
|
||||
@echo ' MCU : "$(MCU)"'
|
||||
@echo ' MCU_SERIES : "$(MCU_SERIES)"'
|
||||
@echo ' PLATFORM : "$(PLATFORM)"'
|
||||
@echo ' FIRMWARE_FORMAT : "$(FIRMWARE_FORMAT)"'
|
||||
$(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\
|
||||
$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))
|
||||
$(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
|
||||
$(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME))))
|
||||
$(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
|
||||
$(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME))))
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user