summaryrefslogtreecommitdiff
path: root/keyboard/planck/Makefile
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-01-23 20:37:00 -0500
committerJack Humbert <jack.humb@gmail.com>2016-01-23 20:37:00 -0500
commit9a1ae948c9e19d3153512c196801a969c9637732 (patch)
tree948641e82788ee298468da9090749f79ad765c00 /keyboard/planck/Makefile
parente5aee62e54d0b6f02ff170f4e9bf1e738d36fb4c (diff)
parentae620fe8562254a5c00a48b863cabd4c87abd613 (diff)
Merge pull request #104 from jackhumbert/smarkefile
Rework Planck file structure
Diffstat (limited to 'keyboard/planck/Makefile')
-rw-r--r--keyboard/planck/Makefile32
1 files changed, 26 insertions, 6 deletions
diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile
index 485c5f77f6..dece6a7f17 100644
--- a/keyboard/planck/Makefile
+++ b/keyboard/planck/Makefile
@@ -50,14 +50,30 @@ TMK_DIR = ../../tmk_core
TARGET_DIR = .
# # project specific files
-SRC = planck.c \
- backlight.c
+SRC = planck.c
+
+ifdef keymap
+ KEYMAP = $(keymap)
+endif
ifdef KEYMAP
- SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
+ifneq ("$(wildcard keymaps/$(KEYMAP).c)","")
+ KEYMAP_FILE = keymaps/$(KEYMAP).c
+else
+ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","")
+ KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c
else
- SRC := keymaps/keymap_default.c $(SRC)
+$(error Keymap file does not exist)
endif
+endif
+else
+ifneq ("$(wildcard keymaps/default.c)","")
+ KEYMAP_FILE = keymaps/default.c
+else
+ KEYMAP_FILE = keymaps/default/keymap.c
+endif
+endif
+SRC := $(KEYMAP_FILE) $(SRC)
CONFIG_H = config.h
@@ -122,11 +138,15 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-# MIDI_ENABLE = YES # MIDI controls
+# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = YES # MIDI controls
+AUDIO_ENABLE = YES # Audio output on port C6
# UNICODE_ENABLE = YES # Unicode
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
+ifdef BACKLIGHT_ENABLE
+ SRC += backlight.c
+endif
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax