Annotation of gforth/engine/Makefile.in, revision 1.16

1.6       anton       1: #Makefile for the C part of Gforth
1.1       anton       2: 
1.13      anton       3: #Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
1.1       anton       4: 
                      5: #This file is part of Gforth.
                      6: 
                      7: #Gforth is free software; you can redistribute it and/or
                      8: #modify it under the terms of the GNU General Public License
                      9: #as published by the Free Software Foundation; either version 2
                     10: #of the License, or (at your option) any later version.
                     11: 
                     12: #This program is distributed in the hope that it will be useful,
                     13: #but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
                     15: #GNU General Public License for more details.
                     16: 
                     17: #You should have received a copy of the GNU General Public License
                     18: #along with this program; if not, write to the Free Software
                     19: #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     20: 
1.4       jwilke     21: # ------------- gforth version
                     22: 
1.6       anton      23: VERSION =@VERSION@
                     24: DOSVERSION=`echo $VERSION|sed 's/\.//g'`
1.10      pazsan     25: EXE=@EXE@
1.4       jwilke     26: 
                     27: # ------------- System specific variables
                     28: 
1.6       anton      29: machine=@machine@
1.11      pazsan     30: kernel_fi=@kernel_fi@
                     31: include_fi=gforth.fi
1.4       jwilke     32: # this is the type of machine
                     33: # used to extend the include path with ./arch/$machine
                     34: # so we could include a machine specific
                     35: # machine.h file
                     36: 
                     37: PATHSEP = @PATHSEP@
                     38: 
                     39: osclass = @OSCLASS@
                     40: 
                     41: # ------------- Utility programs
1.3       jwilke     42: 
1.1       anton      43: SHELL  = /bin/sh
                     44: RM     = rm
                     45: RMTREE = rm -rf
                     46: CP     = cp
                     47: TAR    = tar cf -
                     48: GCC    = @CC@
                     49: CC     = $(GCC)
                     50: STRIP  = strip
1.3       jwilke     51: 
1.7       anton      52: FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)
1.5       pazsan     53: 
                     54: # ------------ Install Directorys
                     55: 
                     56: VPATH = @srcdir@
                     57: prefix = @prefix@
                     58: exec_prefix = @exec_prefix@
                     59: srcdir = @srcdir@
                     60: bindir = $(exec_prefix)/bin
                     61: #read-only architecture-independent files
                     62: datadir = $(prefix)/share
                     63: #read-only architecture-dependent non-ascii files
                     64: libdir = $(prefix)/lib
                     65: infodir = $(prefix)/info
                     66: mandir = $(prefix)/man
                     67: man1dir= $(mandir)/man1
                     68: man1ext= .1
1.4       jwilke     69: 
                     70: # ------------- Compiler Flags
1.3       jwilke     71: 
1.1       anton      72: XCFLAGS        = @CFLAGS@
                     73: XDEFINES = @DEFS@
                     74: SWITCHES = $(XCFLAGS) $(XDEFINES)
1.3       jwilke     75: ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves
1.1       anton      76: DEBUGFLAG = @DEBUGFLAG@
1.15      anton      77: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
                     78: CFLAGS2        = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
1.11      pazsan     79: FORTHKFLAGS= --die-on-signal -p ..$(PATHSEP)$(srcdir) -i ../$(kernel_fi)
                     80: FORTHK = ../gforth $(FORTHKFLAGS)
1.4       jwilke     81: 
                     82: #John Wavrik should use -Xlinker -N to get a writable text (executable)
                     83: XLDFLAGS = @LDFLAGS@
1.8       anton      84: LDFLAGS =  $(DEBUGFLAG) $(XLDFLAGS)
1.4       jwilke     85: LDLIBS  = @LIBS@
1.3       jwilke     86: 
1.6       anton      87: AOBJECTS = io.o memcmpc.o @LIBOBJS@
1.1       anton      88: 
1.3       jwilke     89: OBJECTS = engine.o main.o
                     90: OBJECTS_DITC =  engine-ditc.o main-ditc.o
