# Processortyp fuer avrdude: m8 fuer ATmega8, m32 fuer ATmega32, ...
N=t10
#N=t85

# Assembler Auswahl: nur eine der folgenden 3 Zeilen nicht auskommentiert:
#A=avr-as
#A=avra2
A=avra

# fuer avrdude-Aufruf unter Linux:
#TTY=/dev/ttyUSB0  #geht nicht fuer Tiny10
TTY=usb #fuer ALL-AVR und STK600 und USBasp
# fuer avrdude-Aufruf unter MacOSX:
#TTY=/dev/tty.serial-0001

# verwendeter Programmer:
#P=avr910  #fuer mySmartUSB MK2
#P=stk500v2 #fuer mySmartUSB light
#P=stk600
P=avrispmkII #fuer ALL-AVR
#P=usbasp  #fuer USBasp

all: start.hex test2.hex

start.hex: start.asm
	$A start.asm

test2.hex: test2.asm
	$A test2.asm

check:
	avrdude -p $N -c $P -P $(TTY) -v
check2:
	avrdude -p $N -F -c $P -P $(TTY) -v

install: start.hex
	avrdude -p $N -c $P -P $(TTY) -U flash:w:start.hex:i

install2: test2.hex
	avrdude -p $N -c $P -P $(TTY) -U flash:w:test2.hex:i

clean:
	rm -f *~ *.obj *.cof *.eep.hex
clean_all:
	rm -f *~ *.obj *.cof *.hex
