CC = /usr/local/arm-tools/bin/arm-elf-gcc
AS = /usr/local/arm-tools/bin/arm-elf-as
LD = /usr/local/arm-tools/bin/arm-elf-ld
OBJCPY = /usr/local/arm-tools/bin/arm-elf-objcopy

all: memory.def startup.o uarttest.o
	$(LD) startup.o uarttest.o -T memory.def -o uarttest -Map uarttest.map
	$(OBJCPY) -O ihex uarttest uarttest.hex

startup.o : startup.s
	$(AS) startup.s -o startup.o
uarttest.o: uarttest.c
	$(CC) -c $< -o uarttest.o
clean:
	rm -f *.o uarttest *.map *.hex