1.11      pazsan     91: OBJECTS_FI =  engine.o main-fi.o
1.3       jwilke     92: 
                     93: # In engine subdirectory there are (or should be) only files that belong to
                     94: # our engine, so we can make life easy
1.15      anton      95: DEPS =  config.h *.h $(srcdir)/../arch/$(machine)/*.[h]
1.9       anton      96: ENGINE_DEPS = engine.c $(DEPS) prim_lab.i prim.i
1.1       anton      97: 
1.16    ! anton      98: #some makes don't do the -o $@ correctly, so we help them
        !            99: .c.o:
        !           100:        $(GCC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
        !           101: 
1.10      pazsan    102: gforth$(EXE):  $(OBJECTS) $(AOBJECTS)
1.6       anton     103:        $(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@
1.1       anton     104: 
1.10      pazsan    105: gforth-ditc$(EXE): $(OBJECTS_DITC) $(AOBJECTS)
1.6       anton     106:        $(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@
1.3       jwilke    107: 
1.11      pazsan    108: gforth-fi$(EXE):       $(OBJECTS_FI) $(AOBJECTS)
                    109:        $(GCC) $(LDFLAGS) $(OBJECTS_FI) $(AOBJECTS) $(LDLIBS) -o $@
                    110: 
1.3       jwilke    111: engine.s:      $(ENGINE_DEPS)
1.15      anton     112:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S $(srcdir)/engine.c
1.3       jwilke    113: 
                    114: engine.o:      $(ENGINE_DEPS)
1.15      anton     115:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/engine.c
1.3       jwilke    116: 
                    117: engine-ditc.o: $(ENGINE_DEPS)
1.15      anton     118:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/engine.c
1.3       jwilke    119: 
1.9       anton     120: main.o:                main.c $(DEPS) 
1.15      anton     121:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/main.c
1.3       jwilke    122: 
1.9       anton     123: main-ditc.o:   main.c $(DEPS)
1.15      anton     124:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/main.c
1.3       jwilke    125: 
1.11      pazsan    126: main-fi.o:     main.c $(DEPS)
1.15      anton     127:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DINCLUDE_IMAGE -o $@ -c $(srcdir)/main.c
1.11      pazsan    128: 
1.3       jwilke    129: engine:                $(OBJECTS) $(OBJECTS0) ;
                    130: 
                    131: engine_ditc:   $(OBJECTS_DITC) $(OBJECTS0) ;
1.2       pazsan    132: 
                    133: #NeXTstep hack
                    134: 
                    135: termios.o:     /usr/lib/libposix.a
1.3       jwilke    136:        ar x /usr/lib/libposix.a termios.o
1.6       anton     137: 
1.11      pazsan    138: #duplicated rules to avoid too many recursive make invocations
                    139: 
                    140: prim.i:                ../prim.b ../prims2x.fs
                    141:                $(FORTHK) prims2x.fs -e "s\" ../prim.b\" ' output-c process-file bye" >$@-
                    142:                $(CP) $@- $@
                    143:                $(RM) $@-
                    144: 
                    145: prim_lab.i:    ../prim.b ../prims2x.fs
                    146:                $(FORTHK) prims2x.fs -e "s\" ../prim.b\" ' output-label process-file bye" >$@-
                    147:                $(CP) $@- $@
                    148:                $(RM) $@-
                    149: 
                    150: config.h:      stamp-h
1.12      anton     151: stamp-h:       config.h.in ../config.status
1.11      pazsan    152:                cd .. && CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status
                    153:                echo timestamp > stamp-h
1.6       anton     154: 
1.11      pazsan    155: image.c:       ../fi2c.fs ../$(include_fi)
                    156:                $(FORTHK) fi2c.fs -e "s\" ../$(include_fi)\" fi2c bye" >$@
1.9       anton     157: 
1.11      pazsan    158: ../$(include_fi):      FORCE
                    159:                cd .. && $(MAKE) $(include_fi)
1.6       anton     160: 
                    161: #phony targets depend on FORCE; this is more portable than .PHONY
                    162: FORCE:
1.3       jwilke    163: 

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