File:  [gforth] / gforth / Makefile.in
Revision 1.4: download - view: text, annotated - select for diffs
Thu Nov 17 15:55:52 1994 UTC (25 years, 6 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
* Promised, but forgotten Makefile changes

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

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