--- gforth/Attic/Makefile 1994/05/03 19:10:32 1.2 +++ gforth/Attic/Makefile 1994/07/29 11:16:20 1.10 @@ -1,16 +1,16 @@ -#$Id: Makefile,v 1.2 1994/05/03 19:10:32 pazsan Exp $ #Copyright 1992 by the ANSI figForth Development Group RM = echo 'Trying to remove' GCC = gcc +FORTH = ansforth CC = gcc -SWITCHES = -DUSE_TOS -DUSE_FTOS -DDEFAULTBIN='"'$(PWD)'"' # -DDIRECT_THREADED +SWITCHES = -D_POSIX_VERSION -DUSE_FTOS -DDEFAULTBIN='"'`pwd`'"' -DDIRECT_THREADED -fcaller-saves #-DNDEBUG #turn off assertions CFLAGS = -O4 -Wall -g $(SWITCHES) #-Xlinker -n puts text and data into the same 256M region #John Wavrik should use -Xlinker -N to get a writable text (executable) -LDFLAGS = -g # -Xlinker -N -LDLIBS = -lm -lmalloc +LDFLAGS = -g -Xlinker -N +LDLIBS = -lm EMACS = emacs @@ -29,10 +29,14 @@ RCS_FILES = $(SOURCES) INSTALL ToDo mode GEN = ansforth -GEN_PRECIOUS = primitives.i prim_labels.i primitives.b +GEN_PRECIOUS = primitives.i prim_labels.i primitives.b prim_alias.4th aliases.fs OBJECTS = engine.o io.o main.o +# things that need a working forth system to be generated +# this is used for antidependences, +FORTH_GEN = primitives.i prim_labels.i prim_alias.4th kernal.fi + all: ansforth aliases.fs #from the gcc Makefile: @@ -57,9 +61,17 @@ realclean: distclean current: $(RCS_FILES) -ansforth: $(OBJECTS) +ansforth: $(OBJECTS) $(FORTH_GEN) + -cp ansforth ansforth.old $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@ +kernal.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \ + errore.fs kernal.fs extend.fs tools.fs toolsext.fs \ + $(FORTH_GEN) + -cp kernal.32limg kernal.32limg.old + $(FORTH) main.fs + + engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES) $(GCC) $(CFLAGS) -S engine.c @@ -68,20 +80,17 @@ engine.o: engine.c primitives.i prim_lab primitives.b: primitives m4 primitives >$@ -primitives.i : primitives.b primitives2c.el - $(EMACS) -batch -load primitives2c.el -funcall make-c - -prim_labels.i : primitives.b primitives2c.el - $(EMACS) -batch -load primitives2c.el -funcall make-list +primitives.i : primitives.b prims2x.fs + $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@ -prim_alias.4th: primitives.b primitives2c.el - $(EMACS) -batch -load primitives2c.el -funcall make-alias +prim_labels.i : primitives.b prims2x.fs + $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@ -aliases.fs: prim_alias.4th - -$(GCC) -E -P -x c-header prim_alias.4th >$@ +aliases.fs: primitives.b prims2x.fs + $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@ -primitives.4th: primitives.b primitives2c.el - $(EMACS) -batch -load primitives2c.el -funcall make-forth +#primitives.4th: primitives.b primitives2c.el +# $(EMACS) -batch -load primitives2c.el -funcall make-forth #GNU make default rules % :: RCS/%,v