diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 20:21:05 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 20:21:05 -0400 |
commit | ba6fb23f079a03f978c81deda58d1d18e08c54dc (patch) | |
tree | 61c168bc0d4f7f784c3c4227a8ee1fe14a3dbd5f /Makefile | |
parent | 7db2ec1509f6e90f8feea7c9fa73350544235a25 (diff) |
adds handwire and onekey example
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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 |