summaryrefslogtreecommitdiff
path: root/keyboard/planck/Makefile
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-01-16 00:51:24 -0500
committerJack Humbert <jack.humb@gmail.com>2016-01-16 00:52:31 -0500
commitdfe7004bc545ff7247a0dbef4788b9e1952f9c5d (patch)
tree50ce3ca421a1cb0a8864e054ab7d7e00a9171110 /keyboard/planck/Makefile
parent4faddd3449ca553e0d8b02ba91f9a34b534eebe7 (diff)
new keymap folder structure and makefile magic
Diffstat (limited to 'keyboard/planck/Makefile')
-rw-r--r--keyboard/planck/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile
index 485c5f77f6..f3537b2c7a 100644
--- a/keyboard/planck/Makefile
+++ b/keyboard/planck/Makefile
@@ -54,10 +54,19 @@ SRC = planck.c \
backlight.c
ifdef KEYMAP
- SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
+ifneq ("$(wildcard keymaps/$(KEYMAP).c)","")
+ KEYMAP_FILE = keymaps/$(KEYMAP).c
else
- SRC := keymaps/keymap_default.c $(SRC)
+ KEYMAP_FILE = keymaps/$(KEYMAP)/default.c
endif
+else
+ifneq ("$(wildcard keymaps/default.c)","")
+ KEYMAP_FILE = keymaps/default.c
+else
+ KEYMAP_FILE = keymaps/default/default.c
+endif
+endif
+SRC := $(KEYMAP_FILE) $(SRC)
CONFIG_H = config.h