File:  [gforth] / gforth / Attic / Makefile
Revision 1.12: download - view: text, annotated - select for diffs
Thu Aug 25 15:25:18 1994 UTC (29 years, 8 months ago) by anton
Branches: MAIN
CVS tags: HEAD
make now generates both images
the image names were changed
added C-level support for deferred words (dodefer)
made 2>r 2r> 2r@ 2rdrop primitives
some tuning of the outer interpreter; eliminated many words based on
 counted strings
Replaced the hash function with one that works better for larger tables

    1: #Copyright 1992 by the ANSI figForth Development Group
    2: 
    3: RM	= echo 'Trying to remove'
    4: GCC	= gcc
    5: FORTH	= gforth
    6: CC	= gcc
    7: SWITCHES = -D_POSIX_VERSION -DUSE_FTOS -DDEFAULTBIN='"'`pwd`'"' -DDIRECT_THREADED -fcaller-saves #-DNDEBUG #turn off assertions
    8: CFLAGS	= -O4 -Wall -g $(SWITCHES)
    9: 
   10: #-Xlinker -n puts text and data into the same 256M region
   11: #John Wavrik should use -Xlinker -N to get a writable text (executable)
   12: LDFLAGS	= -g -Xlinker -N
   13: LDLIBS = -lm
   14: 
   15: EMACS	= emacs
   16: 
   17: INCLUDES = forth.h io.h
   18: 
   19: FORTH_SRC = cross.fs debug.fs environ.fs errore.fs extend.fs \
   20: 	filedump.fs glosgen.fs kernal.fs look.fs machine32b.fs \
   21: 	machine32l.fs main.fs other.fs search-order.fs see.fs sieve.fs \
   22: 	struct.fs tools.fs toolsext.fs vars.fs wordinfo.fs
   23: 
   24: SOURCES	= Makefile primitives primitives2c.el engine.c main.c io.c \
   25: 	apollo68k.h decstation.h 386.h hppa.h sparc.h \
   26: 	$(INCLUDES) $(FORTH_SRC)
   27: 
   28: RCS_FILES = $(SOURCES) INSTALL ToDo model high-level
   29: 
   30: GEN = gforth
   31: 
   32: GEN_PRECIOUS = primitives.i prim_labels.i primitives.b prim_alias.4th aliases.fs
   33: 
   34: OBJECTS = engine.o io.o main.o
   35: 
   36: # things that need a working forth system to be generated
   37: # this is used for antidependences,
   38: FORTH_GEN = primitives.i prim_labels.i prim_alias.4th kernl32l.fi kernl32b.fi
   39: 
   40: all:	gforth aliases.fs
   41: 
   42: #from the gcc Makefile: 
   43: #"Deletion of files made during compilation.
   44: # There are four levels of this:
   45: #   `mostlyclean', `clean', `distclean' and `realclean'.
   46: # `mostlyclean' is useful while working on a particular type of machine.
   47: # It deletes most, but not all, of the files made by compilation.
   48: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
   49: # `clean' deletes everything made by running `make all'.
   50: # `distclean' also deletes the files made by config.
   51: # `realclean' also deletes everything that could be regenerated automatically."
   52: 
   53: clean:		
   54: 		-rm $(GEN)
   55: 
   56: distclean:	clean
   57: 		-rm machine.h
   58: 
   59: realclean:	distclean
   60: 		-rm $(GEN_PRECIOUS)
   61: 
   62: current:	$(RCS_FILES)
   63: 
   64: gforth:	$(OBJECTS) $(FORTH_GEN)
   65: 		-cp gforth gforth.old
   66: 		$(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
   67: 
   68: kernl32l.fi:	main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
   69: 		errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
   70: 		machine32l.fs $(FORTH_GEN)
   71: 		-cp kernl32l.fi kernl32l.fi.old
   72: 		$(FORTH) -e 's" machine32l.fs" r/o open-file throw' main.fs
   73: 
   74: kernl32b.fi:	main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
   75: 		errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
   76: 		machine32b.fs $(FORTH_GEN)
   77: 		-cp kernl32b.fi kernl32b.fi.old
   78: 		$(FORTH) -e 's" machine32b.fs" r/o open-file throw' main.fs
   79: 
   80: engine.s:	engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
   81: 		$(GCC) $(CFLAGS) -S engine.c
   82: 
   83: engine.o:	engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
   84: 
   85: primitives.b:	primitives
   86: 		m4 primitives >$@ 
   87: 
   88: primitives.i :	primitives.b prims2x.fs
   89: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
   90: 
   91: prim_labels.i :	primitives.b prims2x.fs
   92: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
   93: 
   94: aliases.fs:	primitives.b prims2x.fs
   95: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
   96: 
   97: #primitives.4th:	primitives.b primitives2c.el
   98: #		$(EMACS) -batch -load primitives2c.el -funcall make-forth
   99: 
  100: #GNU make default rules
  101: #% ::		RCS/%,v
  102: #		co $@
  103: #%.o :		%.c $(INCLUDES)
  104: #		$(CC) $(CFLAGS) -c $< -o $@
  105: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>