Annotation of gforth/Makefile.in, revision 1.14

1.1       pazsan      1: #Copyright 1992 by the ANSI figForth Development Group
1.9       anton       2: # To change the values of `make' variables: instead of editing Makefiles,
                      3: # (1) if the variable is set in `config.status', edit `config.status'
                      4: #     (which will cause the Makefiles to be regenerated when you run `make');
                      5: # (2) otherwise, pass the desired values on the `make' command line.
1.1       pazsan      6: 
1.9       anton       7: #To do:
                      8: #use $(srcdir) to make compilation in a non-srcdir possible
                      9: 
                     10: VERSION        =0.1alpha#gforth version
                     11: SHELL  = /bin/sh
1.4       pazsan     12: RM     = rm
                     13: CP     = cp
1.9       anton      14: INSTALL        = @INSTALL@
                     15: INSTALL_PROGRAM = @INSTALL_PROGRAM@
                     16: INSTALL_DATA = @INSTALL_DATA@
                     17: LN_S   = @LN_S@
1.1       pazsan     18: GCC    = gcc
1.9       anton      19: FORTH  = ./gforth
1.1       pazsan     20: CC     = gcc
1.9       anton      21: TEXI2DVI = tex
                     22: DVI2PS = dvips
1.11      anton      23: MAKEINFO = makeinfo
1.9       anton      24: XCFLAGS        = @CFLAGS@
                     25: XDEFINES = @DEFS@
1.12      anton      26: SWITCHES = $(XCFLAGS) $(XDEFINES) #-DNDEBUG #turn off assertions
1.10      pazsan     27: ENGINE_FLAGS =  -fforce-mem -fforce-addr -fomit-frame-pointer -fno-defer-pop -fcaller-saves
1.9       anton      28: CFLAGS = -g -O4 -Wall $(SWITCHES)
1.1       pazsan     29: 
                     30: #John Wavrik should use -Xlinker -N to get a writable text (executable)
1.14    ! anton      31: LDFLAGS        =  @LDFLAGS@ @GCCLDFLAGS@
1.9       anton      32: LDLIBS = @LIBS@
                     33: 
                     34: prefix = @prefix@
                     35: exec_prefix = @exec_prefix@
                     36: srcdir = @srcdir@
                     37: bindir = $(exec_prefix)/bin
                     38: #read-only architecture-independent files
                     39: datadir = $(prefix)/share
                     40: #read-only architecture-dependent non-ascii files
                     41: libdir = $(prefix)/lib
                     42: infodir = $(prefix)/info
                     43: mandir = $(prefix)/man/man1
1.1       pazsan     44: 
                     45: 
                     46: INCLUDES = forth.h io.h
                     47: 
1.6       pazsan     48: FORTH_SRC = add.fs assert.fs ansi.fs blocks.fs bufio.fs checkans.fs \
                     49:        colorize.fs cross.fs debug.fs debugging.fs doskey.fs ds2texi.fs \
                     50:        dumpimage.fs environ.fs errore.fs etags.fs extend.fs filedump.fs \
                     51:        float.fs glocals.fs glosgen.fs gray.fs hash.fs history.fs \
1.13      pazsan     52:        kernal.fs locals-test.fs look.fs main.fs \
                     53:        mach16b.fs mach16l.fs mach32b.fs mach32l.fs mach64b.fs mach64l.fs \
1.6       pazsan     54:        other.fs prims2x.fs random.fs search-order.fs see.fs sieve.fs \
                     55:        startup.fs struct.fs tools.fs toolsext.fs tt.fs vars.fs vt100.fs \
                     56:        vt100key.fs wordinfo.fs wordsets.fs
1.1       pazsan     57: 
1.14    ! anton      58: SOURCES        = CVS Makefile.in configure.in configure config.sub  config.guess \
        !            59:        install-sh INSTALL README ToDo BUGS model gforth.ds \
1.6       pazsan     60:        primitives engine.c main.c io.c \
1.14    ! anton      61:        m68k.h mips.h 386.h hppa.h cache.c sparc.h power.h 32bit.h \
        !            62:        getopt.c getopt1.c getopt.h select.c \
