Annotation of gforth/Makefile.in, revision 1.4

1.1       pazsan      1: #Copyright 1992 by the ANSI figForth Development Group
                      2: 
1.4     ! pazsan      3: RM     = rm
        !             4: CP     = cp
1.1       pazsan      5: GCC    = gcc
                      6: FORTH  = gforth
                      7: CC     = gcc
1.4     ! pazsan      8: MAKE   = gmake
1.1       pazsan      9: XCFLAGS        =
                     10: XDEFINES       =
1.2       pazsan     11: SWITCHES       = $(XCFLAGS) $(XDEFINES) -DDEFAULTBIN='"'`pwd`'"' #-DNDEBUG #turn off assertions
                     12: CFLAGS = -O4 -Wall $(SWITCHES)
1.1       pazsan     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
1.2       pazsan     17: LDLIBS = -lm
1.1       pazsan     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,
1.2       pazsan     44: FORTH_GEN = primitives.i prim_labels.i aliases.fs \
1.1       pazsan     45:        kernl32l.fi kernl32b.fi gforth.texi
                     46: 
1.2       pazsan     47: all:
                     48:        if [ ! -x gforth ]; then $(MAKE) first; fi
                     49:        $(MAKE) more
1.1       pazsan     50: 
1.2       pazsan     51: first: gforth
                     52: 
1.3       pazsan     53: more:  $(FORTH_GEN) gforth
1.2       pazsan     54: 
1.1       pazsan     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:         
1.4     ! pazsan     67:                -$(RM) $(GEN) *.o *.s
1.1       pazsan     68: 
                     69: distclean:     clean
1.4     ! pazsan     70:                -$(RM) machine.h machine.fs
1.1       pazsan     71: 
                     72: realclean:     distclean
1.4     ! pazsan     73:                -$(RM) $(GEN_PRECIOUS)
1.1       pazsan     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: 
1.2       pazsan     79: gforth:        $(OBJECTS)
1.4     ! pazsan     80:                -$(CP) gforth gforth~
1.1       pazsan     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)
1.4     ! pazsan     86:                -$(CP) kernl32l.fi kernl32l.fi~
1.1       pazsan     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)
1.4     ! pazsan     92:                -$(CP) kernl32b.fi kernl32b.fi~
1.1       pazsan     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
1.4     ! pazsan    116:                $(FORTH) ds2texi.fs >$@
1.1       pazsan    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>