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

1.6       anton       1: #Makefile for the C part of Gforth
1.1       anton       2: 
1.45    ! pazsan      3: #Copyright (C) 1995-2003 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
1.26      anton      19: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
1.1       anton      20: 
1.4       jwilke     21: # ------------- gforth version
                     22: 
1.41      anton      23: VERSION =@PACKAGE_VERSION@
1.6       anton      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
1.19      pazsan     46: CP     = cp -p
1.1       anton      47: TAR    = tar cf -
                     48: GCC    = @CC@
                     49: CC     = $(GCC)
                     50: STRIP  = strip
1.3       jwilke     51: 
1.24      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.37      anton      77: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -O2 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
1.36      anton      78: CFLAGS2        = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -O2 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
1.17      pazsan     79: FORTHKFLAGS= --die-on-signal -p "..$(PATHSEP)$(srcdir)" -i ../$(kernel_fi)
1.11      pazsan     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.44      anton      87: AOBJECTS = io.o signals.o support.o memcmpc.o @LIBOBJS@
1.1       anton      88: 
1.40      anton      89: OBJECTS = engine.o engine2.o main.o
                     90: OBJECTS_NATIVE = engine-native.o engine-native2.o engine-native3.o main-native.o
                     91: OBJECTS_FAST = engine-fast.o engine-fast2.o main-fast.o
1.34      anton      92: OBJECTS_ITC = engine-itc.o main-itc.o
1.29      anton      93: OBJECTS_DITC = engine-ditc.o main-ditc.o
                     94: OBJECTS_PROF = engine-prof.o main-prof.o
1.11      pazsan     95: OBJECTS_FI =  engine.o main-fi.o
1.3       jwilke     96: 
                     97: # In engine subdirectory there are (or should be) only files that belong to
                     98: # our engine, so we can make life easy
