--- gforth/Attic/Makefile 1994/02/11 16:30:45 1.1 +++ gforth/Attic/Makefile 1994/09/08 17:20:04 1.15 @@ -1,24 +1,27 @@ -#$Id: Makefile,v 1.1 1994/02/11 16:30:45 anton Exp $ #Copyright 1992 by the ANSI figForth Development Group RM = echo 'Trying to remove' GCC = gcc +FORTH = gforth CC = gcc -SWITCHES = -DUSE_TOS -DUSE_FTOS # -DDIRECT_THREADED +SWITCHES = \ + -fno-defer-pop -fcaller-saves -m486 \ + -D_POSIX_VERSION -DUSE_FTOS \ + #-DDIRECT_THREADED #-DFORCE_REG #-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 INCLUDES = forth.h io.h FORTH_SRC = cross.fs debug.fs environ.fs errore.fs extend.fs \ - filedump.fs glosgen.fs kernal.fs look.fs machine32b.fs \ - machine32l.fs main.fs other.fs search-order.fs see.fs sieve.fs \ + filedump.fs glosgen.fs kernal.fs look.fs mach32b.fs \ + mach32l.fs main.fs other.fs search-order.fs see.fs sieve.fs \ struct.fs tools.fs toolsext.fs vars.fs wordinfo.fs SOURCES = Makefile primitives primitives2c.el engine.c main.c io.c \ @@ -27,13 +30,17 @@ SOURCES = Makefile primitives primitives RCS_FILES = $(SOURCES) INSTALL ToDo model high-level -GEN = ansforth +GEN = gforth -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 -all: ansforth aliases.fs +# 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 kernl32l.fi kernl32b.fi + +all: gforth aliases.fs #from the gcc Makefile: #"Deletion of files made during compilation. @@ -57,9 +64,22 @@ realclean: distclean current: $(RCS_FILES) -ansforth: $(OBJECTS) +gforth: $(OBJECTS) $(FORTH_GEN) + -cp gforth gforth~ $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@ +kernl32l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \ + errore.fs kernal.fs extend.fs tools.fs toolsext.fs \ + mach32l.fs $(FORTH_GEN) + -cp kernl32l.fi kernl32l.fi~ + $(FORTH) -e 's" mach32l.fs" r/o open-file throw' main.fs + +kernl32b.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \ + errore.fs kernal.fs extend.fs tools.fs toolsext.fs \ + mach32b.fs $(FORTH_GEN) + -cp kernl32b.fi kernl32b.fi~ + $(FORTH) -e 's" mach32b.fs" r/o open-file throw' main.fs + engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES) $(GCC) $(CFLAGS) -S engine.c @@ -68,23 +88,21 @@ 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 +primitives.i : primitives.b prims2x.fs + $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@ -prim_labels.i : primitives.b primitives2c.el - $(EMACS) -batch -load primitives2c.el -funcall make-list +prim_labels.i : primitives.b prims2x.fs + $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@ -prim_alias.4th: primitives.b primitives2c.el - $(EMACS) -batch -load primitives2c.el -funcall make-alias +aliases.fs: primitives.b prims2x.fs + $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@ -aliases.fs: prim_alias.4th - -$(GCC) -E -P -x c-header prim_alias.4th >$@ - -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 - co $@ -%.o : %.c $(INCLUDES) - $(CC) $(CFLAGS) -c $< -o $@ +#% :: RCS/%,v +# co $@ +#%.o : %.c $(INCLUDES) +# $(CC) $(CFLAGS) -c $< -o $@ +