diff options
Diffstat (limited to 'tmk_core/rules.mk')
| -rw-r--r-- | tmk_core/rules.mk | 19 |
1 files changed, 15 insertions, 4 deletions
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 | ||
