diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
| @@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION)) | |||
| 29 | endif | 29 | endif |
| 30 | endif | 30 | endif |
| 31 | 31 | ||
| 32 | # Determine which qmk cli to use | ||
| 33 | ifeq (,$(shell which qmk)) | ||
| 34 | QMK_BIN = bin/qmk | ||
| 35 | else | ||
| 36 | QMK_BIN = qmk | ||
| 37 | endif | ||
| 38 | |||
| 32 | # avoid 'Entering|Leaving directory' messages | 39 | # avoid 'Entering|Leaving directory' messages |
| 33 | MAKEFLAGS += --no-print-directory | 40 | MAKEFLAGS += --no-print-directory |
| 34 | 41 | ||
| @@ -86,8 +93,8 @@ clean: | |||
| 86 | 93 | ||
| 87 | .PHONY: distclean | 94 | .PHONY: distclean |
| 88 | distclean: clean | 95 | distclean: clean |
| 89 | echo -n 'Deleting *.bin and *.hex ... ' | 96 | echo -n 'Deleting *.bin, *.hex, and *.uf2 ... ' |
| 90 | rm -f *.bin *.hex | 97 | rm -f *.bin *.hex *.uf2 |
| 91 | echo 'done.' | 98 | echo 'done.' |
| 92 | 99 | ||
| 93 | #Compatibility with the old make variables, anything you specify directly on the command line | 100 | #Compatibility with the old make variables, anything you specify directly on the command line |
| @@ -384,7 +391,7 @@ define PARSE_KEYMAP | |||
| 384 | # Format it in bold | 391 | # Format it in bold |
| 385 | KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) | 392 | KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) |
| 386 | # Specify the variables that we are passing forward to submake | 393 | # Specify the variables that we are passing forward to submake |
| 387 | MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) | 394 | MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN) |
| 388 | # And the first part of the make command | 395 | # And the first part of the make command |
| 389 | MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) | 396 | MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) |
| 390 | # The message to display | 397 | # The message to display |
| @@ -501,8 +508,8 @@ endef | |||
| 501 | %: | 508 | %: |
| 502 | # Check if we have the CMP tool installed | 509 | # Check if we have the CMP tool installed |
| 503 | cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; | 510 | cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; |
| 504 | # Ensure that bin/qmk works. | 511 | # Ensure that $(QMK_BIN) works. |
| 505 | if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi | 512 | if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi |
| 506 | # Check if the submodules are dirty, and display a warning if they are | 513 | # Check if the submodules are dirty, and display a warning if they are |
| 507 | ifndef SKIP_GIT | 514 | ifndef SKIP_GIT |
| 508 | if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi | 515 | if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi |
