Annotation of gforth/engine/Makefile.in, revision 1.63
1.6 anton 1: #Makefile for the C part of Gforth
1.1 anton 2:
1.59 anton 3: #Copyright (C) 1995,1996,1997,1998,2000,2003,2006 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.49 anton 25: EXE=@EXEEXT@
1.4 jwilke 26:
27: # ------------- System specific variables
28:
1.6 anton 29: machine=@machine@
1.60 pazsan 30: kernel_fi = @kernel_fi@
31: include_fi = @include_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:
1.60 pazsan 41: EC = @EC@
42:
1.4 jwilke 43: # ------------- Utility programs
1.3 jwilke 44:
1.1 anton 45: SHELL = /bin/sh
46: RM = rm
47: RMTREE = rm -rf
1.19 pazsan 48: CP = cp -p
1.1 anton 49: TAR = tar cf -
50: GCC = @CC@
51: CC = $(GCC)
1.63 ! pazsan 52: LD = $(GCC:gcc=ld)
1.1 anton 53: STRIP = strip
1.63 ! pazsan 54: GCCLD = @GCC_LD@
1.3 jwilke 55:
1.24 anton 56: FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)
1.5 pazsan 57:
58: # ------------ Install Directorys
59:
60: VPATH = @srcdir@
61: prefix = @prefix@
62: exec_prefix = @exec_prefix@
63: srcdir = @srcdir@
64: bindir = $(exec_prefix)/bin
65: #read-only architecture-independent files
66: datadir = $(prefix)/share
67: #read-only architecture-dependent non-ascii files
68: libdir = $(prefix)/lib
69: infodir = $(prefix)/info
70: mandir = $(prefix)/man
71: man1dir= $(mandir)/man1
72: man1ext= .1
1.4 jwilke 73:
74: # ------------- Compiler Flags
1.3 jwilke 75:
1.1 anton 76: XCFLAGS = @CFLAGS@
77: XDEFINES = @DEFS@
78: SWITCHES = $(XCFLAGS) $(XDEFINES)
1.54 anton 79: #use -fno-inline to avoid register problems with asinh, atanh on gcc-3.3 on 386
80: ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves -fno-inline
1.1 anton 81: DEBUGFLAG = @DEBUGFLAG@
1.55 anton 82: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -Wall $(SWITCHES) -DDEFAULTPATH='"$(FORTHPATH)"'
83: CFLAGS2 = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -Wall $(SWITCHES) -DDEFAULTPATH='"$(FORTHPATH)"'
1.17 pazsan 84: FORTHKFLAGS= --die-on-signal -p "..$(PATHSEP)$(srcdir)" -i ../$(kernel_fi)
1.11 pazsan 85: FORTHK = ../gforth $(FORTHKFLAGS)
1.60 pazsan 86: FORTH = ../gforth --die-on-signal -p "..$(PATHSEP)$(srcdir)" -i ../gforth.fi
1.4 jwilke 87:
88: #John Wavrik should use -Xlinker -N to get a writable text (executable)
89: XLDFLAGS = @LDFLAGS@
1.8 anton 90: LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS)
1.4 jwilke 91: LDLIBS = @LIBS@
1.3 jwilke 92:
1.62 pazsan 93: AOBJECTS = @signals_o@ support.o @LIBOBJS@
1.1 anton 94:
1.60 pazsan 95: OBJECTS = engine.o @engine2@ main.o
1.40 anton 96: OBJECTS_NATIVE = engine-native.o engine-native2.o engine-native3.o main-native.o
1.60 pazsan 97: OBJECTS_FAST = engine-fast.o @engine_fast2@ main-fast.o
1.34 anton 98: OBJECTS_ITC = engine-itc.o main-itc.o
1.29 anton 99: OBJECTS_DITC = engine-ditc.o main-ditc.o
100: OBJECTS_PROF = engine-prof.o main-prof.o
1.11 pazsan 101: OBJECTS_FI = engine.o main-fi.o
1.3 jwilke 102:
103: # In engine subdirectory there are (or should be) only files that belong to
104: # our engine, so we can make life easy
1.15 anton 105: DEPS = config.h *.h $(srcdir)/../arch/$(machine)/*.[h]
1.60 pazsan 106: ENGINE_DEPS = engine.c $(DEPS) prim_lab.i prim.i @image_i@
1.52 anton 107: MAIN_DEPS = main.c $(DEPS) prim_superend.i prim_num.i prim_grp.i costs.i super2.i
1.56 anton 108: ENGINE_FAST_DEPS = engine.c $(DEPS) prim_lab-fast.i prim-fast.i
109: MAIN_FAST_DEPS = main.c $(DEPS) prim_superend-fast.i prim_num-fast.i prim_grp-fast.i costs-fast.i super2-fast.i
1.1 anton 110:
1.16 anton 111: #some makes don't do the -o $@ correctly, so we help them
112: .c.o:
113: $(GCC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
114:
1.58 anton 115: support.o: support.c config.h forth.h longlong.h
1.48 anton 116:
1.60 pazsan 117: gforth$(EC)$(EXE): $(OBJECTS) $(AOBJECTS)
1.63 ! pazsan 118: $(GCCLD) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@
1.1 anton 119:
1.60 pazsan 120: gforth-native$(EC)$(EXE): $(OBJECTS_NATIVE) $(AOBJECTS)
1.63 ! pazsan 121: $(GCCLD) $(LDFLAGS) $(OBJECTS_NATIVE) $(AOBJECTS) $(LDLIBS) -o $@
1.37 anton 122:
1.60 pazsan 123: gforth-fast$(EC)$(EXE): $(OBJECTS_FAST) $(AOBJECTS)
1.63 ! pazsan 124: $(GCCLD) $(LDFLAGS) $(OBJECTS_FAST) $(AOBJECTS) $(LDLIBS) -o $@
1.18 anton 125:
1.60 pazsan 126: gforth-itc$(EC)$(EXE): $(OBJECTS_ITC) $(AOBJECTS)
1.63 ! pazsan 127: $(GCCLD) $(LDFLAGS) $(OBJECTS_ITC) $(AOBJECTS) $(LDLIBS) -o $@
1.34 anton 128:
1.60 pazsan 129: gforth-ditc$(EC)$(EXE): $(OBJECTS_DITC) $(AOBJECTS)
1.63 ! pazsan 130: $(GCCLD) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@
1.3 jwilke 131:
1.60 pazsan 132: gforth-prof$(EC)$(EXE): $(OBJECTS_PROF) $(AOBJECTS) profile.o
1.63 ! pazsan 133: $(GCCLD) $(LDFLAGS) $(OBJECTS_PROF) $(AOBJECTS) profile.o $(LDLIBS) -o $@
1.29 anton 134:
1.60 pazsan 135: gforth-fi$(EC)$(EXE): $(OBJECTS_FI) $(AOBJECTS)
1.63 ! pazsan 136: $(GCCLD) $(LDFLAGS) $(OBJECTS_FI) $(AOBJECTS) $(LDLIBS) -o $@
1.11 pazsan 137:
1.56 anton 138: engine.s: $(ENGINE_FAST_DEPS)
1.50 anton 139: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -S $(srcdir)/engine.c
1.3 jwilke 140:
141: engine.o: $(ENGINE_DEPS)
1.50 anton 142: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/engine.c
1.40 anton 143:
144: engine2.o: $(ENGINE_DEPS)
1.50 anton 145: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DGFORTH_DEBUGGING -DENGINE=2 -o $@ -c $(srcdir)/engine.c
1.18 anton 146:
1.56 anton 147: engine-native.o:$(ENGINE_FAST_DEPS)
1.50 anton 148: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DNO_IP -o $@ -c $(srcdir)/engine.c
1.40 anton 149:
1.56 anton 150: engine-native2.o:$(ENGINE_FAST_DEPS)
1.50 anton 151: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DNO_IP -DENGINE=2 -o $@ -c $(srcdir)/engine.c
1.40 anton 152:
1.56 anton 153: engine-native3.o:$(ENGINE_FAST_DEPS)
1.50 anton 154: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DNO_IP -DENGINE=3 -o $@ -c $(srcdir)/engine.c
1.37 anton 155:
1.56 anton 156: engine-fast.o: $(ENGINE_FAST_DEPS)
1.50 anton 157: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -o $@ -c $(srcdir)/engine.c
1.40 anton 158:
1.56 anton 159: engine-fast2.o: $(ENGINE_FAST_DEPS)
1.50 anton 160: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DENGINE=2 -o $@ -c $(srcdir)/engine.c
1.34 anton 161:
162: engine-itc.o: $(ENGINE_DEPS)
1.50 anton 163: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DINDIRECT_THREADED -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/engine.c
1.3 jwilke 164:
165: engine-ditc.o: $(ENGINE_DEPS)
1.50 anton 166: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/engine.c
1.3 jwilke 167:
1.29 anton 168: engine-prof.o: $(ENGINE_DEPS)
1.50 anton 169: $(GCC) $(CFLAGS2) $(ENGINE_FLAGS) -DVM_PROFILING -o $@ -c $(srcdir)/engine.c
1.29 anton 170:
1.33 anton 171: main.o: $(MAIN_DEPS)
1.60 pazsan 172: $(GCC) $(CFLAGS) -DGFORTH_DEBUGGING @no_dynamic@ -o $@ -c $(srcdir)/main.c
1.37 anton 173:
1.56 anton 174: main-native.o: $(MAIN_FAST_DEPS)
1.50 anton 175: $(GCC) $(CFLAGS) -DNO_IP -o $@ -c $(srcdir)/main.c
1.18 anton 176:
1.56 anton 177: main-fast.o: $(MAIN_FAST_DEPS)
1.50 anton 178: $(GCC) $(CFLAGS) -o $@ -c $(srcdir)/main.c
1.34 anton 179:
180: main-itc.o: $(MAIN_DEPS)
1.50 anton 181: $(GCC) $(CFLAGS) -DINDIRECT_THREADED -DGFORTH_DEBUGGING -o $@ -c $(srcdir)/main.c
1.3 jwilke 182:
1.33 anton 183: main-ditc.o: $(MAIN_DEPS)
1.50 anton 184: $(GCC) $(CFLAGS) -DDOUBLY_INDIRECT -o $@ -c $(srcdir)/main.c
1.3 jwilke 185:
1.33 anton 186: main-prof.o: $(MAIN_DEPS)
1.50 anton 187: $(GCC) $(CFLAGS) -DVM_PROFILING -o $@ -c $(srcdir)/main.c
1.29 anton 188:
1.33 anton 189: main-fi.o: $(MAIN_DEPS)
1.50 anton 190: $(GCC) $(CFLAGS) -DINCLUDE_IMAGE -o $@ -c $(srcdir)/main.c
1.11 pazsan 191:
1.28 anton 192: peephole.o: peephole.c peephole.i $(DEPS)
1.50 anton 193: $(GCC) $(CFLAGS) -o $@ -c $(srcdir)/peephole.c
1.29 anton 194:
195: profile.o: profile.c profile.i $(DEPS)
1.50 anton 196: $(GCC) $(CFLAGS) -o $@ -c $(srcdir)/profile.c
1.3 jwilke 197:
1.28 anton 198: #The next two rules seem to be superfluous:
199:
200: # engine: $(OBJECTS) $(OBJECTS0) ;
201:
202: # engine_ditc: $(OBJECTS_DITC) $(OBJECTS0) ;
1.2 pazsan 203:
204: #NeXTstep hack
205:
206: termios.o: /usr/lib/libposix.a
1.3 jwilke 207: ar x /usr/lib/libposix.a termios.o
1.6 anton 208:
1.11 pazsan 209: #duplicated rules to avoid too many recursive make invocations
1.23 jwilke 210: # !! No any forth stuff should be done in ../Makefile.
211: # !! I added the dependencies on prim.i and prim_lab.i in the main Makefile, jens
1.11 pazsan 212:
1.27 anton 213: #I commented out the following rules because they are no longer up-to-date. - anton
1.11 pazsan 214:
1.27 anton 215: #prim.i: ../prim.b ../prims2x.fs
216: # $(FORTHK) prims2x.fs -e "s\" ../prim.b\" ' output-c process-file bye" >$@-
217: # $(CP) $@- $@
218: # $(RM) $@-
219: #
220: #prim_lab.i: ../prim.b ../prims2x.fs
221: # $(FORTHK) prims2x.fs -e "s\" ../prim.b\" ' output-label process-file bye" >$@-
222: # $(CP) $@- $@
223: # $(RM) $@-
1.11 pazsan 224:
225: config.h: stamp-h
1.57 pazsan 226: stamp-h: config.h.in ../config.status ../stamp-h.in
1.11 pazsan 227: cd .. && CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status
228: echo timestamp > stamp-h
1.6 anton 229:
1.60 pazsan 230: image.i: ../fi2c.fs ../$(include_fi)
231: $(FORTH) fi2c.fs -e "s\" ../$(include_fi)\" fi2c bye" >$@
1.9 anton 232:
1.11 pazsan 233: ../$(include_fi): FORCE
234: cd .. && $(MAKE) $(include_fi)
1.6 anton 235:
236: #phony targets depend on FORCE; this is more portable than .PHONY
237: FORCE:
1.3 jwilke 238:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>