PROG  = movado-1.3

LANG  = C

all:	clean  boot.o  $(PROG).o
	sh-elf-gcc -m2 -nostartfiles -Wl,-t \
            -o $(PROG).out  boot.o $(PROG).o  -Tldscript.x \
            -Xlinker -Map $(PROG).map
	sh-elf-objcopy -O srec $(PROG).out $(PROG).sr

boot.o: boot.c
	sh-elf-gcc -c -g -m2 boot.c -o boot.o

$(PROG).o: $(PROG).c bios.c
	sh-elf-gcc -c -g -m2 $(PROG).c -o $(PROG).o

clean:
	rm -f boot.o $(PROG).o  \
              $(PROG).out $(PROG).sr $(PROG).map
	touch $(PROG).map
