File:  [gforth] / gforth / Attic / Makefile
Revision 1.6: download - view: text, annotated - select for diffs
Thu Jul 7 14:59:19 1994 UTC (28 years, 1 month ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Made gray warnings-off-compatible
Added (type) as primitive

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

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