aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_keyboard.mk1
-rw-r--r--tmk_core/common/command.c4
-rw-r--r--tmk_core/rules.mk19
3 files changed, 17 insertions, 7 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index e87dcb8f2..2b725ea68 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -368,6 +368,7 @@ endif
368 368
369build: elf cpfirmware 369build: elf cpfirmware
370check-size: build 370check-size: build
371check-md5: build
371objs-size: build 372objs-size: build
372 373
373include show_options.mk 374include show_options.mk
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index feeb2202e..59aa4e4d3 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -144,10 +144,8 @@ static void print_version(void) {
144 print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " 144 print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") "
145 "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " 145 "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") "
146 "VER: " STR(DEVICE_VER) "\n"); 146 "VER: " STR(DEVICE_VER) "\n");
147#ifdef SKIP_VERSION
148 print("BUILD: (" __DATE__ ")\n"); 147 print("BUILD: (" __DATE__ ")\n");
149#else 148#ifndef SKIP_VERSION
150 print("BUILD: " STR(QMK_VERSION) " (" __TIME__ " " __DATE__ ")\n");
151# ifdef PROTOCOL_CHIBIOS 149# ifdef PROTOCOL_CHIBIOS
152 print("CHIBIOS: " STR(CHIBIOS_VERSION) ", CONTRIB: " STR(CHIBIOS_CONTRIB_VERSION) "\n"); 150 print("CHIBIOS: " STR(CHIBIOS_VERSION) ", CONTRIB: " STR(CHIBIOS_CONTRIB_VERSION) "\n");
153# endif 151# endif
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index a7053d185..a77e55dd1 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -79,7 +79,12 @@ CSTANDARD = -std=gnu99
79# -Wall...: warning level 79# -Wall...: warning level
80# -Wa,...: tell GCC to pass this to the assembler. 80# -Wa,...: tell GCC to pass this to the assembler.
81# -adhlns...: create assembler listing 81# -adhlns...: create assembler listing
82ifndef SKIP_DEBUG_INFO 82DEBUG_ENABLE ?= yes
83ifeq ($(strip $(SKIP_DEBUG_INFO)),yes)
84 DEBUG_ENABLE=no
85endif
86
87ifeq ($(strip $(DEBUG_ENABLE)),yes)
83 CFLAGS += -g$(DEBUG) 88 CFLAGS += -g$(DEBUG)
84endif 89endif
85CFLAGS += $(CDEFS) 90CFLAGS += $(CDEFS)
@@ -110,7 +115,7 @@ CFLAGS += $(CSTANDARD)
110# -Wall...: warning level 115# -Wall...: warning level
111# -Wa,...: tell GCC to pass this to the assembler. 116# -Wa,...: tell GCC to pass this to the assembler.
112# -adhlns...: create assembler listing 117# -adhlns...: create assembler listing
113ifndef SKIP_DEBUG_INFO 118ifeq ($(strip $(DEBUG_ENABLE)),yes)
114 CXXFLAGS += -g$(DEBUG) 119 CXXFLAGS += -g$(DEBUG)
115endif 120endif
116CXXFLAGS += $(CXXDEFS) 121CXXFLAGS += $(CXXDEFS)
@@ -140,7 +145,7 @@ CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
140# -listing-cont-lines: Sets the maximum number of continuation lines of hex 145# -listing-cont-lines: Sets the maximum number of continuation lines of hex
141# dump that will be displayed for a given single line of source input. 146# dump that will be displayed for a given single line of source input.
142ASFLAGS += $(ADEFS) 147ASFLAGS += $(ADEFS)
143ifndef SKIP_DEBUG_INFO 148ifeq ($(strip $(DEBUG_ENABLE)),yes)
144 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 149 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
145else 150else
146 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 151 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
@@ -202,7 +207,10 @@ REMOVEDIR = rmdir
202COPY = cp 207COPY = cp
203WINSHELL = cmd 208WINSHELL = cmd
204SECHO = $(SILENT) || echo 209SECHO = $(SILENT) || echo
205 210MD5SUM ?= md5sum
211ifneq ($(filter Darwin FreeBSD,$(shell uname -s)),)
212 MD5SUM = md5
213endif
206 214
207# Compiler flags to generate dependency files. 215# Compiler flags to generate dependency files.
208#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d 216#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
@@ -431,6 +439,9 @@ check-size:
431 $(SILENT) || echo "(Firmware size check does not yet support $(MCU) microprocessors; skipping.)" 439 $(SILENT) || echo "(Firmware size check does not yet support $(MCU) microprocessors; skipping.)"
432endif 440endif
433 441
442check-md5:
443 $(MD5SUM) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT)
444
434# Create build directory 445# Create build directory
435$(shell mkdir -p $(BUILD_DIR) 2>/dev/null) 446$(shell mkdir -p $(BUILD_DIR) 2>/dev/null)
436 447