3 OBJ = main-rc6-test.o debug.o uart.o serial-tools.o rc6.o
4 # main-md5-test.o debug.o uart.o serial-tools.o md5.o
5 # main-cast5-test.o debug.o uart.o serial-tools.o cast5.o
6 # main.o debug.o uart.o serial-tools.o sha256-asm.o xtea-asm.o arcfour-asm.o prng.o cast5.o
13 # You should not have to change anything below here.
17 # Override is only needed by avr-lib build system.
19 override CFLAGS = -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET)
21 override LDFLAGS = -Wl,-Map,$(PRG).map
22 override ASFLAGS = -mmcu=$(MCU_TARGET)
27 all: $(PRG).elf lst text eeprom
30 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
33 rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak
34 rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
39 $(OBJDUMP) -h -S $< > $@
41 # Rules for building the .text rom images
50 $(OBJCOPY) -j .text -j .data -O ihex $< $@
53 $(OBJCOPY) -j .text -j .data -O srec $< $@
56 $(OBJCOPY) -j .text -j .data -O binary $< $@
58 # Rules for building the .eeprom rom images
60 eeprom: ehex ebin esrec
62 ehex: $(PRG)_eeprom.hex
63 ebin: $(PRG)_eeprom.bin
64 esrec: $(PRG)_eeprom.srec
67 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@
70 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@
73 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@
75 # Every thing below here is used by avr-libc's build system and can be ignored
79 EXTRA_CLEAN_FILES = *.hex *.bin *.srec
88 $(FIG2DEV) -L eps $< $@
91 $(FIG2DEV) -L pdf $< $@
94 $(FIG2DEV) -L png $< $@