Restore tabs in Makefile (#16944)
This commit is contained in:
parent
c5f1ff9ee1
commit
130d0395d0
|
@ -789,11 +789,11 @@ sym: $(BUILD_DIR)/$(TARGET).sym
|
||||||
# Do not try to reset an Arduino if it's not one
|
# Do not try to reset an Arduino if it's not one
|
||||||
upload: $(BUILD_DIR)/$(TARGET).hex
|
upload: $(BUILD_DIR)/$(TARGET).hex
|
||||||
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
||||||
stty hup < $(UPLOAD_PORT); true
|
stty hup < $(UPLOAD_PORT); true
|
||||||
endif
|
endif
|
||||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
|
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
|
||||||
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
ifeq (${AVRDUDE_PROGRAMMER}, arduino)
|
||||||
stty -hup < $(UPLOAD_PORT); true
|
stty -hup < $(UPLOAD_PORT); true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Display size of file.
|
# Display size of file.
|
||||||
|
@ -801,10 +801,10 @@ HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
|
||||||
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
|
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
|
||||||
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
||||||
sizebefore:
|
sizebefore:
|
||||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
||||||
|
|
||||||
sizeafter: build
|
sizeafter: build
|
||||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
||||||
|
|
||||||
|
|
||||||
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
||||||
|
@ -816,71 +816,71 @@ COFFCONVERT=$(OBJCOPY) --debugging \
|
||||||
|
|
||||||
|
|
||||||
coff: $(BUILD_DIR)/$(TARGET).elf
|
coff: $(BUILD_DIR)/$(TARGET).elf
|
||||||
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
$(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||||
|
|
||||||
|
|
||||||
extcoff: $(TARGET).elf
|
extcoff: $(TARGET).elf
|
||||||
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .elf .hex .eep .lss .sym .bin
|
.SUFFIXES: .elf .hex .eep .lss .sym .bin
|
||||||
.PRECIOUS: .o
|
.PRECIOUS: .o
|
||||||
|
|
||||||
.elf.hex:
|
.elf.hex:
|
||||||
$(Pecho) " COPY $@"
|
$(Pecho) " COPY $@"
|
||||||
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||||
|
|
||||||
.elf.bin:
|
.elf.bin:
|
||||||
$(Pecho) " COPY $@"
|
$(Pecho) " COPY $@"
|
||||||
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
||||||
|
|
||||||
.elf.eep:
|
.elf.eep:
|
||||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||||
|
|
||||||
# Create extended listing file from ELF output file.
|
# Create extended listing file from ELF output file.
|
||||||
.elf.lss:
|
.elf.lss:
|
||||||
$(OBJDUMP) -h -S $< > $@
|
$(OBJDUMP) -h -S $< > $@
|
||||||
|
|
||||||
# Create a symbol table from ELF output file.
|
# Create a symbol table from ELF output file.
|
||||||
.elf.sym:
|
.elf.sym:
|
||||||
$(NM) -n $< > $@
|
$(NM) -n $< > $@
|
||||||
|
|
||||||
# Link: create ELF output file from library.
|
# Link: create ELF output file from library.
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
||||||
$(Pecho) " CXX $@"
|
$(Pecho) " CXX $@"
|
||||||
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||||
|
|
||||||
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
||||||
# in directories that mirror the structure of "src"
|
# in directories that mirror the structure of "src"
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CC $<"
|
$(Pecho) " CC $<"
|
||||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CXX $<"
|
$(Pecho) " CXX $<"
|
||||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
||||||
|
|
||||||
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CC $<"
|
$(Pecho) " CC $<"
|
||||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CXX $<"
|
$(Pecho) " CXX $<"
|
||||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
|
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
|
||||||
$(Pecho) " CXX $<"
|
$(Pecho) " CXX $<"
|
||||||
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
||||||
|
|
||||||
# Target: clean project.
|
# Target: clean project.
|
||||||
clean:
|
clean:
|
||||||
$(Pecho) " RMDIR $(BUILD_DIR)/"
|
$(Pecho) " RMDIR $(BUILD_DIR)/"
|
||||||
$P rm -rf $(BUILD_DIR)
|
$P rm -rf $(BUILD_DIR)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter
|
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter
|
||||||
|
|
Loading…
Reference in a new issue