1.15      anton      99: DEPS =  config.h *.h $(srcdir)/../arch/$(machine)/*.[h]
1.40      anton     100: ENGINE_DEPS = engine.c $(DEPS) prim_lab.i prim.i
1.43      anton     101: MAIN_DEPS = main.c $(DEPS) prim_superend.i prim_num.i prim_grp.i
1.1       anton     102: 
1.16      anton     103: #some makes don't do the -o $@ correctly, so we help them
                    104: .c.o:
                    105:        $(GCC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
                    106: 
1.10      pazsan    107: gforth$(EXE):  $(OBJECTS) $(AOBJECTS)
1.6       anton     108:        $(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@
1.1       anton     109: 
1.37      anton     110: gforth-native$(EXE):   $(OBJECTS_NATIVE) $(AOBJECTS)
                    111:        $(GCC) $(LDFLAGS) $(OBJECTS_NATIVE) $(AOBJECTS) $(LDLIBS) -o $@
                    112: 
1.18      anton     113: gforth-fast$(EXE):     $(OBJECTS_FAST) $(AOBJECTS)
                    114:        $(GCC) $(LDFLAGS) $(OBJECTS_FAST) $(AOBJECTS) $(LDLIBS) -o $@
                    115: 
1.34      anton     116: gforth-itc$(EXE):      $(OBJECTS_ITC) $(AOBJECTS)
                    117:        $(GCC) $(LDFLAGS) $(OBJECTS_ITC) $(AOBJECTS) $(LDLIBS) -o $@
                    118: 
1.10      pazsan    119: gforth-ditc$(EXE): $(OBJECTS_DITC) $(AOBJECTS)
1.6       anton     120:        $(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@
1.3       jwilke    121: 
1.29      anton     122: gforth-prof$(EXE): $(OBJECTS_PROF) $(AOBJECTS) profile.o
                    123:        $(GCC) $(LDFLAGS) $(OBJECTS_PROF) $(AOBJECTS) profile.o $(LDLIBS) -o $@
                    124: 
1.11      pazsan    125: gforth-fi$(EXE):       $(OBJECTS_FI) $(AOBJECTS)
                    126:        $(GCC) $(LDFLAGS) $(OBJECTS_FI) $(AOBJECTS) $(LDLIBS) -o $@
                    127: 
1.3       jwilke    128: engine.s:      $(ENGINE_DEPS)
1.42      anton     129:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -S $(srcdir)/engine.c
1.3       jwilke    130: 
                    131: engine.o:      $(ENGINE_DEPS)
1.42      anton     132:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -fno-strict-aliasing -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/engine.c
1.40      anton     133: 
                    134: engine2.o:     $(ENGINE_DEPS)
1.42      anton     135:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -fno-strict-aliasing -DGFORTH_DEBUGGING -DENGINE=2 -o $@ -c $(srcdir)/engine.c
1.18      anton     136: 
1.37      anton     137: engine-native.o:$(ENGINE_DEPS)
1.42      anton     138:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DNO_IP -o $@ -c $(srcdir)/engine.c
1.40      anton     139: 
                    140: engine-native2.o:$(ENGINE_DEPS)
1.42      anton     141:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DNO_IP -DENGINE=2 -o $@ -c $(srcdir)/engine.c
1.40      anton     142: 
                    143: engine-native3.o:$(ENGINE_DEPS)
1.42      anton     144:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DNO_IP -DENGINE=3 -o $@ -c $(srcdir)/engine.c
1.37      anton     145: 
1.18      anton     146: engine-fast.o: $(ENGINE_DEPS)
1.42      anton     147:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -o $@ -c $(srcdir)/engine.c
1.40      anton     148: 
                    149: engine-fast2.o:        $(ENGINE_DEPS)
1.42      anton     150:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DENGINE=2 -o $@ -c $(srcdir)/engine.c
1.34      anton     151: 
                    152: engine-itc.o:  $(ENGINE_DEPS)
1.42      anton     153:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DINDIRECT_THREADED -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/engine.c
1.3       jwilke    154: 
                    155: engine-ditc.o: $(ENGINE_DEPS)
1.42      anton     156:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/engine.c
1.3       jwilke    157: 
1.29      anton     158: engine-prof.o: $(ENGINE_DEPS)
1.42      anton     159:                $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -fno-gcse -DVM_PROFILING -o $@ -c $(srcdir)/engine.c
1.29      anton     160: 
1.33      anton     161: main.o:                $(MAIN_DEPS) 
1.18      anton     162:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/main.c
1.37      anton     163: 
                    164: main-native.o: $(MAIN_DEPS) 
                    165:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DNO_IP -o $@ -c $(srcdir)/main.c
1.18      anton     166: 
1.33      anton     167: main-fast.o:   $(MAIN_DEPS) 
1.15      anton     168:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/main.c
1.34      anton     169: 
                    170: main-itc.o:    $(MAIN_DEPS) 
                    171:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DINDIRECT_THREADED -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/main.c
1.3       jwilke    172: 
1.33      anton     173: main-ditc.o:   $(MAIN_DEPS)
1.15      anton     174:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/main.c
1.3       jwilke    175: 
1.33      anton     176: main-prof.o:   $(MAIN_DEPS)
1.29      anton     177:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DVM_PROFILING -o $@ -c $(srcdir)/main.c
                    178: 
1.33      anton     179: main-fi.o:     $(MAIN_DEPS)
1.15      anton     180:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DINCLUDE_IMAGE -o $@ -c $(srcdir)/main.c
1.11      pazsan    181: 
1.28      anton     182: peephole.o:    peephole.c peephole.i $(DEPS)
                    183:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/peephole.c
1.29      anton     184: 
                    185: profile.o:     profile.c profile.i $(DEPS)
                    186:                $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/profile.c
1.3       jwilke    187: 
1.28      anton     188: #The next two rules seem to be superfluous:
                    189: 
                    190: # engine:              $(OBJECTS) $(OBJECTS0) ;
                    191: 
                    192: # engine_ditc: $(OBJECTS_DITC) $(OBJECTS0) ;
1.2       pazsan    193: 
                    194: #NeXTstep hack
                    195: 
                    196: termios.o:     /usr/lib/libposix.a
1.3       jwilke    197:        ar x /usr/lib/libposix.a termios.o
1.6       anton     198: 
1.11      pazsan    199: #duplicated rules to avoid too many recursive make invocations
1.23      jwilke    200: # !! No any forth stuff should be done in ../Makefile.
                    201: # !! I added the dependencies on prim.i and prim_lab.i in the main Makefile, jens
1.11      pazsan    202: 
1.27      anton     203: #I commented out the following rules because they are no longer up-to-date. - anton
1.11      pazsan    204: 
1.27      anton     205: #prim.i:               ../prim.b ../prims2x.fs
                    206: #              $(FORTHK) prims2x.fs -e "s\" ../prim.b\" ' output-c process-file bye" >$@-
                    207: #              $(CP) $@- $@
                    208: #              $(RM) $@-
                    209: #
                    210: #prim_lab.i:   ../prim.b ../prims2x.fs
                    211: #              $(FORTHK) prims2x.fs -e "s\" ../prim.b\" ' output-label process-file bye" >$@-
                    212: #              $(CP) $@- $@
                    213: #              $(RM) $@-
1.11      pazsan    214: 
                    215: config.h:      stamp-h
1.12      anton     216: stamp-h:       config.h.in ../config.status
1.11      pazsan    217:                cd .. && CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status
                    218:                echo timestamp > stamp-h
1.6       anton     219: 
1.11      pazsan    220: image.c:       ../fi2c.fs ../$(include_fi)
                    221:                $(FORTHK) fi2c.fs -e "s\" ../$(include_fi)\" fi2c bye" >$@
1.9       anton     222: 
1.11      pazsan    223: ../$(include_fi):      FORCE
                    224:                cd .. && $(MAKE) $(include_fi)
1.6       anton     225: 
                    226: #phony targets depend on FORCE; this is more portable than .PHONY
                    227: FORCE:
1.3       jwilke    228: 

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