diff options
Diffstat (limited to 'keyboard/planck/Makefile')
-rw-r--r-- | keyboard/planck/Makefile | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 485c5f77f6..307b0c7f4f 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -27,7 +27,7 @@ # make flip-ee = Download the eeprom file to the device, using Atmel FLIP # (must have Atmel FLIP installed). # -# make debug = Start either simulavr or avarice as specified for debugging, +# make debug = Start either simulavr or avarice as specified for debugging, # with avr-gdb or avr-insight as the front end for debugging. # # make filename.s = Just compile filename.c into the assembler code only. @@ -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 @@ -124,8 +140,14 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +# AUDIO_ENABLE = YES # Audio output on port C6 # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +# RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with MIDI at the same time. + +ifdef BACKLIGHT_ENABLE + SRC += backlight.c +endif # Optimize size but this may cause error "relocation truncated to fit" @@ -137,4 +159,3 @@ VPATH += $(TOP_DIR) VPATH += $(TMK_DIR) include $(TOP_DIR)/quantum/quantum.mk - |