Annotation of gforth/Makefile, revision 1.14

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.13      pazsan      8:        -fno-defer-pop -fcaller-saves \
                      9:        -D_POSIX_VERSION -DUSE_TOS -DUSE_FTOS -DDEFAULTBIN='"'`pwd`'"' \
1.14    ! pazsan     10:        #-DDIRECT_THREADED #-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: 
                     22: FORTH_SRC = cross.fs debug.fs environ.fs errore.fs extend.fs \
1.13      pazsan     23:        filedump.fs glosgen.fs kernal.fs look.fs mach32b.fs \
                     24:        mach32l.fs main.fs other.fs search-order.fs see.fs sieve.fs \
1.1       anton      25:        struct.fs tools.fs toolsext.fs vars.fs wordinfo.fs
                     26: 
                     27: SOURCES        = Makefile primitives primitives2c.el engine.c main.c io.c \
                     28:        apollo68k.h decstation.h 386.h hppa.h sparc.h \
                     29:        $(INCLUDES) $(FORTH_SRC)
                     30: 
                     31: RCS_FILES = $(SOURCES) INSTALL ToDo model high-level
                     32: 
1.11      anton      33: GEN = gforth
1.1       anton      34: 
1.3       anton      35: GEN_PRECIOUS = primitives.i prim_labels.i primitives.b prim_alias.4th aliases.fs
1.1       anton      36: 
                     37: OBJECTS = engine.o io.o main.o
                     38: 
1.3       anton      39: # things that need a working forth system to be generated
                     40: # this is used for antidependences,
1.12      anton      41: FORTH_GEN = primitives.i prim_labels.i prim_alias.4th kernl32l.fi kernl32b.fi
1.3       anton      42: 
1.11      anton      43: all:   gforth aliases.fs
1.1       anton      44: 
                     45: #from the gcc Makefile: 
                     46: #"Deletion of files made during compilation.
                     47: # There are four levels of this:
                     48: #   `mostlyclean', `clean', `distclean' and `realclean'.
                     49: # `mostlyclean' is useful while working on a particular type of machine.
                     50: # It deletes most, but not all, of the files made by compilation.
                     51: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
                     52: # `clean' deletes everything made by running `make all'.
                     53: # `distclean' also deletes the files made by config.
                     54: # `realclean' also deletes everything that could be regenerated automatically."
                     55: 
                     56: clean:         
                     57:                -rm $(GEN)
                     58: 
                     59: distclean:     clean
                     60:                -rm machine.h
                     61: 
                     62: realclean:     distclean
                     63:                -rm $(GEN_PRECIOUS)
                     64: 
                     65: current:       $(RCS_FILES)
                     66: 
1.11      anton      67: gforth:        $(OBJECTS) $(FORTH_GEN)
1.14    ! pazsan     68:                -cp gforth gforth~
1.1       anton      69:                $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
                     70: 
1.12      anton      71: kernl32l.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
1.9       anton      72:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
1.13      pazsan     73:                mach32l.fs $(FORTH_GEN)
1.14    ! pazsan     74:                -cp kernl32l.fi kernl32l.fi~
1.13      pazsan     75:                $(FORTH) -e 's" mach32l.fs" r/o open-file throw' main.fs
1.3       anton      76: 
1.12      anton      77: kernl32b.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                     78:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
1.13      pazsan     79:                mach32b.fs $(FORTH_GEN)
1.14    ! pazsan     80:                -cp kernl32b.fi kernl32b.fi~
1.13      pazsan     81:                $(FORTH) -e 's" mach32b.fs" r/o open-file throw' main.fs
1.3       anton      82: 
1.1       anton      83: engine.s:      engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
                     84:                $(GCC) $(CFLAGS) -S engine.c
                     85: 
                     86: engine.o:      engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
                     87: 
                     88: primitives.b:  primitives
                     89:                m4 primitives >$@ 
                     90: 
1.3       anton      91: primitives.i : primitives.b prims2x.fs
1.8       pazsan     92:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
1.1       anton      93: 
1.3       anton      94: prim_labels.i :        primitives.b prims2x.fs
1.8       pazsan     95:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
1.1       anton      96: 
1.8       pazsan     97: aliases.fs:    primitives.b prims2x.fs
                     98:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
1.1       anton      99: 
1.3       anton     100: #primitives.4th:       primitives.b primitives2c.el
                    101: #              $(EMACS) -batch -load primitives2c.el -funcall make-forth
1.1       anton     102: 
                    103: #GNU make default rules
1.12      anton     104: #% ::          RCS/%,v
                    105: #              co $@
                    106: #%.o :         %.c $(INCLUDES)
                    107: #              $(CC) $(CFLAGS) -c $< -o $@
                    108: 

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