File:  [gforth] / gforth / Makefile.in
Revision 1.9: download - view: text, annotated - select for diffs
Mon Dec 12 17:10:29 1994 UTC (29 years, 4 months ago) by anton
Branches: MAIN
CVS tags: HEAD
Reorganized configuration: configure is now created by autoconf from
configure.in; I still left it in the CVS repository because not
everyone has autoconf. decstation.h renamed to mips.h and apollo68k to
m68k. Added general 32bit.h description, which the other machine
descriptions use. Created/copied replacement files install-sh memcmp.c
memmove.c select.c (carved out from ecvt.c) strtol.c
strtoul.c. Bytesex is now handled by configure.

Deciding the threading method is now done in machine.h, this should
also be done for USE_TOS and USE_FTOS.

    1: #Copyright 1992 by the ANSI figForth Development Group
    2: # To change the values of `make' variables: instead of editing Makefiles,
    3: # (1) if the variable is set in `config.status', edit `config.status'
    4: #     (which will cause the Makefiles to be regenerated when you run `make');
    5: # (2) otherwise, pass the desired values on the `make' command line.
    6: 
    7: #To do:
    8: #use $(srcdir) to make compilation in a non-srcdir possible
    9: 
   10: VERSION	=0.1alpha#gforth version
   11: SHELL	= /bin/sh
   12: RM	= rm
   13: CP	= cp
   14: INSTALL	= @INSTALL@
   15: INSTALL_PROGRAM = @INSTALL_PROGRAM@
   16: INSTALL_DATA = @INSTALL_DATA@
   17: LN_S	= @LN_S@
   18: GCC	= gcc
   19: FORTH	= ./gforth
   20: CC	= gcc
   21: TEXI2DVI = tex
   22: DVI2PS	= dvips
   23: XCFLAGS	= @CFLAGS@
   24: XDEFINES = @DEFS@
   25: SWITCHES = $(XCFLAGS) $(XDEFINES) -D_POSIX_VERSION#-DNDEBUG #turn off assertions
   26: ENGINE_FLAGS =  -fforce-mem -fforce-addr -fomit-frame-pointer -fno-defer-pop -fcaller-saves -DUSE_FTOS
   27: CFLAGS	= -g -O4 -Wall $(SWITCHES)
   28: 
   29: #-Xlinker -n puts text and data into the same 256M region
   30: #John Wavrik should use -Xlinker -N to get a writable text (executable)
   31: LDFLAGS	= -Xlinker -N @LDFLAGS@
   32: LDLIBS	= @LIBS@
   33: 
   34: prefix = @prefix@
   35: exec_prefix = @exec_prefix@
   36: srcdir = @srcdir@
   37: bindir = $(exec_prefix)/bin
   38: #read-only architecture-independent files
   39: datadir = $(prefix)/share
   40: #read-only architecture-dependent non-ascii files
   41: libdir = $(prefix)/lib
   42: infodir = $(prefix)/info
   43: mandir = $(prefix)/man/man1
   44: 
   45: 
   46: INCLUDES = forth.h io.h
   47: 
   48: FORTH_SRC = add.fs assert.fs ansi.fs blocks.fs bufio.fs checkans.fs \
   49: 	colorize.fs cross.fs debug.fs debugging.fs doskey.fs ds2texi.fs \
   50: 	dumpimage.fs environ.fs errore.fs etags.fs extend.fs filedump.fs \
   51: 	float.fs glocals.fs glosgen.fs gray.fs hash.fs history.fs \
   52: 	kernal.fs locals-test.fs look.fs mach32b.fs mach32l.fs main.fs \
   53: 	other.fs prims2x.fs random.fs search-order.fs see.fs sieve.fs \
   54: 	startup.fs struct.fs tools.fs toolsext.fs tt.fs vars.fs vt100.fs \
   55: 	vt100key.fs wordinfo.fs wordsets.fs
   56: 
   57: SOURCES	= Makefile.in configure.in  config.sub  config.guess \
   58: 	INSTALL README ToDo BUGS model gforth.ds \
   59: 	primitives engine.c main.c io.c \
   60: 	m68k.h mips.h 386.h hppa.h cache.c sparc.h 32bit.h \
   61: 	getopt.c getopt1.c getopt.h \
   62: 	ecvt.c memcmp.c strtol.c strtoul.c memmove.c \
   63: 	makefile.dos io-dos.h configure.bat startup.dos \
   64: 	glosgen.glo glossaries.doc \
   65: 	$(INCLUDES) $(FORTH_SRC)
   66: 
   67: RCS_FILES =  ToDo model high-level
   68: 
   69: GEN = gforth
   70: 
   71: OBJECTS	= engine.o io.o main.o @LIBOBJS@ @getopt_long@
   72: 
   73: # things that need a working forth system to be generated
   74: # this is used for antidependences,
   75: 
   76: FORTH_GEN =  primitives.b primitives.i prim_labels.i aliases.fs kernl32l.fi kernl32b.fi
   77: 
   78: GEN_PRECIOUS = $(FORTH_GEN) gforth.texi gforth.dvi gforth.ps Makefile configure
   79: 
   80: #standards.info recommends this:
   81: .SUFFIXES:
   82: .SUFFIXES: .c .o
   83: 
   84: all:
   85: 	if [ ! -f gforth ]; then $(MAKE) first; fi
   86: 	$(MAKE) more
   87: 
   88: first:	gforth
   89: 
   90: more:	$(FORTH_GEN) gforth
   91: 
   92: #from the gcc Makefile: 
   93: #"Deletion of files made during compilation.
   94: # There are four levels of this:
   95: #   `mostlyclean', `clean', `distclean' and `realclean'.
   96: # `mostlyclean' is useful while working on a particular type of machine.
   97: # It deletes most, but not all, of the files made by compilation.
   98: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
   99: # `clean' deletes everything made by running `make all'.
  100: # `distclean' also deletes the files made by config.
  101: # `realclean' also deletes everything that could be regenerated automatically."
  102: 
  103: clean:		
  104: 		-$(RM) $(GEN) *.o *.s
  105: 
  106: distclean:	clean
  107: 		-$(RM) machine.h gforth.fi config.cache config.log
  108: 
  109: realclean:	distclean
  110: 		-$(RM) $(GEN_PRECIOUS)
  111: 
  112: dist:		$(SOURCES) $(FORTH_GEN)
  113: 		-rm ../gforth-$(VERSION)
  114: 		ln -s `pwd` ../gforth-$(VERSION)
  115: 		echo "" $(SOURCES) $(FORTH_GEN) |\
  116: 			sed -e 's| | gforth-$(VERSION)/|g' |\
  117: 			(cd ..; xargs tar cvf gforth/gforth-$(VERSION).tar)
  118: 		gzip -9 -f gforth-$(VERSION).tar
  119: 		-rm ../gforth-$(VERSION)
  120: 
  121: install:	gforth $(FORTH_SRC) gforth.fi gforth.1 gforth.info
  122: 		$(INSTALL) -d $(bindir) $(mandir) $(infodir) $(libdir)/gforth $(datadir)/gforth	
  123: 		$(INSTALL_PROGRAM) gforth $(bindir)
  124: 		$(INSTALL_DATA) gforth.1 $(mandir)
  125: 		$(INSTALL_DATA) gforth.info $(infodir)
  126: 		$(INSTALL_DATA) gforth.fi $(libdir)/gforth
  127: 		for i in $(FORTH_SRC); do \
  128: 			$(CP) $$i $(datadir)/gforth; \
  129: 			$(LN_S) $(datadir)/gforth/$$i $(libdir)/gforth \
  130: 		done
  131: 		
  132: dvi:		gforth.dvi
  133: 
  134: gforth:	$(OBJECTS)
  135: 		-$(CP) gforth gforth~
  136: 		$(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
  137: 		@MAKE_EXE@
  138: 
  139: kernl32l.fi:	main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
  140: 		errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
  141: 		mach32l.fs $(FORTH_GEN)
  142: 		-$(CP) kernl32l.fi kernl32l.fi~
  143: 		$(FORTH) -e 's" mach32l.fs"' main.fs
  144: 		@LINK_KERNL32L@
  145: 
  146: kernl32b.fi:	main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
  147: 		errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
  148: 		mach32b.fs $(FORTH_GEN)
  149: 		-$(CP) kernl32b.fi kernl32b.fi~
  150: 		$(FORTH) -e 's" mach32b.fs"' main.fs
  151: 		@LINK_KERNL32B@
  152: 
  153: engine.s:	engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
  154: 		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
  155: 
  156: engine.o:	engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
  157: 		$(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c
  158: 
  159: strtoul.o:	strtoul.c strtol.c
  160: 
  161: primitives.b:	primitives
  162: 		m4 primitives >$@ 
  163: 
  164: primitives.i :	primitives.b prims2x.fs
  165: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
  166: 
  167: prim_labels.i :	primitives.b prims2x.fs
  168: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
  169: 
  170: aliases.fs:	primitives.b prims2x.fs
  171: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
  172: 
  173: primitives.fs:	primitives.b prims2x.fs
  174: 		$(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
  175: 
  176: gforth.texi:	gforth.ds primitives.b ds2texi.fs prims2x.fs
  177: 		$(FORTH) ds2texi.fs >$@
  178: 
  179: gforth.dvi:	gforth.texi
  180: 		$(TEXI2DVI) gforth.texi
  181: 
  182: gforth.ps:	gforth.dvi
  183: 		$(DVI2PS) gforth.dvi -o $@
  184: 
  185: # For an explanation of the following Makefile rules, see node
  186: # `Automatic Remaking' in GNU Autoconf documentation.
  187: Makefile: Makefile.in config.status
  188: 	CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  189: config.status: configure
  190: 	./config.status --recheck
  191: configure: configure.in
  192: 	cd $(srcdir) && autoconf
  193: 
  194: #unnecessary and does not work with all makes
  195: #%.s :		%.c $(INCLUDES)
  196: #		$(CC) $(CFLAGS) -S $< -o $@
  197: 
  198: #%.o :		%.s
  199: #		$(CC) $(CFLAGS) -c $< -o $@
  200: 

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