home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / emulators / v9t9 / linux / sources / V9t9 / tools / Forth / Makefile < prev    next >
Encoding:
Makefile  |  2006-10-19  |  1.2 KB  |  36 lines

  1. # be able to access local files...
  2. GFORTHPATH:=$(shell pwd)/site-forth:$(GFORTHPATH):$(shell pwd)
  3.  
  4. all:    nforth.rom nforthc.bin nforthg.bin
  5.  
  6. clean:
  7.     rm -f nforth.rom nforthc.bin nforthg.bin
  8.  
  9. force:
  10.  
  11. FORTHCOMMON=kernel.fs dict.fs compile.fs interp.fs user.fs constant.fs init.fs \
  12.     site-forth/cross.fs
  13. FORTH99=99build.fs 99test.fs 99simple.fs 99equs.fs 99asm.fs 99prims.fs 99config.fs \
  14.     compile.fs common.fs commonhash.fs files.fs interp.fs
  15. ROM99=nforth.tsm dev.inc general.inc term.inc int.inc kbd.inc test.inc video.inc ram.inc
  16.  
  17. nforth.prm nforthc.bin nforthg.bin: $(FORCE) nforth0.rom $(FORTH99) $(FORTHCOMMON)
  18.     rm -f list.lst
  19. # 99test.fs builds a basic kernel
  20.     gforth -e ": get-rom-addr `perl romaddr.pl <nforth0.rom` ;" 99build.fs -e bye
  21.     @if ! grep 'Nothing' < list.lst &>/dev/null; then tail list.lst; fi
  22.  
  23. nforth0.rom: $(FORCE) $(ROM99) #nforth.prm 
  24.     ../../bin/tiasm nforth.tsm -r nforth0.rom nforthc.lst 
  25.  
  26. #nforthg.bin: nforthg0.bin nforthg1.bin
  27. #    cat nforthg0.bin nforthg1.bin >nforthg.bin
  28. #    dd if=/dev/zero bs=512 count=1 >>nforthg.bin
  29.  
  30. nforth.rom: $(FORCE) nforth.prm nforth0.rom
  31.     cp nforth0.rom nforth.rom
  32.     ADDR="`perl romaddr.pl <nforth0.rom`" && \
  33.     LEFT="$$[8192-$$ADDR]" && \
  34.     dd if=nforth.prm of=nforth.rom bs=1 seek=$$ADDR count=$$LEFT
  35.  
  36.