Annotation of gforth/Makefile.in, revision 1.100
1.38 anton 1: #Makefile for Gforth
2:
1.91 anton 3: #Copyright (C) 1995-1997 Free Software Foundation, Inc.
1.38 anton 4:
5: #This file is part of Gforth.
6:
7: #Gforth is free software; you can redistribute it and/or
8: #modify it under the terms of the GNU General Public License
9: #as published by the Free Software Foundation; either version 2
10: #of the License, or (at your option) any later version.
11:
12: #This program is distributed in the hope that it will be useful,
13: #but WITHOUT ANY WARRANTY; without even the implied warranty of
14: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
15: #GNU General Public License for more details.
16:
17: #You should have received a copy of the GNU General Public License
18: #along with this program; if not, write to the Free Software
19: #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20:
1.9 anton 21: # To change the values of `make' variables: instead of editing Makefiles,
22: # (1) if the variable is set in `config.status', edit `config.status'
23: # (which will cause the Makefiles to be regenerated when you run `make');
24: # (2) otherwise, pass the desired values on the `make' command line.
1.1 pazsan 25:
1.77 anton 26: #gforth version
27: VERSION_MAJOR=0
1.88 pazsan 28: VERSION_MINOR=3
1.98 anton 29: VERSION_RELEASE=1
1.77 anton 30: VERSION =$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
31: DOSVERSION=$(VERSION_MAJOR)$(VERSION_MINOR)$(VERSION_RELEASE)
1.9 anton 32: SHELL = /bin/sh
1.4 pazsan 33: RM = rm
1.74 pazsan 34: RMTREE = rm -rf
1.4 pazsan 35: CP = cp
1.74 pazsan 36: TAR = tar cf -
1.9 anton 37: INSTALL = @INSTALL@
38: INSTALL_PROGRAM = @INSTALL_PROGRAM@
39: INSTALL_DATA = @INSTALL_DATA@
40: LN_S = @LN_S@
1.48 pazsan 41: GCC = @CC@
1.23 anton 42: CC = $(GCC)
1.68 anton 43: PATHSEP = @PATHSEP@
1.67 anton 44: FORTHPATH = $(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)$(PATHSEP).
1.72 anton 45: FORTHSIZES = @FORTHSIZES@
1.67 anton 46: FORTH = ./gforth -p $(FORTHPATH)$(PATHSEP)$(srcdir)
1.87 anton 47: FORTHKFLAGS= -p .$(PATHSEP)$(srcdir) -i ./kernel.fi
48: FORTHK = ./gforth $(FORTHKFLAGS)
1.66 anton 49: FORTHP = ./gforth -i ./kernel.fi
1.22 anton 50: STRIP = strip
1.32 anton 51: TEXI2DVI = texi2dvi
1.38 anton 52: DVI2PS = dvips -D300
1.99 anton 53: #you can get texi2html from http://wwwcn.cern.ch/dci/texi2html/
1.15 anton 54: TEXI2HTML = texi2html
1.11 anton 55: MAKEINFO = makeinfo
1.9 anton 56: XCFLAGS = @CFLAGS@
57: XDEFINES = @DEFS@
1.12 anton 58: SWITCHES = $(XCFLAGS) $(XDEFINES) #-DNDEBUG #turn off assertions
1.48 pazsan 59: ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves
1.30 pazsan 60: DEBUGFLAG = @DEBUGFLAG@
1.100 ! anton 61: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/engine -I$(srcdir) -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
1.1 pazsan 62:
63: #John Wavrik should use -Xlinker -N to get a writable text (executable)
1.30 pazsan 64: XLDFLAGS = @LDFLAGS@
65: GCCLDFLAGS = @GCCLDFLAGS@
66: LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS) $(GCCLDFLAGS)
1.9 anton 67: LDLIBS = @LIBS@
68:
1.52 anton 69: VPATH = @srcdir@
1.9 anton 70: prefix = @prefix@
71: exec_prefix = @exec_prefix@
72: srcdir = @srcdir@
73: bindir = $(exec_prefix)/bin
74: #read-only architecture-independent files
75: datadir = $(prefix)/share
76: #read-only architecture-dependent non-ascii files
77: libdir = $(prefix)/lib
78: infodir = $(prefix)/info
1.52 anton 79: mandir = $(prefix)/man
80: man1dir= $(mandir)/man1
81: man1ext= .1
82: #older emacses have their site-lisp in $(libdir)/emacs/
83: emacssitelispdir=$(datadir)/emacs/site-lisp
1.1 pazsan 84:
1.100 ! anton 85: INCLUDES = engine/CVS engine/forth.h engine/threaded.h engine/io.h
1.1 pazsan 86:
1.52 anton 87: KERN_SRC = \
1.100 ! anton 88: kernel/CVS \
! 89: kernel/aliases0.fs \
! 90: kernel/aliases.fs \
! 91: kernel/args.fs \
! 92: kernel/cond.fs \
! 93: kernel/cond-old.fs \
1.52 anton 94: cross.fs \
1.100 ! anton 95: kernel/errore.fs \
! 96: kernel/files.fs \
! 97: kernel/require.fs \
! 98: kernel/paths.fs \
! 99: kernel/kernel.fs \
! 100: kernel/main.fs \
! 101: kernel/prim0.fs \
! 102: search.fs \
! 103: kernel/special.fs \
! 104: kernel/tools.fs \
! 105: kernel/toolsext.fs \
! 106: kernel/vars.fs \
! 107: kernel/accept.fs \
! 108: kernel/basics.fs \
! 109: kernel/interp.fs \
! 110: kernel/io.fs \
! 111: kernel/license.fs \
! 112: kernel/nio.fs \
! 113: kernel/saccept.fs
1.52 anton 114:
115: GFORTH_FI_SRC = \
116: assert.fs \
1.100 ! anton 117: blocked.fb \
1.52 anton 118: blocks.fs \
119: bufio.fs \
120: debug.fs \
1.100 ! anton 121: debugs.fs \
! 122: savesys.fs \
1.52 anton 123: environ.fs \
1.82 pazsan 124: errors.fs \
125: extend.fs \
1.52 anton 126: float.fs \
127: glocals.fs \
128: hash.fs \
129: history.fs \
1.64 anton 130: intcomp.fs \
1.52 anton 131: look.fs \
1.100 ! anton 132: search.fs \
1.52 anton 133: see.fs \
1.85 pazsan 134: see-ext.fs \
1.52 anton 135: source.fs \
136: startup.fs \
137: struct.fs \
138: stuff.fs \
1.60 pazsan 139: tasker.fs \
1.52 anton 140: termsize.fs \
141: vt100.fs \
142: vt100key.fs \
143: wordinfo.fs
144:
145: FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) \
1.75 anton 146: ans-report.fs ansi.fs answords.fs \
1.100 ! anton 147: code.fs colorize.fs comp-i.fs \
1.52 anton 148: doskey.fs ds2texi.fs \
149: etags.fs filedump.fs \
150: glosgen.fs gray.fs \
1.100 ! anton 151: doc/makedoc.fs \
1.49 anton 152: mach16b.fs mach16l.fs mach32b.fs mach32l.fs mach64b.fs mach64l.fs \
1.52 anton 153: more.fs other.fs prims2x.fs random.fs \
1.100 ! anton 154: siteinit.fs \
1.52 anton 155: tt.fs sokoban.fs \
156: wordsets.fs \
1.100 ! anton 157: test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs \
! 158: test/other.fs test/checkans.fs test/CVS \
1.65 pazsan 159: bubble.fs siev.fs matrix.fs fib.fs \
1.75 anton 160: oof.fs oofsampl.fs objects.fs
1.1 pazsan 161:
1.100 ! anton 162: COMPAT = compat/CVS compat/README compat/control.fs compat/anslocal.fs \
! 163: compat/struct.fs compat/loops.fs
! 164:
! 165: ALLSUBDIRS = engine
! 166:
! 167: SOURCES = CVS compat Makefile.in engine/Makefile.in gforthmi \
1.91 anton 168: configure.in configure config.sub config.guess \
1.100 ! anton 169: acconfig.h engine/config.h.in stamp-h.in \
1.40 anton 170: install-sh INSTALL README ToDo BUGS model COPYING Benchres \
1.100 ! anton 171: doc/gforth.ds doc/texinfo.tex doc/gforth.1 gforth.el \
! 172: prim engine/engine.c engine/main.c engine/io.c engine/memcmpc.c \
! 173: arch/m68k/machine.h arch/mips/machine.h arch/386/machine.h \
! 174: arch/hppa/machine.h arch/sparc/machine.h arch/power/machine.h \
! 175: arch/alpha/machine.h \
! 176: engine/cache.c engine/32bit.h \
! 177: engine/getopt.c engine/getopt1.c engine/getopt.h engine/select.c \
! 178: engine/ecvt.c engine/memcmp.c engine/strtol.c engine/strtoul.c \
! 179: engine/ansidecl.h engine/memmove.c \
! 180: engine/pow10.c engine/atanh.c \
! 181: engine/strerror.c engine/strsignal.c engine/strsig.c engine/dblsub.c \
! 182: INSTALL.DOS makefile.dos engine/makefile.dos mkdosmf.sed config.bat \
! 183: dosconf.h gforthmi.bat startup.dos history.dos mkinstalldirs \
! 184: configure.cmd mkos2mf.sed os2conf.h makefile.os2 engine/makefile.os2 \
! 185: gforthmi.cmd glosgen.glo doc/glossaries.doc \
! 186: $(INCLUDES) $(FORTH_SRC) $(COMPAT)
1.1 pazsan 187:
1.5 anton 188: RCS_FILES = ToDo model high-level
1.1 pazsan 189:
1.100 ! anton 190: GEN = gforth gforth-ditc kernel/version.fs version-stamp
1.1 pazsan 191:
1.100 ! anton 192: OBJECTS0 = engine/replace.a
! 193: OBJECTS = engine/engine.o engine/main.o
! 194: OBJECTS_DITC = engine/engine-ditc.o engine/main-ditc.o
1.1 pazsan 195:
196: # things that need a working forth system to be generated
1.100 ! anton 197: FORTH_GEN0 = prim.b engine/prim.i engine/prim_lab.i kernel/aliases.fs kernel/prim.fs
1.65 pazsan 198: FORTH_GEN = $(FORTH_GEN0) @KERNEL@ gforth.fi
1.1 pazsan 199: # this is used for antidependences,
1.65 pazsan 200: FORTH_GEN1 = $(FORTH_GEN0) @kernel_fi@
1.5 anton 201:
1.38 anton 202: #distributed documentation
1.100 ! anton 203: DOCDIST = doc/gforth.info doc/gforth.info-* doc/gforth.ps
1.5 anton 204:
1.72 anton 205: #stuff in a binonly distribution
1.87 anton 206: BINONLYDIST = config.status Makefile gforth gforth-ditc \
207: $(OBJECTS0) $(OBJECTS) $(OBJECTS_DITC)\
1.100 ! anton 208: machine/machine.h engine/config.h kernel.fi \
! 209: stamp-h engine/version.h kernel/version.fs version-stamp \
1.72 anton 210: INSTALL.BINDIST
211:
1.48 pazsan 212: KERNLS = kernl16b.fi- kernl16l.fi- \
213: kernl32b.fi- kernl32l.fi- \
214: kernl64b.fi- kernl64l.fi-
1.30 pazsan 215:
1.100 ! anton 216: GEN_PRECIOUS = $(FORTH_GEN) $(KERNLS) doc/gforth.texi doc/gforth.dvi doc/gforth.ps Makefile configure
1.1 pazsan 217:
1.9 anton 218: #standards.info recommends this:
219: .SUFFIXES:
220: .SUFFIXES: .c .o
221:
1.100 ! anton 222: all: kernel/version.fs more
1.1 pazsan 223:
1.78 anton 224: #this rule avoids remaking everything after minor changes in Makefile.in
1.100 ! anton 225: version: Makefile.in
1.94 anton 226: if test -r $@ && test x'$(VERSION)' = x`cat $@` ; then true ; else echo $(VERSION) > $@ ; fi
1.78 anton 227:
1.100 ! anton 228: engine/version.h: version
1.71 anton 229: echo "static char gforth_version[]=\"$(VERSION)\" ;" >$@
1.48 pazsan 230:
1.100 ! anton 231: kernel/version.fs: version
1.48 pazsan 232: $(MAKE) gforth
233: echo ": version-string s\" $(VERSION)\" ;" >$@
1.2 pazsan 234:
1.83 pazsan 235: more: $(OBJECTS) $(FORTH_GEN) gforth
1.2 pazsan 236:
1.1 pazsan 237: #from the gcc Makefile:
238: #"Deletion of files made during compilation.
239: # There are four levels of this:
240: # `mostlyclean', `clean', `distclean' and `realclean'.
241: # `mostlyclean' is useful while working on a particular type of machine.
242: # It deletes most, but not all, of the files made by compilation.
243: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
244: # `clean' deletes everything made by running `make all'.
245: # `distclean' also deletes the files made by config.
246: # `realclean' also deletes everything that could be regenerated automatically."
247:
1.45 anton 248: mostlyclean:
1.100 ! anton 249: -$(RM) -rf *.s gforth.fi *.fi~ *.fi- kernel/version.fs *TAGS \
! 250: doc/crossdoc.fd doc/doc.fd doc/gforth.texi doc/gforth.fns \
! 251: doc/gforth.aux doc/gforth.cp doc/gforth.cps \
! 252: doc/gforth.dvi doc/gforth.fn doc/gforth.ky doc/gforth.log \
! 253: doc/gforth.pg \
! 254: doc/gforth.toc doc/gforth.tp doc/gforth.vr html \
! 255: gforth-$(VERSION).tar.gz \
! 256: engine/version.h
1.45 anton 257:
258: clean: mostlyclean
1.100 ! anton 259: -$(RM) -rf $(GEN) *.o engine/*.o engine/*.a
1.1 pazsan 260:
261: distclean: clean
1.100 ! anton 262: -$(RM) machine/machine.h kernel.fi config.cache config.log \
! 263: config.status engine/config.h Makefile stamp-h
1.1 pazsan 264:
1.53 anton 265: #realclean is useless, but dangerous, so it's commented out
266: #realclean: distclean
267: # -$(RM) $(GEN_PRECIOUS)
1.1 pazsan 268:
1.45 anton 269: #mostlyclean, but also remove some of the stuff that is distributed
270: virtualclean: mostlyclean
271: -$(RM) -rf gforth.fns gforth.texi gforth.ps gforth.info* \
1.59 anton 272: gforth-$(VERSION).tar.gz config.cache *~ */*~
1.45 anton 273:
1.66 anton 274: #use dist targets only when srcdir=.
1.69 pazsan 275: dist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
1.74 pazsan 276: -$(RMTREE) gforth-$(VERSION)
1.21 anton 277: mkdir gforth-$(VERSION)
1.100 ! anton 278: $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
! 279: (cd gforth-$(VERSION); tar xf -)
1.74 pazsan 280: $(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).tar.gz
281: -$(RMTREE) gforth-$(VERSION)
282:
283: #use dist targets only when srcdir=.
284: dosdist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST)
285: -$(RMTREE) gforth.$(DOSVERSION)
286: mkdir gforth.$(DOSVERSION)
1.100 ! anton 287: $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \
! 288: (cd gforth.$(DOSVERSION); tar xf -)
! 289: zip -r9 gf$(DOSVERSION)dos.zip gforth.$(DOSVERSION)/*
1.74 pazsan 290: -$(RMTREE) gforth.$(DOSVERSION)
1.1 pazsan 291:
1.69 pazsan 292: #A source distribution contains only the things needed to install gforth,
293: #without the documents.
294: srcdist: $(SOURCES) $(FORTH_GEN0) @KERNEL@
1.74 pazsan 295: -$(RMTREE) gforth-$(VERSION)
1.69 pazsan 296: mkdir gforth-$(VERSION)
1.100 ! anton 297: $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ | \
! 298: (cd gforth-$(VERSION); tar xf -)
1.74 pazsan 299: $(TAR) gforth-$(VERSION)|gzip -9 >gforth-src-$(VERSION).tar.gz
300: -$(RMTREE) gforth-$(VERSION)
1.69 pazsan 301:
1.100 ! anton 302: srconlydist: $(SOURCES)
! 303: -$(RMTREE) gforth-$(VERSION)
! 304: mkdir gforth-$(VERSION)
! 305: $(TAR) $(SOURCES) | \
! 306: (cd gforth-$(VERSION); tar xf -)
! 307: $(TAR) gforth-$(VERSION)|gzip -9 >gforth-srconly-$(VERSION).tar.gz
! 308: -$(RMTREE) gforth-$(VERSION)
! 309:
1.69 pazsan 310: #A document distribution contains only the documents, which can be created
311: #with MAKE.
312: docdist: $(DOCDIST)
1.74 pazsan 313: -$(RMTREE) gforth-$(VERSION)
1.69 pazsan 314: mkdir gforth-$(VERSION)
1.100 ! anton 315: $(TAR) $(DOCDIST) | (cd gforth-$(VERSION); tar xf -)
1.74 pazsan 316: $(TAR) gforth-$(VERSION)|gzip -9 >gforth-doc-$(VERSION).tar.gz
317: -$(RMTREE) gforth-$(VERSION)
1.69 pazsan 318:
1.22 anton 319: #a binary distribution contains the complete source distribution,
320: # the objects, the executable and the links. the objects are there for making
321: # make happy.
1.72 anton 322: bindist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
1.74 pazsan 323: -$(RMTREE) gforth-$(VERSION)
1.22 anton 324: mkdir gforth-$(VERSION)
1.100 ! anton 325: $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
1.22 anton 326: strip gforth-$(VERSION)/gforth
1.74 pazsan 327: $(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-@host@.tar.gz
1.22 anton 328:
329: #makes a package with only the stuff not present in the source
330: #package. For installation the source package is still needed!
331: #This is useful if you want to distribute many binary versions in
332: #little space (e.g., on floppy disk): Put the source package and
333: #all the binonly packages you are interested in on the disk. The user
334: #then just has to unpack the source and his favourite binonly into the
335: #same directory and has a full binary distribution.
1.72 anton 336: binonlydist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST)
1.74 pazsan 337: -$(RMTREE) gforth-$(VERSION)
1.22 anton 338: mkdir gforth-$(VERSION)
1.100 ! anton 339: $(TAR) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -)
1.22 anton 340: strip gforth-$(VERSION)/gforth
1.74 pazsan 341: $(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION)-binonly-@host@.tar.gz
1.22 anton 342:
343:
1.15 anton 344: #strip gforth, because the debugging stuff is hardly useful once
345: # gforth manages to execute more than a few primitives
346:
1.68 anton 347: #install does not depend on gforth.info, because that would require
348: #supplying a lot of files that can be easily generated (only info is
349: #hard to generate)
1.100 ! anton 350: install: gforth $(FORTH_SRC) kernel.fi gforth.fi doc/gforth.1 prim gforth.TAGS installdirs
! 351: touch $(datadir)/gforth/site-forth/siteinit.fs
1.49 anton 352: -$(RM) $(bindir)/gforth $(bindir)/gforth-$(VERSION)
1.15 anton 353: $(INSTALL_PROGRAM) -s gforth $(bindir)
1.49 anton 354: ln $(bindir)/gforth $(bindir)/gforth-$(VERSION)
1.100 ! anton 355: -$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(man1dir)
1.83 pazsan 356: -for i in $(srcdir)/gforth.info*; do $(INSTALL_DATA) $$i $(infodir); done
1.100 ! anton 357: for i in $(FORTH_SRC) prim; do \
1.66 anton 358: $(INSTALL_DATA) $(srcdir)/$$i $(datadir)/gforth/$(VERSION); \
1.9 anton 359: done
1.65 pazsan 360: $(INSTALL_DATA) kernel.fi $(libdir)/gforth/$(VERSION)
1.77 anton 361: $(RM) gforth.fi; $(MAKE) gforth.fi #gforth.fi contains some path names
1.83 pazsan 362: $(INSTALL_DATA) gforth.fi $(libdir)/gforth/$(VERSION)
1.94 anton 363: sed 's:^$(srcdir)/:$(datadir)/gforth/$(VERSION)/:' gforth.TAGS >TAGS; $(INSTALL_DATA) TAGS $(datadir)/gforth/$(VERSION)
1.52 anton 364: if test -d $(emacssitelispdir); then \
1.66 anton 365: $(INSTALL_DATA) $(srcdir)/gforth.el $(emacssitelispdir); \
1.55 pazsan 366: else \
1.66 anton 367: echo ">>>>>Please install $(srcdir)/gforth.el in your .../emacs/site-lisp directory"; \
1.52 anton 368: fi
1.68 anton 369: echo ">>>>> Please make an entry for Gforth in your info dir file; e.g.:"; \
1.72 anton 370: echo "* Gforth: (gforth). A fast interpreter for the Forth language."
1.40 anton 371:
1.66 anton 372: install-strip: install
373:
1.78 anton 374: installdirs: mkinstalldirs
375: $(srcdir)/mkinstalldirs $(bindir) $(man1dir) $(infodir) $(libdir)/gforth/$(VERSION) $(datadir)/gforth/$(VERSION) $(libdir)/gforth/site-forth $(datadir)/gforth/site-forth
376:
1.40 anton 377: #deinstall all files specific to this version of gforth
378: #to uninstall version foo, type `make uninstall VERSION=foo'
379: uninstall:
380: -$(RM) -rf $(libdir)/gforth/$(VERSION) $(datadir)/gforth/$(VERSION) $(bindir)/gforth-$(VERSION)
1.81 anton 381: @echo -e "Type\n$(RM) -rf $(bindir)/gforth $(man1dir)/gforth.1 $(infodir)/gforth.info* $(datadir)/gforth $(libdir)/gforth\nto remove Gforth completely"
1.40 anton 382:
1.67 anton 383: check test: gforth gforth.fi
1.100 ! anton 384: $(FORTH) test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs -e bye
! 385: $(FORTH) test/other.fs -e bye
! 386: $(FORTH) code.fs test/checkans.fs -e bye
1.21 anton 387: @echo 'Expect no differences'
1.100 ! anton 388: $(FORTH) -m 100000 prims2x.fs -e "s\" $(srcdir)/prim.b\"' output-c process-file bye"| diff -c - $(srcdir)/engine/prim.i
1.21 anton 389:
1.46 anton 390: bench: gforth gforth.fi
1.40 anton 391: @echo 'Each benchmark takes about 30s on a 486-66 (gcc-2.6.3 -DFORCE_REG)'
392: time $(FORTH) siev.fs -e "main bye"
393: time $(FORTH) bubble.fs -e "main bye"
1.41 anton 394: time $(FORTH) -m 160000 matrix.fs -e "main bye"
1.40 anton 395: time $(FORTH) fib.fs -e "main bye"
396:
1.9 anton 397: dvi: gforth.dvi
1.5 anton 398:
1.87 anton 399: gforth: $(OBJECTS) $(OBJECTS0)
1.4 pazsan 400: -$(CP) gforth gforth~
1.87 anton 401: $(GCC) $(LDFLAGS) $(OBJECTS) $(OBJECTS0) $(LDLIBS) -o $@
1.95 pazsan 402: @GFORTH_EXE@
1.87 anton 403:
404: gforth-ditc: $(OBJECTS_DITC) $(OBJECTS0)
405: $(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(OBJECTS0) $(LDLIBS) -o $@
1.95 pazsan 406: @GFORTHDITC_EXE@
1.1 pazsan 407:
1.100 ! anton 408: kernl16l.fi-: $(KERN_SRC) kernel/version.fs mach16l.fs $(FORTH_GEN0)
! 409: $(FORTHK) -e 's" mach16l.fs"' kernel/main.fs -e "save-cross kernl16l.fi- $(bindir)/gforth-$(VERSION) bye"
1.87 anton 410:
1.100 ! anton 411: kernl16b.fi-: $(KERN_SRC) kernel/version.fs mach16b.fs $(FORTH_GEN0)
! 412: $(FORTHK) -e 's" mach16b.fs"' kernel/main.fs -e "save-cross kernl16b.fi- $(bindir)/gforth-$(VERSION) bye"
1.87 anton 413:
1.100 ! anton 414: kernl32l.fi-: $(KERN_SRC) kernel/version.fs mach32l.fs $(FORTH_GEN0)
! 415: $(FORTHK) -e 's" mach32l.fs"' kernel/main.fs -e "save-cross kernl32l.fi- $(bindir)/gforth-$(VERSION) bye"
1.87 anton 416:
1.100 ! anton 417: kernl32b.fi-: $(KERN_SRC) kernel/version.fs mach32b.fs $(FORTH_GEN0)
! 418: $(FORTHK) -e 's" mach32b.fs"' kernel/main.fs -e "save-cross kernl32b.fi- $(bindir)/gforth-$(VERSION) bye"
! 419:
! 420: kernl64l.fi-: $(KERN_SRC) kernel/version.fs mach64l.fs $(FORTH_GEN0)
! 421: $(FORTHK) -e 's" mach64l.fs"' kernel/main.fs -e "save-cross kernl64l.fi- $(bindir)/gforth-$(VERSION) bye"
! 422:
! 423: kernl64b.fi-: $(KERN_SRC) kernel/version.fs mach64b.fs $(FORTH_GEN0)
! 424: $(FORTHK) -e 's" mach64b.fs"' kernel/main.fs -e "save-cross kernl64b.fi- $(bindir)/gforth-$(VERSION) bye"
! 425:
! 426: kernl-%.fi: arch/%/mach.fs $(KERN_SRC) kernel/version.fs $(FORTH_GEN0) \
! 427: arch/%/prim.fs arch/%/asm.fs
! 428: $(FORTHK) -e 's" $<"' kernel/main.fs -e "save-cross $@- $(bindir)/gforth-$(VERSION) bye"
! 429: if [ -f `echo $< | sed s/fs/sh/` ]; \
! 430: then sh `echo $< | sed s/fs/sh/` $@; \
! 431: else $(CP) $@- $@; \
! 432: fi
1.30 pazsan 433:
1.87 anton 434: kernl16b.fi: $(KERNLS)
1.97 anton 435: -$(CP) kernl16b.fi kernl16b.fi~
436: -$(CP) kernl16b.fi- kernl16b.fi
1.87 anton 437:
438: kernl16l.fi: $(KERNLS)
1.97 anton 439: -$(CP) kernl16l.fi kernl16l.fi~
440: -$(CP) kernl16l.fi- kernl16l.fi
1.87 anton 441:
1.96 anton 442: kernl32b.fi: $(KERNLS)
1.97 anton 443: -$(CP) kernl32b.fi kernl32b.fi~
444: -$(CP) kernl32b.fi- kernl32b.fi
1.87 anton 445:
446: kernl32l.fi: $(KERNLS)
447: -$(CP) kernl32l.fi kernl32l.fi~
448: -$(CP) kernl32l.fi- kernl32l.fi
449:
450: kernl64b.fi: $(KERNLS)
451: -$(CP) kernl64b.fi kernl64b.fi~
452: -$(CP) kernl64b.fi- kernl64b.fi
453:
454: kernl64l.fi: $(KERNLS)
455: -$(CP) kernl64l.fi kernl64l.fi~
456: -$(CP) kernl64l.fi- kernl64l.fi
1.89 anton 457:
1.100 ! anton 458: #kernl%.fi: kernl%.fi- $(KERNLS)
! 459: # -$(CP) $@ $@~
! 460: # -$(CP) $< $@
1.87 anton 461:
1.100 ! anton 462: gforth.fi: @kernel_fi@ gforthmi gforth gforth-ditc $(GFORTH_FI_SRC)
! 463: GFORTHD="./gforth-ditc -p .$(PATHSEP)$(srcdir)" GFORTH="./gforth-ditc -p .$(PATHSEP)$(srcdir) -i kernel.fi startup.fs" $(srcdir)/gforthmi gforth.fi $(FORTHSIZES) $(FORTHKFLAGS) startup.fs
1.50 anton 464:
1.67 anton 465: #TAGS is a GNU standard target
466: TAGS: gforth.TAGS
467: $(CP) gforth.TAGS $@
468:
1.100 ! anton 469: gforth.TAGS: @kernel_fi@ gforth $(GFORTH_FI_SRC) prim.TAGS
1.66 anton 470: $(FORTHK) etags.fs startup.fs -e bye
1.100 ! anton 471: cat TAGS prim.TAGS kernel.TAGS >gforth.TAGS
1.67 anton 472: rm TAGS
1.34 anton 473:
1.100 ! anton 474: engine/replace.a:
! 475: cd engine; $(MAKE) replace.a
1.1 pazsan 476:
1.100 ! anton 477: engine.s: engine/engine.c engine/prim.i engine/prim_lab.i machine/machine.h engine/threaded.h $(INCLUDES) engine/config.h
! 478: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S $(srcdir)/engine/engine.c
1.36 pazsan 479:
1.100 ! anton 480: engine/engine.o: engine/engine.c engine/prim.i engine/prim_lab.i machine/machine.h engine/threaded.h $(INCLUDES) engine/config.h
! 481: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c $(srcdir)/engine/engine.c -o $@
1.87 anton 482:
1.100 ! anton 483: engine/engine-ditc.o: engine/engine.c engine/prim.i engine/prim_lab.i machine/machine.h engine/threaded.h $(INCLUDES) engine/config.h
! 484: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/engine/engine.c
1.87 anton 485:
1.100 ! anton 486: engine/main.o: engine/main.c machine/machine.h engine/threaded.h $(INCLUDES) engine/config.h engine/version.h
! 487: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/engine/main.c
1.9 anton 488:
1.100 ! anton 489: engine/main-ditc.o: engine/main.c machine/machine.h engine/threaded.h $(INCLUDES) engine/config.h engine/version.h
! 490: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/engine/main.c
1.1 pazsan 491:
1.100 ! anton 492: engine/strtoul.o: strtoul.c strtol.c
1.1 pazsan 493:
1.100 ! anton 494: prim.b: prim
! 495: m4 -s $(srcdir)/prim >$@
! 496:
! 497: engine/prim.i: prim.b prims2x.fs
! 498: $(FORTHK) prims2x.fs -e "s\" prim.b\" ' output-c process-file bye" >$@-
1.93 pazsan 499: $(CP) $@- $@
500: $(RM) $@-
1.1 pazsan 501:
1.100 ! anton 502: engine/prim_lab.i: prim.b prims2x.fs
! 503: $(FORTHK) prims2x.fs -e "s\" prim.b\" ' output-label process-file bye" >$@-
1.93 pazsan 504: $(CP) $@- $@
505: $(RM) $@-
1.1 pazsan 506:
1.100 ! anton 507: kernel/aliases.fs: prim.b prims2x.fs kernel/aliases0.fs
! 508: $(CP) kernel/aliases0.fs $@-
! 509: $(FORTHK) prims2x.fs -e "s\" prim.b\" ' output-alias process-file bye" >>$@-
1.93 pazsan 510: $(CP) $@- $@
511: $(RM) $@-
1.1 pazsan 512:
1.100 ! anton 513: kernel/prim.fs: prim.b prims2x.fs kernel/prim0.fs
! 514: $(CP) kernel/prim0.fs kernel/prim.fs-
! 515: $(FORTHK) prims2x.fs -e "s\" prim.b\" ' output-forth process-file bye" >>$@-
1.93 pazsan 516: $(CP) $@- $@
517: $(RM) $@-
1.27 anton 518:
1.100 ! anton 519: prim.TAGS: prim.b prims2x.fs
! 520: $(FORTHK) prims2x.fs -e "s\" $(srcdir)/prim.b\" ' output-tag process-file bye" >$@-
1.93 pazsan 521: $(CP) $@- $@
522: $(RM) $@-
1.1 pazsan 523:
1.100 ! anton 524: doc/doc.fd: doc/makedoc.fs $(GFORTH_FI_SRC)
! 525: $(FORTHK) -e "s\" doc/doc.fd\"" doc/makedoc.fs startup.fs code.fs -e bye
1.20 anton 526:
1.100 ! anton 527: doc/crossdoc.fd: $(KERN_SRC) kernel/version.fs $(FORTH_GEN0)
! 528: $(FORTHK) -e 's" mach32l.fs"' kernel/main.fs -e bye
1.35 anton 529:
1.100 ! anton 530: doc/gforth.texi: doc/gforth.ds prim.b ds2texi.fs prims2x.fs \
! 531: doc/doc.fd doc/crossdoc.fd
! 532: $(FORTHK) -m 100000 ds2texi.fs prims2x.fs -e "s\" $(srcdir)/prim.b\" ' register-doc process-file" doc/crossdoc.fd doc/doc.fd -e "s\" $(srcdir)/doc/gforth.ds\" r/o open-file throw ds2texi bye" >$@-
1.93 pazsan 533: $(CP) $@- $@
534: $(RM) $@-
1.35 anton 535:
1.100 ! anton 536: checkdoc: doc/gforth.ds prim.b ds2texi.fs prims2x.fs doc/doc.fd doc/crossdoc.fd answords.fs doc/gforth.texi
! 537: $(FORTHK) ds2texi.fs prims2x.fs -e "s\" $(srcdir)/prim.b\" ' register-doc process-file" doc/crossdoc.fd doc/doc.fd answords.fs -e bye
! 538: -grep unknown doc/gforth.texi
1.66 anton 539:
1.100 ! anton 540: dvi: doc/gforth.dvi
1.1 pazsan 541:
1.100 ! anton 542: doc/gforth.dvi doc/gforth.fns: doc/gforth.texi
! 543: cd doc; $(TEXI2DVI) gforth.texi
1.5 anton 544:
1.100 ! anton 545: doc/gforth.ps: doc/gforth.dvi
! 546: $(DVI2PS) doc/gforth.dvi -o $@
1.40 anton 547:
1.100 ! anton 548: info: doc/gforth.info
1.66 anton 549:
1.100 ! anton 550: doc/gforth.info doc/gforth.info-*: doc/gforth.texi
! 551: -cd doc; $(MAKEINFO) gforth.texi
1.15 anton 552:
1.100 ! anton 553: html: doc/gforth.texi
1.15 anton 554: -$(RM) html/*
555: -mkdir html
1.100 ! anton 556: cd html; $(TEXI2HTML) -menu -split_node ../doc/gforth.texi
1.63 pazsan 557:
1.100 ! anton 558: doc: doc/gforth.ps html
1.1 pazsan 559:
1.9 anton 560: # For an explanation of the following Makefile rules, see node
561: # `Automatic Remaking' in GNU Autoconf documentation.
1.69 pazsan 562: $(srcdir)/configure: configure.in
563: cd $(srcdir) && autoconf
564:
1.51 anton 565: # autoheader might not change config.h.in, so touch a stamp file.
1.100 ! anton 566: config.h.in: stamp-h.in
! 567: stamp-h.in: configure.in acconfig.h
1.69 pazsan 568: cd $(srcdir) && autoheader
569: echo timestamp > $(srcdir)/stamp-h.in
1.51 anton 570:
1.100 ! anton 571: engine/config.h: stamp-h
1.69 pazsan 572: stamp-h: config.h.in config.status
1.100 ! anton 573: CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status
1.51 anton 574: echo > stamp-h
1.69 pazsan 575: Makefile: Makefile.in config.status
1.100 ! anton 576: CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status
1.51 anton 577:
1.69 pazsan 578: config.status: configure
1.51 anton 579: ./config.status --recheck
1.30 pazsan 580:
1.51 anton 581:
582: #create files for DOS, because DOS cannot do it itself
1.30 pazsan 583: makefile.dos: mkdosmf.sed Makefile.in
584: sed -f mkdosmf.sed <Makefile.in >makefile.dos
1.100 ! anton 585: sed -f mkdosmf.sed <engine/Makefile.in >engine/makefile.dos
1.69 pazsan 586:
587: makefile.os2: mkos2mf.sed Makefile.in
588: sed -f mkos2mf.sed <Makefile.in >makefile.os2
1.100 ! anton 589: sed -f mkos2mf.sed <engine/Makefile.in >engine/makefile.os2
1.69 pazsan 590: echo '%.o: %.c' >>makefile.os2
591: echo ' $$(GCC) $$(CFLAGS) -c $$<' >>makefile.os2
1.100 ! anton 592: echo '%.o: %.c' >>engine/makefile.os2
! 593: echo ' $$(GCC) $$(CFLAGS) -c $$<' >>engine/makefile.os2
1.48 pazsan 594:
1.100 ! anton 595: # history is a little bit different now! JAW
! 596: #history.dos: history.fs Makefile.in
! 597: # sed -e "s,~/\.gforth-history,/gforth.his,g" <history.fs >history.dos
1.31 pazsan 598:
599: startup.dos: startup.fs Makefile.in
600: sed -e "s/\\\\ include doskey/include doskey/g" \
1.43 pazsan 601: -e "s/include vt100key/\\\\ include vt100key/g" <startup.fs >startup.dos
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>