diff -r b2d91fd5d926 -r 313aad7435a8 blackbox/Makefile --- a/blackbox/Makefile Sun Dec 02 13:24:42 2012 +0100 +++ b/blackbox/Makefile Sun Dec 02 18:03:06 2012 +0100 @@ -18,6 +18,11 @@ PORT=/dev/ttyS0 endif +PROGRAMMER=-P $(PORT) -c stk500v2 +ifdef IF +PROGRAMMER=-c $(IF) +endif + #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c #SRC = main.c driver/rs232.c driver/manchester.c SRC = main.c driver/rs232.c driver/adc.c @@ -79,13 +84,13 @@ rm $(PRG).map program: code - $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i + $(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i backup: - $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i + $(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i fuse: - $(AVRDUDE) -P $(PORT) -c stk500v2 -p $(MCU) -V $(FUSES) + $(AVRDUDE) -c $(PROGRAMMER) -p $(MCU) -V $(FUSES) clean: rm -rf *.o *.elf *.elf.src *.s *.i