4 CAMELLIA_OBJ = main-camellia-test.o debug.o uart.o serial-tools.o camellia.o camellia-asm.o
5 SKIPJACK_OBJ = main-skipjack-test.o debug.o uart.o serial-tools.o skipjack.o
6 SHA1_OBJ = main-sha1-test.o debug.o uart.o serial-tools.o sha1-asm.o
7 MD5_OBJ = main-md5-test.o debug.o uart.o serial-tools.o md5.o
8 CAST5_OBJ = main-cast5-test.o debug.o uart.o serial-tools.o cast5.o
9 RC6_OBJ = main-rc6-test.o debug.o uart.o serial-tools.o rc6.o
10 Multi_OBJ = main.o debug.o uart.o serial-tools.o sha256-asm.o xtea-asm.o arcfour-asm.o prng.o cast5.o
11 DES_OBJ = main-des-test.o debug.o uart.o serial-tools.o des.o
12 TDES_OBJ = main-tdes-test.o debug.o uart.o serial-tools.o des.o
13 SEED_OBJ = main-seed-test.o debug.o uart.o serial-tools.o seed.o seed-asm.o
14 SHABEA_OBJ = main-shabea-test.o debug.o uart.o serial-tools.o shabea.o sha256-asm.o
20 FLASHCMD = avrdude -p $(MCU_TARGET) -P /dev/ttyUSB0 -c avr911 -U flash:w:$(PRG).hex
21 # -U eeprom:w:$(PRG)_eeprom.hex
22 #uisp -dprog=bsd -dlpt=/dev/parport1 --upload if=$(PRG).hex
28 # You should not have to change anything below here.
32 # Override is only needed by avr-lib build system.
34 override CFLAGS = -pedantic -std=c99 -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET)
36 override LDFLAGS = -Wl,-Map,$(PRG).map
37 override ASFLAGS = -mmcu=$(MCU_TARGET)
42 all: $(PRG).elf lst text eeprom
45 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
50 rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak
51 rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
60 $(OBJDUMP) -h -S $< > $@
62 # Rules for building the .text rom images
71 $(OBJCOPY) -j .text -j .data -O ihex $< $@
74 $(OBJCOPY) -j .text -j .data -O srec $< $@
77 $(OBJCOPY) -j .text -j .data -O binary $< $@
79 # Rules for building the .eeprom rom images
81 eeprom: ehex ebin esrec
83 ehex: $(PRG)_eeprom.hex
84 ebin: $(PRG)_eeprom.bin
85 esrec: $(PRG)_eeprom.srec
88 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@
91 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@
94 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@
96 # Every thing below here is used by avr-libc's build system and can be ignored
100 EXTRA_CLEAN_FILES = *.hex *.bin *.srec
109 $(FIG2DEV) -L eps $< $@
112 $(FIG2DEV) -L pdf $< $@
115 $(FIG2DEV) -L png $< $@