From 92d62d05e83addbded680eeece3f25cb004b746b Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 22 Nov 2023 15:21:42 +1100 Subject: Initial structure. --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4b045ed --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.SILENT: + +MAKEFLAGS += --no-print-directory + +QMK_USERSPACE := $(patsubst %/,%,$(dir $(shell realpath "$(lastword $(MAKEFILE_LIST))"))) +ifeq ($(QMK_USERSPACE),) + QMK_USERSPACE := $(shell pwd) +endif + +QMK_FIRMWARE_ROOT = $(shell qmk config -ro user.qmk_home | cut -d= -f2 | sed -e 's@^None$$@@g') +ifeq ($(QMK_FIRMWARE_ROOT),) + $(error Cannot determine qmk_firmware location. `qmk config -ro user.qmk_home` is not set) +endif + +%: + +$(MAKE) -C $(QMK_FIRMWARE_ROOT) $(MAKECMDGOALS) QMK_USERSPACE=$(QMK_USERSPACE) -- cgit v1.3-2-g0d8e