1.9       anton      63:        ecvt.c memcmp.c strtol.c strtoul.c memmove.c \
1.7       pazsan     64:        makefile.dos io-dos.h configure.bat startup.dos \
1.6       pazsan     65:        glosgen.glo glossaries.doc \
1.1       pazsan     66:        $(INCLUDES) $(FORTH_SRC)
                     67: 
1.5       anton      68: RCS_FILES =  ToDo model high-level
1.1       pazsan     69: 
                     70: GEN = gforth
                     71: 
1.9       anton      72: OBJECTS        = engine.o io.o main.o @LIBOBJS@ @getopt_long@
1.1       pazsan     73: 
                     74: # things that need a working forth system to be generated
                     75: # this is used for antidependences,
1.5       anton      76: 
1.10      pazsan     77: FORTH_GEN =  primitives.b primitives.i prim_labels.i aliases.fs @KERNAL@ 
1.5       anton      78: 
1.9       anton      79: GEN_PRECIOUS = $(FORTH_GEN) gforth.texi gforth.dvi gforth.ps Makefile configure
1.1       pazsan     80: 
1.9       anton      81: #standards.info recommends this:
                     82: .SUFFIXES:
                     83: .SUFFIXES: .c .o
                     84: 
1.2       pazsan     85: all:
1.7       pazsan     86:        if [ ! -f gforth ]; then $(MAKE) first; fi
1.2       pazsan     87:        $(MAKE) more
1.1       pazsan     88: 
1.2       pazsan     89: first: gforth
                     90: 
1.3       pazsan     91: more:  $(FORTH_GEN) gforth
1.2       pazsan     92: 
1.1       pazsan     93: #from the gcc Makefile: 
                     94: #"Deletion of files made during compilation.
                     95: # There are four levels of this:
                     96: #   `mostlyclean', `clean', `distclean' and `realclean'.
                     97: # `mostlyclean' is useful while working on a particular type of machine.
                     98: # It deletes most, but not all, of the files made by compilation.
                     99: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
                    100: # `clean' deletes everything made by running `make all'.
                    101: # `distclean' also deletes the files made by config.
                    102: # `realclean' also deletes everything that could be regenerated automatically."
                    103: 
                    104: clean:         
1.4       pazsan    105:                -$(RM) $(GEN) *.o *.s
1.1       pazsan    106: 
                    107: distclean:     clean
1.9       anton     108:                -$(RM) machine.h gforth.fi config.cache config.log
1.1       pazsan    109: 
                    110: realclean:     distclean
1.4       pazsan    111:                -$(RM) $(GEN_PRECIOUS)
1.1       pazsan    112: 
1.9       anton     113: dist:          $(SOURCES) $(FORTH_GEN)
1.10      pazsan    114:                -rm gforth-$(VERSION)
                    115:                ln -s `pwd` gforth-$(VERSION)
1.6       pazsan    116:                echo "" $(SOURCES) $(FORTH_GEN) |\
                    117:                        sed -e 's| | gforth-$(VERSION)/|g' |\
1.10      pazsan    118:                        xargs tar cvf gforth-$(VERSION).tar
1.5       anton     119:                gzip -9 -f gforth-$(VERSION).tar
1.10      pazsan    120:                -rm gforth-$(VERSION)
1.1       pazsan    121: 
1.9       anton     122: install:       gforth $(FORTH_SRC) gforth.fi gforth.1 gforth.info
                    123:                $(INSTALL) -d $(bindir) $(mandir) $(infodir) $(libdir)/gforth $(datadir)/gforth 
                    124:                $(INSTALL_PROGRAM) gforth $(bindir)
                    125:                $(INSTALL_DATA) gforth.1 $(mandir)
1.11      anton     126:                $(INSTALL_DATA) gforth.info* $(infodir)
1.9       anton     127:                $(INSTALL_DATA) gforth.fi $(libdir)/gforth
                    128:                for i in $(FORTH_SRC); do \
                    129:                        $(CP) $$i $(datadir)/gforth; \
                    130:                        $(LN_S) $(datadir)/gforth/$$i $(libdir)/gforth \
                    131:                done
                    132:                
                    133: dvi:           gforth.dvi
