diff options
| author | IBNobody <ibnobody@gmail.com> | 2016-04-14 22:27:28 -0500 |
|---|---|---|
| committer | IBNobody <ibnobody@gmail.com> | 2016-04-14 22:27:28 -0500 |
| commit | 3993afbb2e022f4e6371c729ac6a025f16bc734e (patch) | |
| tree | a1828f72f72840396e0ba7de273cdb27499f635e | |
| parent | f051496f1343259f4da8c5d917b9c9e47b97e38c (diff) | |
| download | qmk_firmware-3993afbb2e022f4e6371c729ac6a025f16bc734e.tar.gz qmk_firmware-3993afbb2e022f4e6371c729ac6a025f16bc734e.zip | |
adding new per-keymap makefile
| -rw-r--r-- | keyboard/atomic/Makefile | 85 | ||||
| -rw-r--r-- | keyboard/atomic/keymaps/pvc/makefile.mk | 16 | ||||
| -rw-r--r-- | keyboard/atomic/keymaps/pvc/pvc_atomic.c (renamed from keyboard/atomic/keymaps/pvc_atomic.c) | 0 |
3 files changed, 73 insertions, 28 deletions
diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 206b5f119..364efa3fa 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP | 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP |
| 28 | # (must have Atmel FLIP installed). | 28 | # (must have Atmel FLIP installed). |
| 29 | # | 29 | # |
| 30 | # make debug = Start either simulavr or avarice as specified for debugging, | 30 | # make debug = Start either simulavr or avarice as specified for debugging, |
| 31 | # with avr-gdb or avr-insight as the front end for debugging. | 31 | # with avr-gdb or avr-insight as the front end for debugging. |
| 32 | # | 32 | # |
| 33 | # make filename.s = Just compile filename.c into the assembler code only. | 33 | # make filename.s = Just compile filename.c into the assembler code only. |
| @@ -38,6 +38,27 @@ | |||
| 38 | # To rebuild project do "make clean" then "make all". | 38 | # To rebuild project do "make clean" then "make all". |
| 39 | #---------------------------------------------------------------------------- | 39 | #---------------------------------------------------------------------------- |
| 40 | 40 | ||
| 41 | # Build Options | ||
| 42 | # change to "no" to disable the options, or define them in the makefile.mk in | ||
| 43 | # the appropriate keymap folder that will get included automatically | ||
| 44 | # | ||
| 45 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 46 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 47 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 48 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 49 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 50 | NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: | ||
| 51 | # https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 52 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 53 | MIDI_ENABLE = no # MIDI controls | ||
| 54 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 55 | UNICODE_ENABLE = no # Unicode | ||
| 56 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 57 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 58 | |||
| 59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 61 | |||
| 41 | # Target file name (without extension). | 62 | # Target file name (without extension). |
| 42 | TARGET = atomic | 63 | TARGET = atomic |
| 43 | 64 | ||
| @@ -50,15 +71,42 @@ TMK_DIR = ../../tmk_core | |||
| 50 | TARGET_DIR = . | 71 | TARGET_DIR = . |
| 51 | 72 | ||
| 52 | # # project specific files | 73 | # # project specific files |
| 53 | SRC = atomic.c \ | 74 | SRC = atomic.c |
| 54 | backlight.c | 75 | |
| 76 | ifdef keymap | ||
| 77 | KEYMAP = $(keymap) | ||
| 78 | endif | ||
| 55 | 79 | ||
| 56 | ifdef KEYMAP | 80 | ifdef KEYMAP |
| 57 | SRC := keymaps/$(KEYMAP).c $(SRC) | 81 | ifneq ("$(wildcard keymaps/$(KEYMAP).c)","") |
| 82 | KEYMAP_FILE = keymaps/$(KEYMAP).c | ||
| 83 | else | ||
| 84 | ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","") | ||
| 85 | KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c | ||
| 86 | ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","") | ||
| 87 | include keymaps/$(KEYMAP)/makefile.mk | ||
| 88 | endif | ||
| 89 | else | ||
| 90 | $(error Keymap file does not exist) | ||
| 91 | endif | ||
| 92 | endif | ||
| 93 | |||
| 58 | else | 94 | else |
| 59 | SRC := keymaps/default.c $(SRC) | 95 | |
| 96 | ifneq ("$(wildcard keymaps/default.c)","") | ||
| 97 | KEYMAP_FILE = keymaps/default.c | ||
| 98 | else | ||
| 99 | KEYMAP_FILE = keymaps/default/keymap.c | ||
| 100 | endif | ||
| 101 | |||
| 102 | ifneq ("$(wildcard keymaps/default/makefile.mk)","") | ||
| 103 | include keymaps/default/makefile.mk | ||
| 104 | endif | ||
| 105 | |||
| 60 | endif | 106 | endif |
| 61 | 107 | ||
| 108 | SRC := $(KEYMAP_FILE) $(SRC) | ||
| 109 | |||
| 62 | CONFIG_H = config.h | 110 | CONFIG_H = config.h |
| 63 | 111 | ||
| 64 | # MCU name | 112 | # MCU name |
| @@ -111,22 +159,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
| 111 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | 159 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 |
| 112 | 160 | ||
| 113 | 161 | ||
| 114 | # Build Options | 162 | ifeq ($(BACKLIGHT_ENABLE), yes) |
| 115 | # comment out to disable the options. | 163 | SRC += backlight.c |
| 116 | # | 164 | endif |
| 117 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 118 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 119 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 120 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 121 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 122 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | ||
| 123 | #BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 124 | #MIDI_ENABLE = yes # MIDI controls | ||
| 125 | #UNICODE_ENABLE = yes # Unicode | ||
| 126 | #BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 127 | 165 | ||
| 128 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 129 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
| 130 | 166 | ||
| 131 | # Optimize size but this may cause error "relocation truncated to fit" | 167 | # Optimize size but this may cause error "relocation truncated to fit" |
| 132 | #EXTRALDFLAGS = -Wl,--relax | 168 | #EXTRALDFLAGS = -Wl,--relax |
| @@ -136,11 +172,4 @@ VPATH += $(TARGET_DIR) | |||
| 136 | VPATH += $(TOP_DIR) | 172 | VPATH += $(TOP_DIR) |
| 137 | VPATH += $(TMK_DIR) | 173 | VPATH += $(TMK_DIR) |
| 138 | 174 | ||
| 139 | debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION | 175 | include $(TOP_DIR)/quantum/quantum.mk \ No newline at end of file |
| 140 | debug-on: all | ||
| 141 | |||
| 142 | debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT | ||
| 143 | debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) | ||
| 144 | debug-off: all | ||
| 145 | |||
| 146 | include $(TOP_DIR)/quantum/quantum.mk | ||
diff --git a/keyboard/atomic/keymaps/pvc/makefile.mk b/keyboard/atomic/keymaps/pvc/makefile.mk new file mode 100644 index 000000000..ff0a9c338 --- /dev/null +++ b/keyboard/atomic/keymaps/pvc/makefile.mk | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 2 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 3 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 4 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 5 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 6 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: | ||
| 7 | # https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 8 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 9 | MIDI_ENABLE = no # MIDI controls | ||
| 10 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 11 | UNICODE_ENABLE = no # Unicode | ||
| 12 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 13 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 14 | |||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboard/atomic/keymaps/pvc_atomic.c b/keyboard/atomic/keymaps/pvc/pvc_atomic.c index 3ddd3e329..3ddd3e329 100644 --- a/keyboard/atomic/keymaps/pvc_atomic.c +++ b/keyboard/atomic/keymaps/pvc/pvc_atomic.c | |||
