diff options
-rw-r--r-- | build_keyboard.mk | 1 | ||||
-rw-r--r-- | tmk_core/common/command.c | 4 | ||||
-rw-r--r-- | tmk_core/rules.mk | 19 |
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 | ||
369 | build: elf cpfirmware | 369 | build: elf cpfirmware |
370 | check-size: build | 370 | check-size: build |
371 | check-md5: build | ||
371 | objs-size: build | 372 | objs-size: build |
372 | 373 | ||
373 | include show_options.mk | 374 | include 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 |
82 | ifndef SKIP_DEBUG_INFO | 82 | DEBUG_ENABLE ?= yes |
83 | ifeq ($(strip $(SKIP_DEBUG_INFO)),yes) | ||
84 | DEBUG_ENABLE=no | ||
85 | endif | ||
86 | |||
87 | ifeq ($(strip $(DEBUG_ENABLE)),yes) | ||
83 | CFLAGS += -g$(DEBUG) | 88 | CFLAGS += -g$(DEBUG) |
84 | endif | 89 | endif |
85 | CFLAGS += $(CDEFS) | 90 | CFLAGS += $(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 |
113 | ifndef SKIP_DEBUG_INFO | 118 | ifeq ($(strip $(DEBUG_ENABLE)),yes) |
114 | CXXFLAGS += -g$(DEBUG) | 119 | CXXFLAGS += -g$(DEBUG) |
115 | endif | 120 | endif |
116 | CXXFLAGS += $(CXXDEFS) | 121 | CXXFLAGS += $(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. |
142 | ASFLAGS += $(ADEFS) | 147 | ASFLAGS += $(ADEFS) |
143 | ifndef SKIP_DEBUG_INFO | 148 | ifeq ($(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 |
145 | else | 150 | else |
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 | |||
202 | COPY = cp | 207 | COPY = cp |
203 | WINSHELL = cmd | 208 | WINSHELL = cmd |
204 | SECHO = $(SILENT) || echo | 209 | SECHO = $(SILENT) || echo |
205 | 210 | MD5SUM ?= md5sum | |
211 | ifneq ($(filter Darwin FreeBSD,$(shell uname -s)),) | ||
212 | MD5SUM = md5 | ||
213 | endif | ||
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.)" |
432 | endif | 440 | endif |
433 | 441 | ||
442 | check-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 | ||