# $Id: makefile,v 1.1.1.1 2004/11/21 13:06:20 ysato Exp $

CC = h8300-elf-gcc
LIBGCC = $(shell $(CC) --print-libgcc-file-name -mh -mint32|sed s/libgcc.a//)
OBJCOPY = h8300-elf-objcopy

INCLUDE=$(TARGET)/install/include/
CFLAGS = -I$(INCLUDE) -nostdlib -fno-builtin -mh -mint32 -O2 -Os -g
LIBECOS = $(TARGET)/install/lib

ifdef VERBOSE
CFLAGS += -DVERBOSE
endif

inflate_boot.bin : inflate_boot
	$(OBJCOPY) -Obinary $< $@

inflate_boot.mot : inflate_boot
	$(OBJCOPY) -Osrec $< $@

inflate_boot : crt0.o  main.o
	$(CC) $(CFLAGS) -Tinflate_boot.ld -o$@ $^

clean:
	rm inflate_boot *.o *.bin

.PHONY: clean
