summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-06-29 20:21:05 -0400
committerJack Humbert <jack.humb@gmail.com>2016-06-29 20:21:05 -0400
commitba6fb23f079a03f978c81deda58d1d18e08c54dc (patch)
tree61c168bc0d4f7f784c3c4227a8ee1fe14a3dbd5f /Makefile
parent7db2ec1509f6e90f8feea7c9fa73350544235a25 (diff)
downloadqmk_firmware-ba6fb23f079a03f978c81deda58d1d18e08c54dc.tar.gz
qmk_firmware-ba6fb23f079a03f978c81deda58d1d18e08c54dc.zip
adds handwire and onekey example
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 16 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 5642aa2839..f9b865b9f8 100644
--- a/Makefile
+++ b/Makefile
@@ -65,22 +65,24 @@ endif
KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD)
+ifdef sub
+ SUBPROJECT=$(sub)
+endif
+ifdef subproject
+ SUBPROJECT=$(subproject)
+endif
+
ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","")
KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c
ifndef ARCH
- include $(KEYBOARD_PATH)/Makefile
+ ifneq ("$(wildcard $(KEYBOARD_PATH)/Makefile)","")
+ include $(KEYBOARD_PATH)/Makefile
+ endif
endif
else
$(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist)
endif
-ifdef sub
- SUBPROJECT=$(sub)
-endif
-ifdef subproject
- SUBPROJECT=$(subproject)
-endif
-
ifdef SUBPROJECT_DEFAULT
SUBPROJECT?=$(SUBPROJECT_DEFAULT)
endif
@@ -110,7 +112,13 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/keymap.c)","")
KEYMAP_FILE = keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c
-include $(KEYMAP_PATH)/Makefile
else
+ ifeq ("$(wildcard $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)/keymap.c)","")
$(error "$(KEYMAP_PATH)/keymap.c" does not exist)
+ else
+ KEYMAP_PATH = $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
+ KEYMAP_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/$(KEYMAP)/keymap.c
+ -include $(KEYMAP_PATH)/Makefile
+ endif
endif
ifdef SUBPROJECT