Fix redundant process_music.c in sources

example_keyboards
Gabriel Young 8 years ago
parent a64ae10662
commit b911e1966f

@ -23,9 +23,9 @@ ifdef master
MASTER = $(master) MASTER = $(master)
endif endif
ifeq ($(MASTER),right) ifeq ($(MASTER),right)
OPT_DEFS += -DMASTER_IS_ON_RIGHT OPT_DEFS += -DMASTER_IS_ON_RIGHT
else else
ifneq ($(MASTER),left) ifneq ($(MASTER),left)
$(error MASTER does not have a valid value(left/right)) $(error MASTER does not have a valid value(left/right))
endif endif
@ -38,7 +38,7 @@ KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
ifneq ("$(wildcard $(KEYBOARD_C))","") ifneq ("$(wildcard $(KEYBOARD_C))","")
include $(KEYBOARD_PATH)/rules.mk include $(KEYBOARD_PATH)/rules.mk
else else
$(error "$(KEYBOARD_C)" does not exist) $(error "$(KEYBOARD_C)" does not exist)
endif endif
@ -49,7 +49,7 @@ ifneq ($(SUBPROJECT),)
ifneq ("$(wildcard $(SUBPROJECT_C))","") ifneq ("$(wildcard $(SUBPROJECT_C))","")
OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT) OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
include $(SUBPROJECT_PATH)/rules.mk include $(SUBPROJECT_PATH)/rules.mk
else else
$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist) $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
endif endif
endif endif
@ -83,7 +83,7 @@ ifneq ($(SUBPROJECT),)
endif endif
endif endif
# Save the defines and includes here, so we don't include any keymap specific ones # Save the defines and includes here, so we don't include any keymap specific ones
PROJECT_DEFS := $(OPT_DEFS) PROJECT_DEFS := $(OPT_DEFS)
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
PROJECT_CONFIG := $(CONFIG_H) PROJECT_CONFIG := $(CONFIG_H)
@ -139,12 +139,27 @@ ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
MIDI_ENABLE=yes MIDI_ENABLE=yes
endif endif
MUSIC_ENABLE := 0
ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE
MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/audio/audio.c
SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c
endif
ifeq ($(strip $(MIDI_ENABLE)), yes) ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE OPT_DEFS += -DMIDI_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
endif endif
ifeq ($(MUSIC_ENABLE), 1)
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
endif
ifeq ($(strip $(COMBO_ENABLE)), yes) ifeq ($(strip $(COMBO_ENABLE)), yes)
OPT_DEFS += -DCOMBO_ENABLE OPT_DEFS += -DCOMBO_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
@ -154,15 +169,6 @@ ifeq ($(strip $(VIRTSER_ENABLE)), yes)
OPT_DEFS += -DVIRTSER_ENABLE OPT_DEFS += -DVIRTSER_ENABLE
endif endif
ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/audio/audio.c
SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c
endif
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
OPT_DEFS += -DFAUXCLICKY_ENABLE OPT_DEFS += -DFAUXCLICKY_ENABLE
SRC += $(QUANTUM_DIR)/fauxclicky.c SRC += $(QUANTUM_DIR)/fauxclicky.c
@ -252,7 +258,7 @@ endif
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
$(KEYMAP_OUTPUT)_SRC := $(SRC) $(KEYMAP_OUTPUT)_SRC := $(SRC)
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC)

Loading…
Cancel
Save