# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
-AUTOGEN ?= false
-
-
# Compiler flag to set the C Standard level.
# c89 = "ANSI" C
# gnu89 = c89 plus GCC extensions
# files -- see avr-libc docs [FIXME: not yet described there]
# -listing-cont-lines: Sets the maximum number of continuation lines of hex
# dump that will be displayed for a given single line of source input.
-ASFLAGS += $(ADEFS)
+ASFLAGS += $(ADEFS)
ifndef SKIP_DEBUG_INFO
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
else
@$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD)
$(eval CMD=$(HEX) $< $@)
@$(BUILD_CMD)
- @if $(AUTOGEN); then \
- $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(TARGET).hex\n"; \
- $(COPY) $@ $(KEYMAP_PATH)/$(TARGET).hex; \
- fi
%.eep: %.elf
@$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD)
@$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
$(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS))
@$(BUILD_CMD)
-
+
define GEN_OBJRULE
$1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC))
.PRECIOUS: $(DEPS)
# Empty rule to force recompilation if the .d file is missing
$(DEPS):
-
+
$(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT))))