diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-06-03 11:00:38 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-06-03 11:00:38 +0000 |
commit | 9f7f595382aa482990487f431b4889430747f617 (patch) | |
tree | 92732a532b5f0eb98bcb9c1478af53281cdbc9a0 /LUFA/Build | |
parent | fc0ff2f97657a893db336dded648c8bd60582bc1 (diff) | |
download | lufa-9f7f595382aa482990487f431b4889430747f617.tar.gz lufa-9f7f595382aa482990487f431b4889430747f617.tar.bz2 lufa-9f7f595382aa482990487f431b4889430747f617.zip |
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.
Diffstat (limited to 'LUFA/Build')
-rw-r--r-- | LUFA/Build/lufa.avrdude.in | 4 | ||||
-rw-r--r-- | LUFA/Build/lufa.build.in | 6 | ||||
-rw-r--r-- | LUFA/Build/lufa.dfu.in | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in index b44c9f6d7..4c43d183d 100644 --- a/LUFA/Build/lufa.avrdude.in +++ b/LUFA/Build/lufa.avrdude.in @@ -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)
diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in index f77757819..bcf539d73 100644 --- a/LUFA/Build/lufa.build.in +++ b/LUFA/Build/lufa.build.in @@ -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 $@
diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in index f855bf7b0..565e848aa 100644 --- a/LUFA/Build/lufa.dfu.in +++ b/LUFA/Build/lufa.dfu.in @@ -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
\ No newline at end of file |