Annotation of gforth/Makefile, revision 1.17

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 \
                     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: 
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.12      anton      43: FORTH_GEN = primitives.i prim_labels.i prim_alias.4th kernl32l.fi kernl32b.fi
1.3       anton      44: 
1.11      anton      45: all:   gforth aliases.fs
1.1       anton      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: 
1.17    ! anton      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
1.1       anton      70: 
1.11      anton      71: gforth:        $(OBJECTS) $(FORTH_GEN)
1.14      pazsan     72:                -cp gforth gforth~
1.1       anton      73:                $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
                     74: 
1.12      anton      75: kernl32l.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
1.9       anton      76:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
1.13      pazsan     77:                mach32l.fs $(FORTH_GEN)
1.14      pazsan     78:                -cp kernl32l.fi kernl32l.fi~
1.16      pazsan     79:                $(FORTH) -e 's" mach32l.fs"' main.fs
1.3       anton      80: 
1.12      anton      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 \
1.13      pazsan     83:                mach32b.fs $(FORTH_GEN)
1.14      pazsan     84:                -cp kernl32b.fi kernl32b.fi~
1.16      pazsan     85:                $(FORTH) -e 's" mach32b.fs"' main.fs
1.3       anton      86: 
1.1       anton      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: 
1.3       anton      95: primitives.i : primitives.b prims2x.fs
1.8       pazsan     96:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
1.1       anton      97: 
1.3       anton      98: prim_labels.i :        primitives.b prims2x.fs
1.8       pazsan     99:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
1.1       anton     100: 
1.8       pazsan    101: aliases.fs:    primitives.b prims2x.fs
                    102:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
1.1       anton     103: 
1.16      pazsan    104: primitives.fs: primitives.b prims2x.fs
                    105:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
                    106: 
1.3       anton     107: #primitives.4th:       primitives.b primitives2c.el
                    108: #              $(EMACS) -batch -load primitives2c.el -funcall make-forth
1.1       anton     109: 
                    110: #GNU make default rules
1.12      anton     111: #% ::          RCS/%,v
                    112: #              co $@
1.16      pazsan    113: 
                    114: %.s :          %.c $(INCLUDES)
                    115:                $(CC) $(CFLAGS) -S $< -o $@
                    116: 
                    117: %.o :          %.s
                    118:                $(CC) $(CFLAGS) -c $< -o $@
1.12      anton     119: 

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