diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2017-06-16 21:34:01 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2017-06-18 21:10:42 +0300 |
| commit | 7424261dae180d1cc0e4e46b4ee2d51ef5524e0a (patch) | |
| tree | c2180efd00452bfca7dfd9754a66d17d5efdd751 | |
| parent | 30f22d450da19c65584e6deb8515a1fa5b074e07 (diff) | |
| download | qmk_firmware-7424261dae180d1cc0e4e46b4ee2d51ef5524e0a.tar.gz qmk_firmware-7424261dae180d1cc0e4e46b4ee2d51ef5524e0a.zip | |
Try to build tmk_common
| -rw-r--r-- | build_full_test.mk | 10 | ||||
| -rw-r--r-- | build_keyboard.mk | 122 | ||||
| -rw-r--r-- | common.mk | 124 |
3 files changed, 132 insertions, 124 deletions
diff --git a/build_full_test.mk b/build_full_test.mk index 0405b9d0f..5b4685a91 100644 --- a/build_full_test.mk +++ b/build_full_test.mk | |||
| @@ -11,4 +11,12 @@ | |||
| 11 | # GNU General Public License for more details. | 11 | # GNU General Public License for more details. |
| 12 | # | 12 | # |
| 13 | # You should have received a copy of the GNU General Public License | 13 | # You should have received a copy of the GNU General Public License |
| 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. \ No newline at end of file | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | |||
| 16 | include tests/$(TEST)/rules.mk | ||
| 17 | #include $(TMK_PATH)/protocol.mk | ||
| 18 | |||
| 19 | TEST_PATH=tests/$(TEST) | ||
| 20 | |||
| 21 | $(TEST)_SRC=$(TEST_PATH)/test.c $(TMK_COMMON_SRC) | ||
| 22 | $(TEST)_DEFS=$(TMK_COMMON_DEFS) | ||
diff --git a/build_keyboard.mk b/build_keyboard.mk index 36eab3a9e..f13d5b6d6 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk | |||
| @@ -131,128 +131,6 @@ ifndef CUSTOM_MATRIX | |||
| 131 | SRC += $(QUANTUM_DIR)/matrix.c | 131 | SRC += $(QUANTUM_DIR)/matrix.c |
| 132 | endif | 132 | endif |
| 133 | 133 | ||
| 134 | ifeq ($(strip $(API_SYSEX_ENABLE)), yes) | ||
| 135 | OPT_DEFS += -DAPI_SYSEX_ENABLE | ||
| 136 | SRC += $(QUANTUM_DIR)/api/api_sysex.c | ||
| 137 | OPT_DEFS += -DAPI_ENABLE | ||
| 138 | SRC += $(QUANTUM_DIR)/api.c | ||
| 139 | MIDI_ENABLE=yes | ||
| 140 | endif | ||
| 141 | |||
| 142 | MUSIC_ENABLE := 0 | ||
| 143 | |||
| 144 | ifeq ($(strip $(AUDIO_ENABLE)), yes) | ||
| 145 | OPT_DEFS += -DAUDIO_ENABLE | ||
| 146 | MUSIC_ENABLE := 1 | ||
| 147 | SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c | ||
| 148 | SRC += $(QUANTUM_DIR)/audio/audio.c | ||
| 149 | SRC += $(QUANTUM_DIR)/audio/voices.c | ||
| 150 | SRC += $(QUANTUM_DIR)/audio/luts.c | ||
| 151 | endif | ||
| 152 | |||
| 153 | ifeq ($(strip $(MIDI_ENABLE)), yes) | ||
| 154 | OPT_DEFS += -DMIDI_ENABLE | ||
| 155 | MUSIC_ENABLE := 1 | ||
| 156 | SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c | ||
| 157 | endif | ||
| 158 | |||
| 159 | ifeq ($(MUSIC_ENABLE), 1) | ||
| 160 | SRC += $(QUANTUM_DIR)/process_keycode/process_music.c | ||
| 161 | endif | ||
| 162 | |||
| 163 | ifeq ($(strip $(COMBO_ENABLE)), yes) | ||
| 164 | OPT_DEFS += -DCOMBO_ENABLE | ||
| 165 | SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c | ||
| 166 | endif | ||
| 167 | |||
| 168 | ifeq ($(strip $(VIRTSER_ENABLE)), yes) | ||
| 169 | OPT_DEFS += -DVIRTSER_ENABLE | ||
| 170 | endif | ||
| 171 | |||
| 172 | ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) | ||
| 173 | OPT_DEFS += -DFAUXCLICKY_ENABLE | ||
| 174 | SRC += $(QUANTUM_DIR)/fauxclicky.c | ||
| 175 | endif | ||
| 176 | |||
| 177 | ifeq ($(strip $(UCIS_ENABLE)), yes) | ||
| 178 | OPT_DEFS += -DUCIS_ENABLE | ||
| 179 | UNICODE_COMMON = yes | ||
| 180 | SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c | ||
| 181 | endif | ||
| 182 | |||
| 183 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) | ||
| 184 | OPT_DEFS += -DUNICODEMAP_ENABLE | ||
| 185 | UNICODE_COMMON = yes | ||
| 186 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c | ||
| 187 | endif | ||
| 188 | |||
| 189 | ifeq ($(strip $(UNICODE_ENABLE)), yes) | ||
| 190 | OPT_DEFS += -DUNICODE_ENABLE | ||
| 191 | UNICODE_COMMON = yes | ||
| 192 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c | ||
| 193 | endif | ||
| 194 | |||
| 195 | ifeq ($(strip $(UNICODE_COMMON)), yes) | ||
| 196 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c | ||
| 197 | endif | ||
| 198 | |||
| 199 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | ||
| 200 | OPT_DEFS += -DRGBLIGHT_ENABLE | ||
| 201 | SRC += $(QUANTUM_DIR)/light_ws2812.c | ||
| 202 | SRC += $(QUANTUM_DIR)/rgblight.c | ||
| 203 | CIE1931_CURVE = yes | ||
| 204 | LED_BREATHING_TABLE = yes | ||
| 205 | endif | ||
| 206 | |||
| 207 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | ||
| 208 | OPT_DEFS += -DTAP_DANCE_ENABLE | ||
| 209 | SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c | ||
| 210 | endif | ||
| 211 | |||
| 212 | ifeq ($(strip $(PRINTING_ENABLE)), yes) | ||
| 213 | OPT_DEFS += -DPRINTING_ENABLE | ||
| 214 | SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c | ||
| 215 | SRC += $(TMK_DIR)/protocol/serial_uart.c | ||
| 216 | endif | ||
| 217 | |||
| 218 | ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) | ||
| 219 | SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC)) | ||
| 220 | OPT_DEFS += $(SERIAL_DEFS) | ||
| 221 | VAPTH += $(SERIAL_PATH) | ||
| 222 | endif | ||
| 223 | |||
| 224 | ifneq ($(strip $(VARIABLE_TRACE)),) | ||
| 225 | SRC += $(QUANTUM_DIR)/variable_trace.c | ||
| 226 | OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE)) | ||
| 227 | ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) | ||
| 228 | OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) | ||
| 229 | endif | ||
| 230 | endif | ||
| 231 | |||
| 232 | ifeq ($(strip $(LCD_ENABLE)), yes) | ||
| 233 | CIE1931_CURVE = yes | ||
| 234 | endif | ||
| 235 | |||
| 236 | ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) | ||
| 237 | ifeq ($(strip $(VISUALIZER_ENABLE)), yes) | ||
| 238 | CIE1931_CURVE = yes | ||
| 239 | endif | ||
| 240 | endif | ||
| 241 | |||
| 242 | ifeq ($(strip $(CIE1931_CURVE)), yes) | ||
| 243 | OPT_DEFS += -DUSE_CIE1931_CURVE | ||
| 244 | LED_TABLES = yes | ||
| 245 | endif | ||
| 246 | |||
| 247 | ifeq ($(strip $(LED_BREATHING_TABLE)), yes) | ||
| 248 | OPT_DEFS += -DUSE_LED_BREATHING_TABLE | ||
| 249 | LED_TABLES = yes | ||
| 250 | endif | ||
| 251 | |||
| 252 | ifeq ($(strip $(LED_TABLES)), yes) | ||
| 253 | SRC += $(QUANTUM_DIR)/led_tables.c | ||
| 254 | endif | ||
| 255 | |||
| 256 | # Optimize size but this may cause error "relocation truncated to fit" | 134 | # Optimize size but this may cause error "relocation truncated to fit" |
| 257 | #EXTRALDFLAGS = -Wl,--relax | 135 | #EXTRALDFLAGS = -Wl,--relax |
| 258 | 136 | ||
| @@ -24,4 +24,126 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras | |||
| 24 | COMMON_VPATH += $(QUANTUM_PATH)/audio | 24 | COMMON_VPATH += $(QUANTUM_PATH)/audio |
| 25 | COMMON_VPATH += $(QUANTUM_PATH)/process_keycode | 25 | COMMON_VPATH += $(QUANTUM_PATH)/process_keycode |
| 26 | COMMON_VPATH += $(QUANTUM_PATH)/api | 26 | COMMON_VPATH += $(QUANTUM_PATH)/api |
| 27 | COMMON_VPATH += $(SERIAL_PATH) \ No newline at end of file | 27 | COMMON_VPATH += $(SERIAL_PATH) |
| 28 | |||
| 29 | ifeq ($(strip $(API_SYSEX_ENABLE)), yes) | ||
| 30 | OPT_DEFS += -DAPI_SYSEX_ENABLE | ||
| 31 | SRC += $(QUANTUM_DIR)/api/api_sysex.c | ||
| 32 | OPT_DEFS += -DAPI_ENABLE | ||
| 33 | SRC += $(QUANTUM_DIR)/api.c | ||
| 34 | MIDI_ENABLE=yes | ||
| 35 | endif | ||
| 36 | |||
| 37 | MUSIC_ENABLE := 0 | ||
| 38 | |||
| 39 | ifeq ($(strip $(AUDIO_ENABLE)), yes) | ||
| 40 | OPT_DEFS += -DAUDIO_ENABLE | ||
| 41 | MUSIC_ENABLE := 1 | ||
| 42 | SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c | ||
| 43 | SRC += $(QUANTUM_DIR)/audio/audio.c | ||
| 44 | SRC += $(QUANTUM_DIR)/audio/voices.c | ||
| 45 | SRC += $(QUANTUM_DIR)/audio/luts.c | ||
| 46 | endif | ||
| 47 | |||
| 48 | ifeq ($(strip $(MIDI_ENABLE)), yes) | ||
| 49 | OPT_DEFS += -DMIDI_ENABLE | ||
| 50 | MUSIC_ENABLE := 1 | ||
| 51 | SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c | ||
| 52 | endif | ||
| 53 | |||
| 54 | ifeq ($(MUSIC_ENABLE), 1) | ||
| 55 | SRC += $(QUANTUM_DIR)/process_keycode/process_music.c | ||
| 56 | endif | ||
| 57 | |||
| 58 | ifeq ($(strip $(COMBO_ENABLE)), yes) | ||
| 59 | OPT_DEFS += -DCOMBO_ENABLE | ||
| 60 | SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c | ||
| 61 | endif | ||
| 62 | |||
| 63 | ifeq ($(strip $(VIRTSER_ENABLE)), yes) | ||
| 64 | OPT_DEFS += -DVIRTSER_ENABLE | ||
| 65 | endif | ||
| 66 | |||
| 67 | ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) | ||
| 68 | OPT_DEFS += -DFAUXCLICKY_ENABLE | ||
| 69 | SRC += $(QUANTUM_DIR)/fauxclicky.c | ||
| 70 | endif | ||
| 71 | |||
| 72 | ifeq ($(strip $(UCIS_ENABLE)), yes) | ||
| 73 | OPT_DEFS += -DUCIS_ENABLE | ||
| 74 | UNICODE_COMMON = yes | ||
| 75 | SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c | ||
| 76 | endif | ||
| 77 | |||
| 78 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) | ||
| 79 | OPT_DEFS += -DUNICODEMAP_ENABLE | ||
| 80 | UNICODE_COMMON = yes | ||
| 81 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c | ||
| 82 | endif | ||
| 83 | |||
| 84 | ifeq ($(strip $(UNICODE_ENABLE)), yes) | ||
| 85 | OPT_DEFS += -DUNICODE_ENABLE | ||
| 86 | UNICODE_COMMON = yes | ||
| 87 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c | ||
| 88 | endif | ||
| 89 | |||
| 90 | ifeq ($(strip $(UNICODE_COMMON)), yes) | ||
| 91 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c | ||
| 92 | endif | ||
| 93 | |||
| 94 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | ||
| 95 | OPT_DEFS += -DRGBLIGHT_ENABLE | ||
| 96 | SRC += $(QUANTUM_DIR)/light_ws2812.c | ||
| 97 | SRC += $(QUANTUM_DIR)/rgblight.c | ||
| 98 | CIE1931_CURVE = yes | ||
| 99 | LED_BREATHING_TABLE = yes | ||
| 100 | endif | ||
| 101 | |||
| 102 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | ||
| 103 | OPT_DEFS += -DTAP_DANCE_ENABLE | ||
| 104 | SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c | ||
| 105 | endif | ||
| 106 | |||
| 107 | ifeq ($(strip $(PRINTING_ENABLE)), yes) | ||
| 108 | OPT_DEFS += -DPRINTING_ENABLE | ||
| 109 | SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c | ||
| 110 | SRC += $(TMK_DIR)/protocol/serial_uart.c | ||
| 111 | endif | ||
| 112 | |||
| 113 | ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) | ||
| 114 | SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC)) | ||
| 115 | OPT_DEFS += $(SERIAL_DEFS) | ||
| 116 | VAPTH += $(SERIAL_PATH) | ||
| 117 | endif | ||
| 118 | |||
| 119 | ifneq ($(strip $(VARIABLE_TRACE)),) | ||
| 120 | SRC += $(QUANTUM_DIR)/variable_trace.c | ||
| 121 | OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE)) | ||
| 122 | ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) | ||
| 123 | OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) | ||
| 124 | endif | ||
| 125 | endif | ||
| 126 | |||
| 127 | ifeq ($(strip $(LCD_ENABLE)), yes) | ||
| 128 | CIE1931_CURVE = yes | ||
| 129 | endif | ||
| 130 | |||
| 131 | ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) | ||
| 132 | ifeq ($(strip $(VISUALIZER_ENABLE)), yes) | ||
| 133 | CIE1931_CURVE = yes | ||
| 134 | endif | ||
| 135 | endif | ||
| 136 | |||
| 137 | ifeq ($(strip $(CIE1931_CURVE)), yes) | ||
| 138 | OPT_DEFS += -DUSE_CIE1931_CURVE | ||
| 139 | LED_TABLES = yes | ||
| 140 | endif | ||
| 141 | |||
| 142 | ifeq ($(strip $(LED_BREATHING_TABLE)), yes) | ||
| 143 | OPT_DEFS += -DUSE_LED_BREATHING_TABLE | ||
| 144 | LED_TABLES = yes | ||
| 145 | endif | ||
| 146 | |||
| 147 | ifeq ($(strip $(LED_TABLES)), yes) | ||
| 148 | SRC += $(QUANTUM_DIR)/led_tables.c | ||
| 149 | endif | ||
