3 OBJ = main-cast5-test.o debug.o uart.o serial-tools.o cast5.o
4 # main.o debug.o uart.o serial-tools.o sha256-asm.o xtea-asm.o arcfour-asm.o prng.o cast5.o
11 # You should not have to change anything below here.
15 # Override is only needed by avr-lib build system.
17 override CFLAGS = -Wall -Wstrict-prototypes $(OPTIMIZE) -mmcu=$(MCU_TARGET)
19 override LDFLAGS = -Wl,-Map,$(PRG).map
20 override ASFLAGS = -mmcu=$(MCU_TARGET)
25 all: $(PRG).elf lst text eeprom
28 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
31 rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak
32 rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
37 $(OBJDUMP) -h -S $< > $@
39 # Rules for building the .text rom images
48 $(OBJCOPY) -j .text -j .data -O ihex $< $@
51 $(OBJCOPY) -j .text -j .data -O srec $< $@
54 $(OBJCOPY) -j .text -j .data -O binary $< $@
56 # Rules for building the .eeprom rom images
58 eeprom: ehex ebin esrec
60 ehex: $(PRG)_eeprom.hex
61 ebin: $(PRG)_eeprom.bin
62 esrec: $(PRG)_eeprom.srec
65 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@
68 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@
71 $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@
73 # Every thing below here is used by avr-libc's build system and can be ignored
77 EXTRA_CLEAN_FILES = *.hex *.bin *.srec
86 $(FIG2DEV) -L eps $< $@
89 $(FIG2DEV) -L pdf $< $@
92 $(FIG2DEV) -L png $< $@