1.5       anton     134: 
1.2       pazsan    135: gforth:        $(OBJECTS)
1.4       pazsan    136:                -$(CP) gforth gforth~
1.1       pazsan    137:                $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
1.9       anton     138:                @MAKE_EXE@
1.1       pazsan    139: 
1.13      pazsan    140: kernl16l.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                    141:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
                    142:                mach16l.fs $(FORTH_GEN)
                    143:                -$(CP) kernl16l.fi kernl16l.fi~
                    144:                $(FORTH) -e 's" mach16l.fs"' main.fs
                    145:                @LINK_KERNL16L@
                    146: 
                    147: kernl16b.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                    148:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
                    149:                mach16b.fs $(FORTH_GEN)
                    150:                -$(CP) kernl16b.fi kernl16b.fi~
                    151:                $(FORTH) -e 's" mach16b.fs"' main.fs
                    152:                @LINK_KERNL16B@
                    153: 
1.1       pazsan    154: kernl32l.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                    155:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
                    156:                mach32l.fs $(FORTH_GEN)
1.4       pazsan    157:                -$(CP) kernl32l.fi kernl32l.fi~
1.1       pazsan    158:                $(FORTH) -e 's" mach32l.fs"' main.fs
1.9       anton     159:                @LINK_KERNL32L@
1.1       pazsan    160: 
                    161: kernl32b.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                    162:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
                    163:                mach32b.fs $(FORTH_GEN)
1.4       pazsan    164:                -$(CP) kernl32b.fi kernl32b.fi~
1.1       pazsan    165:                $(FORTH) -e 's" mach32b.fs"' main.fs
1.9       anton     166:                @LINK_KERNL32B@
1.13      pazsan    167: 
                    168: kernl64l.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                    169:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
                    170:                mach64l.fs $(FORTH_GEN)
                    171:                -$(CP) kernl64l.fi kernl64l.fi~
                    172:                $(FORTH) -e 's" mach64l.fs"' main.fs
                    173:                @LINK_KERNL64L@
                    174: 
                    175: kernl64b.fi:   main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
                    176:                errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
                    177:                mach64b.fs $(FORTH_GEN)
                    178:                -$(CP) kernl64b.fi kernl64b.fi~
                    179:                $(FORTH) -e 's" mach64b.fs"' main.fs
                    180:                @LINK_KERNL64B@
1.1       pazsan    181: 
                    182: engine.s:      engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
1.9       anton     183:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
1.1       pazsan    184: 
                    185: engine.o:      engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
1.9       anton     186:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c
                    187: 
                    188: strtoul.o:     strtoul.c strtol.c
1.1       pazsan    189: 
                    190: primitives.b:  primitives
                    191:                m4 primitives >$@ 
                    192: 
                    193: primitives.i : primitives.b prims2x.fs
                    194:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
                    195: 
                    196: prim_labels.i :        primitives.b prims2x.fs
                    197:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
                    198: 
                    199: aliases.fs:    primitives.b prims2x.fs
                    200:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
                    201: 
                    202: primitives.fs: primitives.b prims2x.fs
                    203:                $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
                    204: 
                    205: gforth.texi:   gforth.ds primitives.b ds2texi.fs prims2x.fs
1.4       pazsan    206:                $(FORTH) ds2texi.fs >$@
1.1       pazsan    207: 
                    208: gforth.dvi:    gforth.texi
1.9       anton     209:                $(TEXI2DVI) gforth.texi
1.5       anton     210: 
                    211: gforth.ps:     gforth.dvi
1.9       anton     212:                $(DVI2PS) gforth.dvi -o $@
1.11      anton     213: 
                    214: gforth.info:   gforth.texi
                    215:                -$(MAKEINFO) gforth.texi
1.1       pazsan    216: 
1.9       anton     217: # For an explanation of the following Makefile rules, see node
                    218: # `Automatic Remaking' in GNU Autoconf documentation.
                    219: Makefile: Makefile.in config.status
                    220:        CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
                    221: config.status: configure
                    222:        ./config.status --recheck
                    223: configure: configure.in
                    224:        cd $(srcdir) && autoconf
                    225: 
                    226: #unnecessary and does not work with all makes
                    227: #%.s :         %.c $(INCLUDES)
                    228: #              $(CC) $(CFLAGS) -S $< -o $@
1.1       pazsan    229: 
1.9       anton     230: #%.o :         %.s
                    231: #              $(CC) $(CFLAGS) -c $< -o $@
1.1       pazsan    232: 

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