]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/quantum.mk
4a076eca4de60ea2bf5b63d550cc75663456bb3d
[qmk_firmware.git] / quantum / quantum.mk
1 QUANTUM_DIR = quantum
2
3 # # project specific files
4 SRC += $(QUANTUM_DIR)/keymap_common.c \
5         $(QUANTUM_DIR)/led.c
6
7 # ifdef KEYMAP_FILE
8 # ifneq (,$(shell grep USING_MIDI '$(KEYMAP_FILE)'))
9 # MIDI_ENABLE=yes
10 # $(info  * Overriding MIDI_ENABLE setting - $(KEYMAP_FILE) requires it)
11 # endif
12 # ifneq (,$(shell grep USING_UNICODE '$(KEYMAP_FILE)'))
13 # UNICODE_ENABLE=yes
14 # $(info  * Overriding UNICODE_ENABLE setting - $(KEYMAP_FILE) requires it)
15 # endif
16 # ifneq (,$(shell grep USING_BACKLIGHT '$(KEYMAP_FILE)'))
17 # BACKLIGHT_ENABLE=yes
18 # $(info  * Overriding BACKLIGHT_ENABLE setting - $(KEYMAP_FILE) requires it)
19 # endif
20 # endif
21
22 ifndef CUSTOM_MATRIX
23         SRC += $(QUANTUM_DIR)/matrix.c
24 endif
25
26 ifeq ($(strip $(MIDI_ENABLE)), yes)
27         SRC += $(QUANTUM_DIR)/keymap_midi.c
28 endif
29
30 ifeq ($(strip $(AUDIO_ENABLE)), yes)
31         SRC += $(QUANTUM_DIR)/audio/audio.c $(QUANTUM_DIR)/audio/voices.c
32         SRC += $(QUANTUM_DIR)/audio/audio.c $(QUANTUM_DIR)/audio/luts.c
33 endif
34
35 ifeq ($(strip $(UNICODE_ENABLE)), yes)
36         SRC += $(QUANTUM_DIR)/keymap_unicode.c
37 endif
38
39 ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
40         SRC += $(QUANTUM_DIR)/light_ws2812.c
41         SRC += $(QUANTUM_DIR)/rgblight.c
42         OPT_DEFS += -DRGBLIGHT_ENABLE
43 endif
44
45 # Optimize size but this may cause error "relocation truncated to fit"
46 #EXTRALDFLAGS = -Wl,--relax
47
48 # Search Path
49 VPATH += $(TOP_DIR)/$(QUANTUM_DIR)
50 VPATH += $(TOP_DIR)/$(QUANTUM_DIR)/keymap_extras
51 VPATH += $(TOP_DIR)/$(QUANTUM_DIR)/audio
52
53 include $(TMK_DIR)/protocol/lufa.mk
54
55 include $(TMK_DIR)/common.mk
56 include $(TMK_DIR)/rules.mk