From d2ff66a985b938e87fffe55c1d9f1dc55e356f91 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 23 Aug 2017 22:29:07 -0400 Subject: Creates a layouts/ folder for keymaps shared between keyboards (#1609) * include variables and .h files as pp directives * start layout compilation * split ergodoxes up * don't compile all layouts for everything * might seg fault * reset layouts variable * actually reset layouts * include rules.mk instead * remove includes from rules.mk * update variable setting * load visualizer from path * adds some more examples * adds more layouts * more boards added * more boards added * adds documentation for layouts * use lowercase names for LAYOUT_ * add layout.json files for each layout * add community folder, default keymaps for layouts * touch-up default layouts * touch-up layouts, some keyboard rules.mk * update documentation for layouts * fix up serial/i2c switches --- build_layout.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 build_layout.mk (limited to 'build_layout.mk') diff --git a/build_layout.mk b/build_layout.mk new file mode 100644 index 000000000..beb1cb662 --- /dev/null +++ b/build_layout.mk @@ -0,0 +1,18 @@ +LAYOUTS_PATH := layouts +LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/)))) + +define SEARCH_LAYOUTS_REPO + LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP) + LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c + ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") + -include $$(LAYOUT_KEYMAP_PATH)/rules.mk + KEYMAP_C := $$(LAYOUT_KEYMAP_C) + KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) + endif +endef + +define SEARCH_LAYOUTS + $$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO))) +endef + +$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) \ No newline at end of file -- cgit v1.2.3-70-g09d2