summaryrefslogtreecommitdiff
path: root/keyboard/planck/Makefile
diff options
context:
space:
mode:
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