3 OBJ = main-skipjack-test.o debug.o uart.o serial-tools.o skipjack.o
4 # main-sha1-test.o debug.o uart.o serial-tools.o sha1-asm.o
5 # main-md5-test.o debug.o uart.o serial-tools.o md5.o
6 # main-cast5-test.o debug.o uart.o serial-tools.o cast5.o
7 # main.o debug.o uart.o serial-tools.o sha256-asm.o xtea-asm.o arcfour-asm.o prng.o cast5.o
14 # You should not have to change anything below here.
18 # Override is only needed by avr-lib build system.
20 override CFLAGS = -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET)
22 override LDFLAGS = -Wl,-Map,$(PRG).map
23 override ASFLAGS = -mmcu=$(MCU_TARGET)
28 all: $(PRG).elf lst text eeprom
31 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
36 rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak
37 rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
42 $(OBJDUMP) -h -S $< > $@
44 # Rules for building the .text rom images
53 $(OBJCOPY) -j .text -j .data -O ihex $< $@
56 $(OBJCOPY) -j .text -j .data -O srec $< $@
59 $(OBJCOPY) -j .text -j .data -O binary $< $@
61 # Rules for building the .eeprom rom images
63 eeprom: ehex ebin esrec
65 ehex: $(PRG)_eeprom.hex
66 ebin: $(PRG)_eeprom.bin
67 esrec: $(PRG)_eeprom.srec
70 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@
73 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@
76 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@
78 # Every thing below here is used by avr-libc's build system and can be ignored
82 EXTRA_CLEAN_FILES = *.hex *.bin *.srec
91 $(FIG2DEV) -L eps $< $@
94 $(FIG2DEV) -L pdf $< $@
97 $(FIG2DEV) -L png $< $@