Annotation of gforth/Makefile, revision 1.19

1.1       anton       1: #Copyright 1992 by the ANSI figForth Development Group
                      2: 
                      3: RM     = echo 'Trying to remove'
                      4: GCC    = gcc
1.11      anton       5: FORTH  = gforth
1.1       anton       6: CC     = gcc
1.14      pazsan      7: SWITCHES = \
1.16      pazsan      8:        -fno-defer-pop -fcaller-saves \
                      9:        -DUSE_TOS -DUSE_FTOS -DDEFAULTBIN='"'`pwd`'"' \
1.17      anton      10:        -DDIRECT_THREADED -D_POSIX_VERSION -DUSE_GETOPT #-DNDEBUG #turn off assertions
1.1       anton      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)
1.8       pazsan     15: LDFLAGS        = -g -Xlinker -N
1.3       anton      16: LDLIBS = -lm
1.1       anton      17: 
                     18: EMACS  = emacs
                     19: 
                     20: INCLUDES = forth.h io.h
                     21: 
1.17      anton      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
1.1       anton      28: 
                     29: SOURCES        = Makefile primitives primitives2c.el engine.c main.c io.c \
1.19    ! anton      30:        apollo68k.h decstation.h 386.h hppa.h sparc.h gforth.ds \
1.1       anton      31:        $(INCLUDES) $(FORTH_SRC)
                     32: 
                     33: RCS_FILES = $(SOURCES) INSTALL ToDo model high-level
                     34: 
1.11      anton      35: GEN = gforth
1.1       anton      36: 
1.17      anton      37: GEN_PRECIOUS = primitives.i prim_labels.i primitives.b aliases.fs
1.1       anton      38: 
                     39: OBJECTS = engine.o io.o main.o
                     40: 
1.3       anton      41: # things that need a working forth system to be generated
                     42: # this is used for antidependences,
1.19    ! anton      43: FORTH_GEN = primitives.i prim_labels.i prim_alias.4th \
        !            44:        kernl32l.fi kernl32b.fi gforth.texi
1.3       anton      45: 
1.19    ! anton      46: all:   gforth
1.1       anton      47: 
                     48: #from the gcc Makefile: 
                     49: #"Deletion of files made during compilation.
                     50: # There are four levels of this:
                     51: #   `mostlyclean', `clean', `distclean' and `realclean'.
                     52: # `mostlyclean' is useful while working on a particular type of machine.
                     53: # It deletes most, but not all, of the files made by compilation.
                     54: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
                     55: # `clean' deletes everything made by running `make all'.
                     56: # `distclean' also deletes the files made by config.
                     57: # `realclean' also deletes everything that could be regenerated automatically."
                     58: 
                     59: clean:         
1.19    ! anton      60:                -rm $(GEN) *.o *.s
1.1       anton      61: 
                     62: distclean:     clean
1.18      anton      63:                -rm machine.h machine.fs
1.1       anton      64: 
                     65: realclean:     distclean
                     66:                -rm $(GEN_PRECIOUS)
                     67: 
1.17      anton      68: #does not work
                     69: #gforth.tar.gz:        $(SOURCES) $(GEN_PRECIOUS) CVS
                     70: #              cd ..; tar cvf gforth/gforth.tar gforth/{$^}; gzip -9 gforth/gforth.tar
1.1       anton      71: 
1.11      anton      72: gforth:        $(OBJECTS) $(FORTH_GEN)
1.14      pazsan     73:                -cp gforth gforth~
1.1       anton      74:                $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
                     75: 
1.12      anton      76: kernl32l.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
1.9       anton      77:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
1.13      pazsan     78:                mach32l.fs $(FORTH_GEN)
1.14      pazsan     79:                -cp kernl32l.fi kernl32l.fi~
1.16      pazsan     80:                $(FORTH) -e 's" mach32l.fs"' main.fs
1.3       anton      81: 
1.12      anton      82: kernl32b.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                     83:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
1.13      pazsan     84:                mach32b.fs $(FORTH_GEN)
1.14      pazsan     85:                -cp kernl32b.fi kernl32b.fi~
1.16      pazsan     86:                $(FORTH) -e 's" mach32b.fs"' main.fs
1.3       anton      87: 
1.1       anton      88: engine.s:      engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
                     89:                $(GCC) $(CFLAGS) -S engine.c
                     90: 
                     91: engine.o:      engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
                     92: 
                     93: primitives.b:  primitives
                     94:                m4 primitives >$@ 
                     95: 
1.3       anton      96: primitives.i : primitives.b prims2x.fs
1.8       pazsan     97:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
1.1       anton      98: 
1.3       anton      99: prim_labels.i :        primitives.b prims2x.fs
1.8       pazsan    100:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
1.1       anton     101: 
1.8       pazsan    102: aliases.fs:    primitives.b prims2x.fs
                    103:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
1.1       anton     104: 
1.16      pazsan    105: primitives.fs: primitives.b prims2x.fs
                    106:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
1.19    ! anton     107: 
        !           108: gforth.texi:   gforth.ds primitives.b ds2texi.fs prims2x.fs
        !           109:                $(FORTH) search-order.fs struct.fs debugging.fs ds2texi.fs prims2x.fs -e "s\" primitives.b\" ' register-doc process-file s\" gforth.ds\" r/o open-file throw ds2texi bye" >$@
        !           110: 
        !           111: gforth.dvi:    gforth.texi
        !           112:                tex gforth.texi
1.16      pazsan    113: 
1.3       anton     114: #primitives.4th:       primitives.b primitives2c.el
                    115: #              $(EMACS) -batch -load primitives2c.el -funcall make-forth
1.1       anton     116: 
                    117: #GNU make default rules
1.12      anton     118: #% ::          RCS/%,v
                    119: #              co $@
1.16      pazsan    120: 
                    121: %.s :          %.c $(INCLUDES)
                    122:                $(CC) $(CFLAGS) -S $< -o $@
                    123: 
                    124: %.o :          %.s
                    125:                $(CC) $(CFLAGS) -c $< -o $@
1.12      anton     126: 

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