3 OBJ = main-md5-test.o debug.o uart.o serial-tools.o md5.o
4 # main-cast5-test.o debug.o uart.o serial-tools.o cast5.o
5 # main.o debug.o uart.o serial-tools.o sha256-asm.o xtea-asm.o arcfour-asm.o prng.o cast5.o
12 # You should not have to change anything below here.
16 # Override is only needed by avr-lib build system.
18 override CFLAGS = -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET)
20 override LDFLAGS = -Wl,-Map,$(PRG).map
21 override ASFLAGS = -mmcu=$(MCU_TARGET)
26 all: $(PRG).elf lst text eeprom
29 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
32 rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak
33 rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
38 $(OBJDUMP) -h -S $< > $@
40 # Rules for building the .text rom images
49 $(OBJCOPY) -j .text -j .data -O ihex $< $@
52 $(OBJCOPY) -j .text -j .data -O srec $< $@
55 $(OBJCOPY) -j .text -j .data -O binary $< $@
57 # Rules for building the .eeprom rom images
59 eeprom: ehex ebin esrec
61 ehex: $(PRG)_eeprom.hex
62 ebin: $(PRG)_eeprom.bin
63 esrec: $(PRG)_eeprom.srec
66 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@
69 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@
72 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@
74 # Every thing below here is used by avr-libc's build system and can be ignored
78 EXTRA_CLEAN_FILES = *.hex *.bin *.srec
87 $(FIG2DEV) -L eps $< $@
90 $(FIG2DEV) -L pdf $< $@
93 $(FIG2DEV) -L png $< $@