Fix code formatting in build_keyboard.mk

example_keyboards
Fred Sundvik 8 years ago
parent 65b7bf6878
commit 1d5567a3a9

@ -7,11 +7,11 @@ endif
include common.mk include common.mk
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP) TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
else else
TARGET ?= $(KEYBOARD)_$(KEYMAP) TARGET ?= $(KEYBOARD)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
endif endif
# Force expansion # Force expansion
@ -20,15 +20,15 @@ TARGET := $(TARGET)
MASTER ?= left MASTER ?= left
ifdef master 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
endif endif
@ -56,31 +56,31 @@ endif
# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA # We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA
ifdef MCU_FAMILY ifdef MCU_FAMILY
PLATFORM=CHIBIOS PLATFORM=CHIBIOS
else else
PLATFORM=AVR PLATFORM=AVR
endif endif
ifeq ($(PLATFORM),CHIBIOS) ifeq ($(PLATFORM),CHIBIOS)
include $(TMK_PATH)/protocol/chibios.mk include $(TMK_PATH)/protocol/chibios.mk
include $(TMK_PATH)/chibios.mk include $(TMK_PATH)/chibios.mk
OPT_OS = chibios OPT_OS = chibios
ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","") ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","")
OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h
else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","") else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h
else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","") else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","")
OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","") else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
endif endif
endif endif
CONFIG_H = $(KEYBOARD_PATH)/config.h CONFIG_H = $(KEYBOARD_PATH)/config.h
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
ifneq ("$(wildcard $(SUBPROJECT_C))","") ifneq ("$(wildcard $(SUBPROJECT_C))","")
CONFIG_H = $(SUBPROJECT_PATH)/config.h CONFIG_H = $(SUBPROJECT_PATH)/config.h
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
@ -112,30 +112,30 @@ KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H = $(KEYMAP_PATH)/config.h CONFIG_H = $(KEYMAP_PATH)/config.h
endif endif
# # project specific files # # project specific files
SRC += $(KEYBOARD_C) \ SRC += $(KEYBOARD_C) \
$(KEYMAP_C) \ $(KEYMAP_C) \
$(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c \ $(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/process_keycode/process_leader.c $(QUANTUM_DIR)/process_keycode/process_leader.c
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
SRC += $(SUBPROJECT_C) SRC += $(SUBPROJECT_C)
endif endif
ifndef CUSTOM_MATRIX ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c SRC += $(QUANTUM_DIR)/matrix.c
endif endif
ifeq ($(strip $(API_SYSEX_ENABLE)), yes) ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
OPT_DEFS += -DAPI_SYSEX_ENABLE OPT_DEFS += -DAPI_SYSEX_ENABLE
SRC += $(QUANTUM_DIR)/api/api_sysex.c SRC += $(QUANTUM_DIR)/api/api_sysex.c
OPT_DEFS += -DAPI_ENABLE OPT_DEFS += -DAPI_ENABLE
SRC += $(QUANTUM_DIR)/api.c SRC += $(QUANTUM_DIR)/api.c
MIDI_ENABLE=yes MIDI_ENABLE=yes
endif endif
@ -144,25 +144,25 @@ MUSIC_ENABLE := 0
ifeq ($(strip $(AUDIO_ENABLE)), yes) ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE OPT_DEFS += -DAUDIO_ENABLE
MUSIC_ENABLE := 1 MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/audio/audio.c SRC += $(QUANTUM_DIR)/audio/audio.c
SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c SRC += $(QUANTUM_DIR)/audio/luts.c
endif endif
ifeq ($(strip $(MIDI_ENABLE)), yes) ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE OPT_DEFS += -DMIDI_ENABLE
MUSIC_ENABLE := 1 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) ifeq ($(MUSIC_ENABLE), 1)
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
endif 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
endif endif
ifeq ($(strip $(VIRTSER_ENABLE)), yes) ifeq ($(strip $(VIRTSER_ENABLE)), yes)
@ -171,79 +171,80 @@ 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
endif endif
ifeq ($(strip $(UCIS_ENABLE)), yes) ifeq ($(strip $(UCIS_ENABLE)), yes)
OPT_DEFS += -DUCIS_ENABLE OPT_DEFS += -DUCIS_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
endif endif
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
OPT_DEFS += -DUNICODEMAP_ENABLE OPT_DEFS += -DUNICODEMAP_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
endif endif
ifeq ($(strip $(UNICODE_ENABLE)), yes) ifeq ($(strip $(UNICODE_ENABLE)), yes)
OPT_DEFS += -DUNICODE_ENABLE OPT_DEFS += -DUNICODE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
endif endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_ENABLE OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/light_ws2812.c SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += $(QUANTUM_DIR)/rgblight.c SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes CIE1931_CURVE = yes
LED_BREATHING_TABLE = yes LED_BREATHING_TABLE = yes
endif endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
endif endif
ifeq ($(strip $(PRINTING_ENABLE)), yes) ifeq ($(strip $(PRINTING_ENABLE)), yes)
OPT_DEFS += -DPRINTING_ENABLE OPT_DEFS += -DPRINTING_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
SRC += $(TMK_DIR)/protocol/serial_uart.c SRC += $(TMK_DIR)/protocol/serial_uart.c
endif endif
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC)) SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
OPT_DEFS += $(SERIAL_DEFS) OPT_DEFS += $(SERIAL_DEFS)
VAPTH += $(SERIAL_PATH) VAPTH += $(SERIAL_PATH)
endif endif
ifneq ($(strip $(VARIABLE_TRACE)),) ifneq ($(strip $(VARIABLE_TRACE)),)
SRC += $(QUANTUM_DIR)/variable_trace.c SRC += $(QUANTUM_DIR)/variable_trace.c
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE)) OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
endif endif
endif endif
ifeq ($(strip $(LCD_ENABLE)), yes) ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE = yes CIE1931_CURVE = yes
endif endif
ifeq ($(strip $(LED_ENABLE)), yes) ifeq ($(strip $(LED_ENABLE)), yes)
CIE1931_CURVE = yes CIE1931_CURVE = yes
endif endif
ifeq ($(strip $(CIE1931_CURVE)), yes) ifeq ($(strip $(CIE1931_CURVE)), yes)
OPT_DEFS += -DUSE_CIE1931_CURVE OPT_DEFS += -DUSE_CIE1931_CURVE
LED_TABLES = yes LED_TABLES = yes
endif endif
ifeq ($(strip $(LED_BREATHING_TABLE)), yes) ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
OPT_DEFS += -DUSE_LED_BREATHING_TABLE OPT_DEFS += -DUSE_LED_BREATHING_TABLE
LED_TABLES = yes LED_TABLES = yes
endif endif
ifeq ($(strip $(LED_TABLES)), yes) ifeq ($(strip $(LED_TABLES)), yes)
SRC += $(QUANTUM_DIR)/led_tables.c SRC += $(QUANTUM_DIR)/led_tables.c
endif endif
# Optimize size but this may cause error "relocation truncated to fit" # Optimize size but this may cause error "relocation truncated to fit"
@ -252,7 +253,7 @@ endif
# Search Path # Search Path
VPATH += $(KEYMAP_PATH) VPATH += $(KEYMAP_PATH)
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
VPATH += $(SUBPROJECT_PATH) VPATH += $(SUBPROJECT_PATH)
endif endif
VPATH += $(KEYBOARD_PATH) VPATH += $(KEYBOARD_PATH)
VPATH += $(COMMON_VPATH) VPATH += $(COMMON_VPATH)
@ -266,17 +267,17 @@ EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
ifeq ($(PLATFORM),AVR) ifeq ($(PLATFORM),AVR)
ifeq ($(strip $(PROTOCOL)), VUSB) ifeq ($(strip $(PROTOCOL)), VUSB)
include $(TMK_PATH)/protocol/vusb.mk include $(TMK_PATH)/protocol/vusb.mk
else else
include $(TMK_PATH)/protocol/lufa.mk include $(TMK_PATH)/protocol/lufa.mk
endif endif
include $(TMK_PATH)/avr.mk include $(TMK_PATH)/avr.mk
endif endif
ifeq ($(strip $(VISUALIZER_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
include $(VISUALIZER_PATH)/visualizer.mk include $(VISUALIZER_PATH)/visualizer.mk
endif endif
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)

Loading…
Cancel
Save