File:  [gforth] / gforth / Attic / Makefile
Revision 1.17: download - view: text, annotated - select for diffs
Wed Sep 28 17:02:45 1994 UTC (29 years, 6 months ago) by anton
Branches: MAIN
CVS tags: HEAD
Fixed some bugs and eliminated some warnings

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

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