summaryrefslogtreecommitdiffstats
path: root/quantum/quantum.mk
blob: 3069f582c38b7470563d7679249ef8da2b2a2b25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
QUANTUM_DIR = quantum

# # project specific files
SRC += $(QUANTUM_DIR)/keymap_common.c \
	$(QUANTUM_DIR)/led.c

# ifdef KEYMAP_FILE
# ifneq (,$(shell grep USING_MIDI '$(KEYMAP_FILE)'))
# MIDI_ENABLE=yes
# $(info  * Overriding MIDI_ENABLE setting - $(KEYMAP_FILE) requires it)
# endif
# ifneq (,$(shell grep USING_UNICODE '$(KEYMAP_FILE)'))
# UNICODE_ENABLE=yes
# $(info  * Overriding UNICODE_ENABLE setting - $(KEYMAP_FILE) requires it)
# endif
# ifneq (,$(shell grep USING_BACKLIGHT '$(KEYMAP_FILE)'))
# BACKLIGHT_ENABLE=yes
# $(info  * Overriding BACKLIGHT_ENABLE setting - $(KEYMAP_FILE) requires it)
# endif
# endif

ifndef CUSTOM_MATRIX
	SRC += $(QUANTUM_DIR)/matrix.c
endif

ifeq ($(MIDI_ENABLE), yes)
	SRC += $(QUANTUM_DIR)/keymap_midi.c
endif

ifeq ($(AUDIO_ENABLE), yes)
	SRC += $(QUANTUM_DIR)/audio.c
endif

ifeq ($(UNICODE_ENABLE), yes)
	SRC += $(QUANTUM_DIR)/keymap_unicode.c
endif

ifeq ($(RGBLIGHT_ENABLE), yes)
	SRC += $(QUANTUM_DIR)/light_ws2812.c
	SRC += $(QUANTUM_DIR)/rgblight.c
	OPT_DEFS += -DRGBLIGHT_ENABLE
endif

# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax

# Search Path
VPATH += $(TOP_DIR)/$(QUANTUM_DIR)

include $(TMK_DIR)/protocol/lufa.mk

include $(TMK_DIR)/common.mk
include $(TMK_DIR)/rules.mk