aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIBNobody <ibnobody@gmail.com>2016-04-14 22:27:28 -0500
committerIBNobody <ibnobody@gmail.com>2016-04-14 22:27:28 -0500
commit3993afbb2e022f4e6371c729ac6a025f16bc734e (patch)
treea1828f72f72840396e0ba7de273cdb27499f635e
parentf051496f1343259f4da8c5d917b9c9e47b97e38c (diff)
downloadqmk_firmware-3993afbb2e022f4e6371c729ac6a025f16bc734e.tar.gz
qmk_firmware-3993afbb2e022f4e6371c729ac6a025f16bc734e.zip
adding new per-keymap makefile
-rw-r--r--keyboard/atomic/Makefile85
-rw-r--r--keyboard/atomic/keymaps/pvc/makefile.mk16
-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#
45BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
46MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
47EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
48CONSOLE_ENABLE = yes # Console for debug(+400)
49COMMAND_ENABLE = yes # Commands for debug and configuration
50NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here:
51 # https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
52BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
53MIDI_ENABLE = no # MIDI controls
54AUDIO_ENABLE = no # Audio output on port C6
55UNICODE_ENABLE = no # Unicode
56BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
57RGBLIGHT_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
60SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
61
41# Target file name (without extension). 62# Target file name (without extension).
42TARGET = atomic 63TARGET = atomic
43 64
@@ -50,15 +71,42 @@ TMK_DIR = ../../tmk_core
50TARGET_DIR = . 71TARGET_DIR = .
51 72
52# # project specific files 73# # project specific files
53SRC = atomic.c \ 74SRC = atomic.c
54 backlight.c 75
76ifdef keymap
77 KEYMAP = $(keymap)
78endif
55 79
56ifdef KEYMAP 80ifdef KEYMAP
57 SRC := keymaps/$(KEYMAP).c $(SRC) 81ifneq ("$(wildcard keymaps/$(KEYMAP).c)","")
82 KEYMAP_FILE = keymaps/$(KEYMAP).c
83else
84ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","")
85 KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c
86ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
87 include keymaps/$(KEYMAP)/makefile.mk
88endif
89else
90$(error Keymap file does not exist)
91endif
92endif
93
58else 94else
59 SRC := keymaps/default.c $(SRC) 95
96ifneq ("$(wildcard keymaps/default.c)","")
97 KEYMAP_FILE = keymaps/default.c
98else
99 KEYMAP_FILE = keymaps/default/keymap.c
100endif
101
102ifneq ("$(wildcard keymaps/default/makefile.mk)","")
103 include keymaps/default/makefile.mk
104endif
105
60endif 106endif
61 107
108SRC := $(KEYMAP_FILE) $(SRC)
109
62CONFIG_H = config.h 110CONFIG_H = config.h
63 111
64# MCU name 112# MCU name
@@ -111,22 +159,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
111OPT_DEFS += -DBOOTLOADER_SIZE=4096 159OPT_DEFS += -DBOOTLOADER_SIZE=4096
112 160
113 161
114# Build Options 162ifeq ($(BACKLIGHT_ENABLE), yes)
115# comment out to disable the options. 163 SRC += backlight.c
116# 164endif
117BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
118MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
119EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
120CONSOLE_ENABLE = yes # Console for debug(+400)
121COMMAND_ENABLE = yes # Commands for debug and configuration
122NKRO_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)
136VPATH += $(TOP_DIR) 172VPATH += $(TOP_DIR)
137VPATH += $(TMK_DIR) 173VPATH += $(TMK_DIR)
138 174
139debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION 175include $(TOP_DIR)/quantum/quantum.mk \ No newline at end of file
140debug-on: all
141
142debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
143debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
144debug-off: all
145
146include $(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 @@
1BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
2MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
3EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
4CONSOLE_ENABLE = no # Console for debug(+400)
5COMMAND_ENABLE = yes # Commands for debug and configuration
6NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here:
7 # https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
8BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
9MIDI_ENABLE = no # MIDI controls
10AUDIO_ENABLE = no # Audio output on port C6
11UNICODE_ENABLE = no # Unicode
12BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
13RGBLIGHT_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
16SLEEP_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