summaryrefslogtreecommitdiff
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r--tmk_core/rules.mk18
1 files changed, 2 insertions, 16 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 07700283e7..aaaba1c2c9 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -40,7 +40,7 @@ OPT = s
# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
DEBUG = dwarf-2
-COLOR?=true
+COLOR ?= true
ifeq ($(COLOR),true)
NO_COLOR=\033[0m
@@ -129,10 +129,8 @@ CFLAGS += -fshort-enums
CFLAGS += -fno-strict-aliasing
# add color
ifeq ($(COLOR),true)
-ifeq ("$(echo "int main(){}" | $(CC) -fdiagnostics-color -x c - -o /dev/null 2>&1)", "")
+ifeq ("$(shell echo "int main(){}" | $(CC) -fdiagnostics-color -x c - -o /dev/null 2>&1)", "")
CFLAGS+= -fdiagnostics-color
-else ifeq ("$(echo "int main(){}" | $(CC) -fcolor-diagnostics -x c - -o /dev/null 2>&1)", "")
- CFLAGS+= -fcolor-diagnostics
endif
endif
CFLAGS += -Wall
@@ -450,15 +448,6 @@ endif
dfu-programmer $(MCU) flash $(BUILD_DIR)/$(TARGET).hex
dfu-programmer $(MCU) reset
-dfu-no-build:
-ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
- dfu-programmer $(MCU) erase --force
-else
- dfu-programmer $(MCU) erase
-endif
- dfu-programmer $(MCU) flash $(KEYMAP_PATH)/compiled.hex
- dfu-programmer $(MCU) reset
-
dfu-start:
dfu-programmer $(MCU) reset
dfu-programmer $(MCU) start
@@ -536,9 +525,6 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf
$(eval CMD=$(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@)
@$(BUILD_CMD)
@$(COPY) $@ $(TARGET).hex
- $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/compiled.hex" | $(AWK_CMD)
- $(eval CMD=$(COPY) $@ $(KEYMAP_PATH)/compiled.hex)
- @$(BUILD_CMD)
%.eep: %.elf
@$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD)