forked from mfulz_github/qmk_firmware
Add $(MAKEFILE_LIST) as a dependency on build rules that could be altered by changes to the makefiles - if the user alters the project makefile, require that all modules are rebuilt.
This commit is contained in:
parent
fc0ff2f976
commit
9f7f595382
|
@ -53,10 +53,10 @@ MSG_AVRDUDE_CMD := ' [AVRDUDE] :'
|
|||
AVRDUDE_FLASH_FLAGS = -U flash:w:$< $(AVRDUDE_FLAGS)
|
||||
AVRDUDE_EEP_FLAGS = -U eeprom:w:$< $(AVRDUDE_FLAGS)
|
||||
|
||||
program: $(TARGET).hex
|
||||
program: $(TARGET).hex $(MAKEFILE_LIST)
|
||||
@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
|
||||
avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) $(AVRDUDE_FLASH_FLAGS)
|
||||
|
||||
program-ee: $(TARGET).eep
|
||||
program-ee: $(TARGET).eep $(MAKEFILE_LIST)
|
||||
@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
|
||||
avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) $(AVRDUDE_EEP_FLAGS)
|
||||
|
|
|
@ -177,15 +177,15 @@ elf: $(TARGET).elf
|
|||
hex: $(TARGET).hex $(TARGET).eep
|
||||
lss: $(TARGET).lss
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c $(MAKEFILE_LIST)
|
||||
@echo $(MSG_COMPILE_CMD) Compiling C file \"$<\"
|
||||
$(CROSS)gcc -c $(CC_FLAGS) $(C_FLAGS) $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp $(MAKEFILE_LIST)
|
||||
@echo $(MSG_COMPILE_CMD) Compiling C++ file \"$<\"
|
||||
$(CROSS)gcc -c $(CC_FLAGS) $(CPP_FLAGS) -x c++ $< -o $@
|
||||
|
||||
%.o: %.S
|
||||
%.o: %.S $(MAKEFILE_LIST)
|
||||
@echo $(MSG_COMPILE_CMD) Assembling \"$<\"
|
||||
$(CROSS)gcc -c $(CC_FLAGS) $(ASM_FLAGS) -x assembler-with-cpp $< -o $@
|
||||
|
||||
|
|
|
@ -45,13 +45,13 @@ MSG_COPY_CMD := ' [CP] :'
|
|||
MSG_REMOVE_CMD := ' [RM] :'
|
||||
MSG_DFU_CMD := ' [DFU] :'
|
||||
|
||||
flip: $(TARGET).hex
|
||||
flip: $(TARGET).hex $(MAKEFILE_LIST)
|
||||
@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\"
|
||||
batchisp -hardware usb -device $(MCU) -operation erase f
|
||||
batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
|
||||
batchisp -hardware usb -device $(MCU) -operation start reset 0
|
||||
|
||||
flip-ee: $(TARGET).eep
|
||||
flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
|
||||
@echo $(MSG_DFU_CMD) Copying EEP file to temporary file \"$(TARGET)eep.hex\"
|
||||
cp $(TARGET).eep $(TARGET)eep.hex
|
||||
@echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$(TARGET).eep\"
|
||||
|
@ -61,13 +61,13 @@ flip-ee: $(TARGET).eep
|
|||
@echo $(MSG_DFU_CMD) Removing temporary file \"$(TARGET)eep.hex\"
|
||||
rm $(TARGET)eep.hex
|
||||
|
||||
dfu: $(TARGET).hex
|
||||
dfu: $(TARGET).hex $(MAKEFILE_LIST)
|
||||
@echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$(TARGET).hex\"
|
||||
dfu-programmer $(MCU) erase
|
||||
dfu-programmer $(MCU) flash $(TARGET).hex
|
||||
dfu-programmer $(MCU) reset
|
||||
|
||||
dfu-ee: $(TARGET).hex $(TARGET).eep
|
||||
dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
|
||||
@echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$(TARGET).eep\"
|
||||
dfu-programmer $(MCU) eeprom-flash $(TARGET).eep
|
||||
dfu-programmer $(MCU) reset
|
Loading…
Reference in New Issue