Skip to content

TMK Core

hasu@tmk edited this page Feb 16, 2021 · 4 revisions

See #173

Use TMK Core in your own project

1. How to embed

a. git submodule

In order to set up the submodule in your project, first add a new submodule:

git submodule add https://github.com/tmk/tmk_core tmk_core

Then pull, sync and update the submodule:

git pull
git submodule sync --recursive
git submodule update --init --recursive

When you want to update the subtree in your repository to match the master on tmk_core, follow the same steps as above.

If you want to clone a repository from GitHub that has submodule(s) in it, pass --recursive when cloning, like so:
git clone --recursive https://github.com/<username>/<repository>

b. git subtree

In order to set up the subtree in your project, first add the core repository as a remote:

git remote add -f core https://github.com/tmk/tmk_core

Then add the core as a subtree (directory) in your local repository:

git subtree add -P tmk_core core master --squash

When you want to update the subtree in your repository to match the master on tmk_core, do this:

git subtree pull -P tmk_core core master --squash

c. Just copy

Download a zipped version of the [tmk_core][1] repository using this link:
https://github.com/tmk/tmk_core/archive/master.zip

Extract the zip in your project's directory, then rename the folder to tmk_core.

2. Edit Makefile

TBD

You will have to designate correct path of tmk_core in your Makefile.

TMK_DIR is used for this purpose in Makefile of tmk_keyboard, for example.

TMK_DIR = ./tmk_core
Clone this wiki locally