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

gcc_sample.out: startup.o gcc_sample.o
	$(LD) startup.o gcc_sample.o -T memory.def -o gcc_sample -Map gcc_sample.map
	$(OBJCPY) -O ihex gcc_sample gcc_sample.hex
	$(OBJCPY) -O srec gcc_sample gcc_sample.srec
startup.o : startup.s
	$(AS) startup.s -mv850any -o startup.o
gcc_sample.o : gcc_sample.c
	$(CC) -mv850e1 -mdisable-callt -c -g $< -o gcc_sample.o
clean:
	rm *.o gcc_sample *.map *.srec *.hex
