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