diff options
Diffstat (limited to 'tmk_core/rules.mk')
| -rw-r--r-- | tmk_core/rules.mk | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 2e419dd66..c43f14292 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
| @@ -48,9 +48,6 @@ FORMAT = ihex | |||
| 48 | # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) | 48 | # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) |
| 49 | OPT = s | 49 | OPT = s |
| 50 | 50 | ||
| 51 | AUTOGEN ?= false | ||
| 52 | |||
| 53 | |||
| 54 | # Compiler flag to set the C Standard level. | 51 | # Compiler flag to set the C Standard level. |
| 55 | # c89 = "ANSI" C | 52 | # c89 = "ANSI" C |
| 56 | # gnu89 = c89 plus GCC extensions | 53 | # gnu89 = c89 plus GCC extensions |
| @@ -142,7 +139,7 @@ CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) | |||
| 142 | # files -- see avr-libc docs [FIXME: not yet described there] | 139 | # files -- see avr-libc docs [FIXME: not yet described there] |
| 143 | # -listing-cont-lines: Sets the maximum number of continuation lines of hex | 140 | # -listing-cont-lines: Sets the maximum number of continuation lines of hex |
| 144 | # dump that will be displayed for a given single line of source input. | 141 | # dump that will be displayed for a given single line of source input. |
| 145 | ASFLAGS += $(ADEFS) | 142 | ASFLAGS += $(ADEFS) |
| 146 | ifndef SKIP_DEBUG_INFO | 143 | ifndef SKIP_DEBUG_INFO |
| 147 | ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 | 144 | ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 |
| 148 | else | 145 | else |
| @@ -260,10 +257,6 @@ gccversion : | |||
| 260 | @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD) | 257 | @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD) |
| 261 | $(eval CMD=$(HEX) $< $@) | 258 | $(eval CMD=$(HEX) $< $@) |
| 262 | @$(BUILD_CMD) | 259 | @$(BUILD_CMD) |
| 263 | @if $(AUTOGEN); then \ | ||
| 264 | $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(TARGET).hex\n"; \ | ||
| 265 | $(COPY) $@ $(KEYMAP_PATH)/$(TARGET).hex; \ | ||
| 266 | fi | ||
| 267 | 260 | ||
| 268 | %.eep: %.elf | 261 | %.eep: %.elf |
| 269 | @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD) | 262 | @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD) |
| @@ -297,7 +290,7 @@ BEGIN = gccversion sizebefore | |||
| 297 | @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD) | 290 | @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD) |
| 298 | $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) | 291 | $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) |
| 299 | @$(BUILD_CMD) | 292 | @$(BUILD_CMD) |
| 300 | 293 | ||
| 301 | 294 | ||
| 302 | define GEN_OBJRULE | 295 | define GEN_OBJRULE |
| 303 | $1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC)) | 296 | $1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC)) |
| @@ -371,7 +364,7 @@ DEPS = $(patsubst %.o,%.d,$(patsubst %.a,%.o,$(OBJ))) | |||
| 371 | .PRECIOUS: $(DEPS) | 364 | .PRECIOUS: $(DEPS) |
| 372 | # Empty rule to force recompilation if the .d file is missing | 365 | # Empty rule to force recompilation if the .d file is missing |
| 373 | $(DEPS): | 366 | $(DEPS): |
| 374 | 367 | ||
| 375 | 368 | ||
| 376 | $(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT)))) | 369 | $(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT)))) |
| 377 | 370 | ||
