CC = avr-gcc CFLAGS = -Wall -mmcu=attiny24 -O2 LDFLAGS = -Wl,-Map,main.map OBJCOPY = avr-objcopy OBJDUMP = avr-objdump .PHONY: all all: main.elf main.lst main.hex .PHONY: clean clean: rm -f *.{o,elf,lst,hex,s,map,i} %.elf: %.o $(LINK.c) -o $@ $^ %.lst: %.elf $(OBJDUMP) -h -S $< > $@ || rm -f $@ %.hex: %.elf $(OBJCOPY) -j .text -j .data -O ihex $< $@