| 1 : |
pazsan
|
1.1
|
#Copyright 1992 by the ANSI figForth Development Group |
| 2 : |
|
|
|
| 3 : |
anton
|
1.5
|
VERSION = 0.1alpha#gforth version |
| 4 : |
pazsan
|
1.4
|
RM = rm |
| 5 : |
|
|
CP = cp |
| 6 : |
pazsan
|
1.1
|
GCC = gcc |
| 7 : |
|
|
FORTH = gforth |
| 8 : |
|
|
CC = gcc |
| 9 : |
pazsan
|
1.4
|
MAKE = gmake |
| 10 : |
pazsan
|
1.1
|
XCFLAGS = |
| 11 : |
|
|
XDEFINES = |
| 12 : |
pazsan
|
1.2
|
SWITCHES = $(XCFLAGS) $(XDEFINES) -DDEFAULTBIN='"'`pwd`'"' #-DNDEBUG #turn off assertions |
| 13 : |
|
|
CFLAGS = -O4 -Wall $(SWITCHES) |
| 14 : |
pazsan
|
1.1
|
|
| 15 : |
|
|
#-Xlinker -n puts text and data into the same 256M region |
| 16 : |
|
|
#John Wavrik should use -Xlinker -N to get a writable text (executable) |
| 17 : |
|
|
LDFLAGS = -Xlinker -N |
| 18 : |
pazsan
|
1.2
|
LDLIBS = -lm |
| 19 : |
pazsan
|
1.1
|
|
| 20 : |
|
|
EMACS = emacs |
| 21 : |
|
|
|
| 22 : |
|
|
INCLUDES = forth.h io.h |
| 23 : |
|
|
|
| 24 : |
|
|
FORTH_SRC = add.fs assert.fs blocks.fs bufio.fs cross.fs debug.fs \ |
| 25 : |
anton
|
1.5
|
debugging.fs doskey.fs ds2texi.fs environ.fs errore.fs etags.fs extend.fs filedump.fs \ |
| 26 : |
|
|
float.fs glocals.fs glosgen.fs gray.fs hash.fs history.fs kernal.fs \ |
| 27 : |
pazsan
|
1.1
|
locals-test.fs look.fs mach32b.fs mach32l.fs main.fs other.fs \ |
| 28 : |
|
|
prims2x.fs search-order.fs see.fs sieve.fs startup.fs struct.fs \ |
| 29 : |
anton
|
1.5
|
test2.fs tools.fs toolsext.fs vars.fs vt100.fs vt100key.fs wordinfo.fs |
| 30 : |
pazsan
|
1.1
|
|
| 31 : |
anton
|
1.5
|
SOURCES = Makefile.in configure config.sub config.guess \ |
| 32 : |
|
|
INSTALL README ToDo BUGS model gforth.ds \ |
| 33 : |
|
|
primitives primitives2c.el engine.c main.c io.c \ |
| 34 : |
|
|
apollo68k.h decstation.h 386.h hppa.h cache.c sparc.h \ |
| 35 : |
|
|
getopt.c getopt1.c getopt.h \ |
| 36 : |
pazsan
|
1.1
|
$(INCLUDES) $(FORTH_SRC) |
| 37 : |
|
|
|
| 38 : |
anton
|
1.5
|
RCS_FILES = ToDo model high-level |
| 39 : |
pazsan
|
1.1
|
|
| 40 : |
|
|
GEN = gforth |
| 41 : |
|
|
|
| 42 : |
|
|
OBJECTS = engine.o io.o main.o |
| 43 : |
|
|
|
| 44 : |
|
|
# things that need a working forth system to be generated |
| 45 : |
|
|
# this is used for antidependences, |
| 46 : |
anton
|
1.5
|
|
| 47 : |
|
|
FORTH_GEN = primitives.b primitives.i prim_labels.i aliases.fs kernl32l.fi kernl32b.fi |
| 48 : |
|
|
|
| 49 : |
|
|
GEN_PRECIOUS = $(FORTH_GEN) gforth.texi gforth.dvi gforth.ps Makefile |
| 50 : |
pazsan
|
1.1
|
|
| 51 : |
pazsan
|
1.2
|
all: |
| 52 : |
|
|
if [ ! -x gforth ]; then $(MAKE) first; fi |
| 53 : |
|
|
$(MAKE) more |
| 54 : |
pazsan
|
1.1
|
|
| 55 : |
pazsan
|
1.2
|
first: gforth |
| 56 : |
|
|
|
| 57 : |
pazsan
|
1.3
|
more: $(FORTH_GEN) gforth |
| 58 : |
pazsan
|
1.2
|
|
| 59 : |
pazsan
|
1.1
|
#from the gcc Makefile: |
| 60 : |
|
|
#"Deletion of files made during compilation. |
| 61 : |
|
|
# There are four levels of this: |
| 62 : |
|
|
# `mostlyclean', `clean', `distclean' and `realclean'. |
| 63 : |
|
|
# `mostlyclean' is useful while working on a particular type of machine. |
| 64 : |
|
|
# It deletes most, but not all, of the files made by compilation. |
| 65 : |
|
|
# It does not delete libgcc.a or its parts, so it won't have to be recompiled. |
| 66 : |
|
|
# `clean' deletes everything made by running `make all'. |
| 67 : |
|
|
# `distclean' also deletes the files made by config. |
| 68 : |
|
|
# `realclean' also deletes everything that could be regenerated automatically." |
| 69 : |
|
|
|
| 70 : |
|
|
clean: |
| 71 : |
pazsan
|
1.4
|
-$(RM) $(GEN) *.o *.s |
| 72 : |
pazsan
|
1.1
|
|
| 73 : |
|
|
distclean: clean |
| 74 : |
pazsan
|
1.4
|
-$(RM) machine.h machine.fs |
| 75 : |
pazsan
|
1.1
|
|
| 76 : |
|
|
realclean: distclean |
| 77 : |
pazsan
|
1.4
|
-$(RM) $(GEN_PRECIOUS) |
| 78 : |
pazsan
|
1.1
|
|
| 79 : |
anton
|
1.5
|
package: $(SOURCES) $(GEN_PRECIOUS) CVS |
| 80 : |
|
|
-rm -rf gforth-$(VERSION) |
| 81 : |
|
|
mkdir gforth-$(VERSION) |
| 82 : |
|
|
cp -rp $^ gforth-$(VERSION) |
| 83 : |
|
|
touch gforth-$(VERSION)/Makefile.in |
| 84 : |
|
|
tar cvf gforth-$(VERSION).tar gforth-$(VERSION) |
| 85 : |
|
|
gzip -9 -f gforth-$(VERSION).tar |
| 86 : |
|
|
@echo add a zip command here |
| 87 : |
pazsan
|
1.1
|
|
| 88 : |
anton
|
1.5
|
Makefile: Makefile.in |
| 89 : |
|
|
configure |
| 90 : |
|
|
|
| 91 : |
pazsan
|
1.2
|
gforth: $(OBJECTS) |
| 92 : |
pazsan
|
1.4
|
-$(CP) gforth gforth~ |
| 93 : |
pazsan
|
1.1
|
$(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@ |
| 94 : |
|
|
|
| 95 : |
|
|
kernl32l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \ |
| 96 : |
|
|
errore.fs kernal.fs extend.fs tools.fs toolsext.fs \ |
| 97 : |
|
|
mach32l.fs $(FORTH_GEN) |
| 98 : |
pazsan
|
1.4
|
-$(CP) kernl32l.fi kernl32l.fi~ |
| 99 : |
pazsan
|
1.1
|
$(FORTH) -e 's" mach32l.fs"' main.fs |
| 100 : |
|
|
|
| 101 : |
|
|
kernl32b.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \ |
| 102 : |
|
|
errore.fs kernal.fs extend.fs tools.fs toolsext.fs \ |
| 103 : |
|
|
mach32b.fs $(FORTH_GEN) |
| 104 : |
pazsan
|
1.4
|
-$(CP) kernl32b.fi kernl32b.fi~ |
| 105 : |
pazsan
|
1.1
|
$(FORTH) -e 's" mach32b.fs"' main.fs |
| 106 : |
|
|
|
| 107 : |
|
|
engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES) |
| 108 : |
|
|
$(GCC) $(CFLAGS) -S engine.c |
| 109 : |
|
|
|
| 110 : |
|
|
engine.o: engine.c primitives.i prim_labels.i machine.h $(INCLUDES) |
| 111 : |
|
|
|
| 112 : |
|
|
primitives.b: primitives |
| 113 : |
|
|
m4 primitives >$@ |
| 114 : |
|
|
|
| 115 : |
|
|
primitives.i : primitives.b prims2x.fs |
| 116 : |
|
|
$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@ |
| 117 : |
|
|
|
| 118 : |
|
|
prim_labels.i : primitives.b prims2x.fs |
| 119 : |
|
|
$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@ |
| 120 : |
|
|
|
| 121 : |
|
|
aliases.fs: primitives.b prims2x.fs |
| 122 : |
|
|
$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@ |
| 123 : |
|
|
|
| 124 : |
|
|
primitives.fs: primitives.b prims2x.fs |
| 125 : |
|
|
$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@ |
| 126 : |
|
|
|
| 127 : |
|
|
gforth.texi: gforth.ds primitives.b ds2texi.fs prims2x.fs |
| 128 : |
pazsan
|
1.4
|
$(FORTH) ds2texi.fs >$@ |
| 129 : |
pazsan
|
1.1
|
|
| 130 : |
|
|
gforth.dvi: gforth.texi |
| 131 : |
|
|
tex gforth.texi |
| 132 : |
anton
|
1.5
|
|
| 133 : |
|
|
gforth.ps: gforth.dvi |
| 134 : |
|
|
dvips gforth.dvi -o $@ |
| 135 : |
pazsan
|
1.1
|
|
| 136 : |
|
|
#primitives.4th: primitives.b primitives2c.el |
| 137 : |
|
|
# $(EMACS) -batch -load primitives2c.el -funcall make-forth |
| 138 : |
|
|
|
| 139 : |
|
|
#GNU make default rules |
| 140 : |
|
|
#% :: RCS/%,v |
| 141 : |
|
|
# co $@ |
| 142 : |
|
|
|
| 143 : |
|
|
%.s : %.c $(INCLUDES) |
| 144 : |
|
|
$(CC) $(CFLAGS) -S $< -o $@ |
| 145 : |
|
|
|
| 146 : |
|
|
%.o : %.s |
| 147 : |
|
|
$(CC) $(CFLAGS) -c $< -o $@ |
| 148 : |
|
|
|