Annotation of gforth/engine/Makefile.in, revision 1.90
1.6 anton 1: #Makefile for the C part of Gforth
1.1 anton 2:
1.90 ! anton 3: #Copyright (C) 1995,1996,1997,1998,2000,2003,2006,2007,2008,2009,2011,2012 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.89 pazsan 23: LIBVERSION=@LIB_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:
1.60 pazsan 39: EC = @EC@
1.88 pazsan 40: ARCH= @ARCH@
1.60 pazsan 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.80 pazsan 50: BOOTFORTH = ../preforth
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.89 pazsan 56: LIBTOOL = @GNU_LIBTOOL@
57: LTLD = $(LIBTOOL) --mode=link $(GCCLD) -rpath $(libdir) -version-info $(LIBVERSION) -module
1.3 jwilke 58:
1.88 pazsan 59: FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth$(ARCH)/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)
1.5 pazsan 60:
1.75 anton 61: # ------------ Source and Build directories
62:
63: top_srcdir = @top_srcdir@
64: top_builddir = @top_builddir@
65:
66: # ------------ Install directories
1.5 pazsan 67:
68: VPATH = @srcdir@
69: prefix = @prefix@
70: exec_prefix = @exec_prefix@
71: srcdir = @srcdir@
1.85 pazsan 72: bindir = @bindir@
1.5 pazsan 73: #read-only architecture-independent files
1.85 pazsan 74: datadir = @datadir@
1.5 pazsan 75: #read-only architecture-dependent non-ascii files
1.85 pazsan 76: libdir = @libdir@
77: infodir = @infodir@
78: mandir = @mandir@
1.5 pazsan 79: man1dir= $(mandir)/man1
80: man1ext= .1
1.4 jwilke 81:
1.75 anton 82: # ------------- ltdl variables
83:
84: LTDLDEPS = @LTDLDEPS@
85: LTDLINCL = @LTDLINCL@
86: LIBLTDL = @LIBLTDL@
87:
1.4 jwilke 88: # ------------- Compiler Flags
1.3 jwilke 89:
1.1 anton 90: XCFLAGS = @CFLAGS@
91: XDEFINES = @DEFS@
1.68 anton 92: SWITCHES = $(XCFLAGS) $(XDEFINES) $(OPTDEFINES)
1.54 anton 93: #use -fno-inline to avoid register problems with asinh, atanh on gcc-3.3 on 386
94: ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves -fno-inline
1.1 anton 95: DEBUGFLAG = @DEBUGFLAG@
1.75 anton 96: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -I. -Wall $(SWITCHES) -DDEFAULTPATH='"$(FORTHPATH)"' $(LTDLINCL)
1.74 anton 97: CPPFLAGS=@CPPFLAGS@
1.17 pazsan 98: FORTHKFLAGS= --die-on-signal -p "..$(PATHSEP)$(srcdir)" -i ../$(kernel_fi)
1.11 pazsan 99: FORTHK = ../gforth $(FORTHKFLAGS)
1.72 pazsan 100: FORTH = $(BOOTFORTH) --die-on-signal
1.4 jwilke 101:
102: #John Wavrik should use -Xlinker -N to get a writable text (executable)
103: XLDFLAGS = @LDFLAGS@
1.8 anton 104: LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS)
1.75 anton 105: LDLIBS = @LIBS@ @LTDL_LDLIBS@
1.3 jwilke 106:
1.70 anton 107: AOBJECTS = @signals_o@ support$(OPT).o @LIBOBJS@ $(OPTOBJECTS)
1.1 anton 108:
1.64 pazsan 109: @MAKEINC@
110:
1.68 anton 111: OBJECTS = engine$(OPT).o @engine2@ main$(OPT).o
112: OBJECTS_NATIVE = engine-native$(OPT).o engine-native2$(OPT).o engine-native3$(OPT).o main-native$(OPT).o
113: OBJECTS_FAST = engine-fast$(OPT).o @engine_fast2@ main-fast$(OPT).o
114: OBJECTS_ITC = engine-itc$(OPT).o main-itc$(OPT).o
115: OBJECTS_DITC = engine-ditc$(OPT).o main-ditc$(OPT).o
116: OBJECTS_PROF = engine-prof$(OPT).o main-prof$(OPT).o
117: OBJECTS_FI = engine$(OPT).o main-fi$(OPT).o
1.3 jwilke 118:
119: # In engine subdirectory there are (or should be) only files that belong to
120: # our engine, so we can make life easy
1.65 anton 121: DEPS = config.h forth.h io.h $(srcdir)/../arch/$(machine)/*.[h]
122: ENGINE_DEPS = engine.c $(DEPS) prim_lab.i prim.i @image_i@ fnmatch.h threaded.h
1.52 anton 123: MAIN_DEPS = main.c $(DEPS) prim_superend.i prim_num.i prim_grp.i costs.i super2.i
1.65 anton 124: ENGINE_FAST_DEPS = engine.c $(DEPS) prim_lab-fast.i prim-fast.i fnmatch.h threaded.h
1.56 anton 125: 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 126:
1.83 anton 127: COMPILE.c = $(GCC) $(CFLAGS) $(CPPFLAGS) -c # simulate BSD sys.mk
1.89 pazsan 128: LIBTOOL.c = $(LIBTOOL) --mode=compile $(COMPILE.c)
129: COMPILER = $(COMPILE.c)
130:
131: %.lo: COMPILER = $(LIBTOOL.c)
1.82 pazsan 132:
1.16 anton 133: #some makes don't do the -o $@ correctly, so we help them
134: .c.o:
1.89 pazsan 135: $(COMPILER) -o $@ $<
136:
137: %.lo: %.c
138: $(COMPILER) -o $@ $<
1.16 anton 139:
1.64 pazsan 140: .s.o:
1.89 pazsan 141: $(COMPILER) -o $@ $<
142:
143: support$(OPT).o support$(OPT).lo: support.c config.h forth.h longlong.h
144: $(COMPILER) -o $@ $(srcdir)/support.c
145:
146: strtol.o strtol.lo: strtol.c ansidecl.h
147:
148: fnmatch.o fnmatch.lo: fnmatch.c fnmatch.h
149:
150: getopt1.o getopt1.lo: getopt1.c getopt.h
151:
152: getopt.o getopt.lo: getopt.c getopt.h
153:
154: GFORTHDEPS = $(AOBJECTS) $(LTDLDEPS) libmain.o
155: GFORTHOBJS = $(AOBJECTS) $(LDLIBS) libmain.o
156:
157: LINKER=$(GCCLD) $(LDFLAGS)
158: %.la: LINKER=$(LTLD) $(LDFLAGS)
159:
160: gforth$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS) $(GFORTHDEPS)
161: $(LINKER) $(OBJECTS) $(GFORTHOBJS) -o $@
162:
163: gforth-native$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS_NATIVE) $(GFORTHDEPS)
164: $(LINKER) $(OBJECTS_NATIVE) $(GFORTHOBJS) -o $@
165:
166: gforth-fast$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS_FAST) $(GFORTHDEPS)
167: $(LINKER) $(OBJECTS_FAST) $(GFORTHOBJS) -o $@
168:
169: gforth-itc$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS_ITC) $(GFORTHDEPS)
170: $(LINKER) $(OBJECTS_ITC) $(GFORTHOBJS) -o $@
171:
172: gforth-ditc$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS_DITC) $(GFORTHDEPS)
173: $(LINKER) $(OBJECTS_DITC) $(GFORTHOBJS) -o $@
174:
175: gforth-prof$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS_PROF) profile$(OPT).o $(GFORTHDEPS)
176: $(LINKER) $(OBJECTS_PROF) $(AOBJECTS) profile$(OPT).o $(LDLIBS) -o $@
1.64 pazsan 177:
1.89 pazsan 178: gforth-fi$(OPT)$(EC)$(ARCH)$(EXE): $(OBJECTS_FI) $(GFORTHDEPS)
179: $(LINKER) $(OBJECTS_FI) $(GFORTHOBJS) -o $@
1.48 anton 180:
1.89 pazsan 181: LIBGFORTHDEPS = $(AOBJECTS:%.o=%.lo) $(LTDLDEPS)
182: LIBGFORTHOBJS = $(AOBJECTS:%.o=%.lo) $(LDLIBS)
1.65 anton 183:
1.89 pazsan 184: libgforth$(EC)$(ARCH).la libgforth$(OPT)$(EC)$(ARCH).la: $(OBJECTS:%.o=%.lo) $(LIBGFORTHDEPS)
185: $(LINKER) $(OBJECTS:%.o=%.lo) $(LIBGFORTHOBJS) -o $@
1.65 anton 186:
1.89 pazsan 187: libgforth-native$(EC)$(ARCH).la libgforth-native$(OPT)$(EC)$(ARCH).la: $(OBJECTS_NATIVE:%.o=%.lo) $(LIBGFORTHDEPS)
188: $(LINKER) $(OBJECTS_NATIVE:%.o=%.lo) $(LIBGFORTHOBJS) -o $@
1.65 anton 189:
1.89 pazsan 190: libgforth-fast$(EC)$(ARCH).la libgforth-fast$(OPT)$(EC)$(ARCH).la: $(OBJECTS_FAST:%.o=%.lo) $(LIBGFORTHDEPS)
191: $(LINKER) $(OBJECTS_FAST:%.o=%.lo) $(LIBGFORTHOBJS) -o $@
1.65 anton 192:
1.89 pazsan 193: libgforth-itc$(EC)$(ARCH).la libgforth-itc$(OPT)$(EC)$(ARCH).la: $(OBJECTS_ITC:%.o=%.lo) $(LIBGFORTHDEPS)
194: $(LINKER) $(OBJECTS_ITC:%.o=%.lo) $(LIBGFORTHOBJS) -o $@
1.1 anton 195:
1.89 pazsan 196: libgforth-ditc$(EC)$(ARCH).la libgforth-ditc$(OPT)$(EC)$(ARCH).la: $(OBJECTS_DITC:%.o=%.lo) $(LIBGFORTHDEPS)
197: $(LINKER) $(OBJECTS_DITC:%.o=%.lo) $(LIBGFORTHOBJS) -o $@
1.37 anton 198:
1.89 pazsan 199: libgforth-prof$(EC)$(ARCH).la libgforth-prof$(OPT)$(EC)$(ARCH).la: $(OBJECTS_PROF:%.o=%.lo) profile$(OPT).o $(LIBGFORTHDEPS)
200: $(LINKER) $(OBJECTS_PROF:%.o=%.lo) $(AOBJECTS) profile$(OPT).o $(LDLIBS) -o $@
1.18 anton 201:
1.89 pazsan 202: libgforth-fi$(EC)$(ARCH).la libgforth-fi$(OPT)$(EC)$(ARCH).la: $(OBJECTS_FI:%.o=%.lo) $(LIBGFORTHDEPS)
203: $(LINKER) $(OBJECTS_FI:%.o=%.lo) $(LIBGFORTHOBJS) -o $@
1.34 anton 204:
1.89 pazsan 205: # executables generated by linking to library
1.3 jwilke 206:
1.89 pazsan 207: libgforth%$(EXE): libgforth%.la libmain.lo
208: $(LTLD) $(LDFLAGS) $(patsubst lib%,-l%,$@) libmain.lo -o $@
1.29 anton 209:
1.89 pazsan 210: libgforth$(EXE): libgforth.la libmain.lo
211: $(LTLD) $(LDFLAGS) $(patsubst lib%,-l%,$@) libmain.lo -o $@
1.11 pazsan 212:
1.56 anton 213: engine.s: $(ENGINE_FAST_DEPS)
1.82 pazsan 214: $(GCC) $(CFLAGS) $(CPPFLAGS) $(ENGINE_FLAGS) -S $(srcdir)/engine.c
1.3 jwilke 215:
1.89 pazsan 216: engine$(OPT).o engine$(OPT).lo: $(ENGINE_DEPS)
217: $(COMPILER) $(ENGINE_FLAGS) -DGFORTH_DEBUGGING -o $@ $(srcdir)/engine.c
1.40 anton 218:
1.89 pazsan 219: engine2$(OPT).o engine2$(OPT).lo: $(ENGINE_DEPS)
220: $(COMPILER) $(ENGINE_FLAGS) -DGFORTH_DEBUGGING -DENGINE=2 -o $@ $(srcdir)/engine.c
1.18 anton 221:
1.89 pazsan 222: engine-native$(OPT).o engine-native$(OPT).lo:$(ENGINE_FAST_DEPS)
223: $(COMPILER) $(ENGINE_FLAGS) -DNO_IP -o $@ $(srcdir)/engine.c
1.40 anton 224:
1.89 pazsan 225: engine-native2$(OPT).o engine-native2$(OPT).lo:$(ENGINE_FAST_DEPS)
226: $(COMPILER) $(ENGINE_FLAGS) -DNO_IP -DENGINE=2 -o $@ $(srcdir)/engine.c
1.40 anton 227:
1.89 pazsan 228: engine-native3$(OPT).o engine-native3$(OPT).lo:$(ENGINE_FAST_DEPS)
229: $(COMPILER) $(ENGINE_FLAGS) -DNO_IP -DENGINE=3 -o $@ $(srcdir)/engine.c
1.37 anton 230:
1.89 pazsan 231: engine-fast$(OPT).o engine-fast$(OPT).lo: $(ENGINE_FAST_DEPS)
232: $(COMPILER) $(ENGINE_FLAGS) -o $@ $(srcdir)/engine.c
1.40 anton 233:
1.89 pazsan 234: engine-fast2$(OPT).o engine-fast2$(OPT).lo: $(ENGINE_FAST_DEPS)
235: $(COMPILER) $(ENGINE_FLAGS) -DENGINE=2 -o $@ $(srcdir)/engine.c
1.34 anton 236:
1.89 pazsan 237: engine-itc$(OPT).o engine-itc$(OPT).lo: $(ENGINE_DEPS)
238: $(COMPILER) $(ENGINE_FLAGS) -DINDIRECT_THREADED -DGFORTH_DEBUGGING -o $@ $(srcdir)/engine.c
1.3 jwilke 239:
1.89 pazsan 240: engine-ditc$(OPT).o engine-ditc$(OPT).lo: $(ENGINE_DEPS)
241: $(COMPILER) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ $(srcdir)/engine.c
1.3 jwilke 242:
1.89 pazsan 243: engine-prof$(OPT).o engine-prof$(OPT).lo: $(ENGINE_DEPS)
244: $(COMPILER) $(ENGINE_FLAGS) -DVM_PROFILING -o $@ $(srcdir)/engine.c
1.29 anton 245:
1.89 pazsan 246: main$(OPT).o main$(OPT).lo: $(MAIN_DEPS)
247: $(COMPILER) -DGFORTH_DEBUGGING @no_dynamic@ -o $@ $(srcdir)/main.c
1.37 anton 248:
1.89 pazsan 249: main-native$(OPT).o main-native$(OPT).lo: $(MAIN_FAST_DEPS)
250: $(COMPILER) -DNO_IP -o $@ $(srcdir)/main.c
1.18 anton 251:
1.89 pazsan 252: main-fast$(OPT).o main-fast$(OPT).lo: $(MAIN_FAST_DEPS)
253: $(COMPILER) -o $@ $(srcdir)/main.c
1.34 anton 254:
1.89 pazsan 255: main-itc$(OPT).o main-itc$(OPT).lo: $(MAIN_DEPS)
256: $(COMPILER) -DINDIRECT_THREADED -DGFORTH_DEBUGGING -o $@ $(srcdir)/main.c
1.3 jwilke 257:
1.89 pazsan 258: main-ditc$(OPT).o main-ditc$(OPT).lo: $(MAIN_DEPS)
259: $(COMPILER) -DDOUBLY_INDIRECT -o $@ $(srcdir)/main.c
1.3 jwilke 260:
1.89 pazsan 261: main-prof$(OPT).o main-prof$(OPT).lo: $(MAIN_DEPS)
262: $(COMPILER) -DVM_PROFILING -o $@ $(srcdir)/main.c
1.29 anton 263:
1.89 pazsan 264: main-fi$(OPT).o main-fi$(OPT).lo: $(MAIN_DEPS)
265: $(COMPILER) -DINCLUDE_IMAGE -o $@ $(srcdir)/main.c
1.11 pazsan 266:
1.89 pazsan 267: peephole$(OPT).o peephole$(OPT).lo: peephole.c peephole.i $(DEPS)
268: $(COMPILER) -o $@ $(srcdir)/peephole.c
1.29 anton 269:
1.89 pazsan 270: profile$(OPT).o profile$(OPT).lo: profile.c profile.i $(DEPS)
271: $(COMPILER) -o $@ $(srcdir)/profile.c
1.3 jwilke 272:
1.28 anton 273: #The next two rules seem to be superfluous:
274:
275: # engine: $(OBJECTS) $(OBJECTS0) ;
276:
277: # engine_ditc: $(OBJECTS_DITC) $(OBJECTS0) ;
1.2 pazsan 278:
279: #NeXTstep hack
280:
1.69 anton 281: termios.o: /usr/lib/libposix.a
282: ar x /usr/lib/libposix.a termios.o
1.6 anton 283:
1.11 pazsan 284: config.h: stamp-h
1.57 pazsan 285: stamp-h: config.h.in ../config.status ../stamp-h.in
1.11 pazsan 286: cd .. && CONFIG_FILES=$@ CONFIG_HEADERS=engine/config.h ./config.status
287: echo timestamp > stamp-h
1.6 anton 288:
1.71 anton 289: Makefile: Makefile.in ../config.status ../configure.in
1.73 pazsan 290: cd .. && $(MAKE) engine/Makefile.in
1.71 anton 291:
1.60 pazsan 292: image.i: ../fi2c.fs ../$(include_fi)
1.72 pazsan 293: $(BOOTFORTH) ../fi2c.fs -e "s\" ../$(include_fi)\" fi2c bye" >$@
1.9 anton 294:
1.11 pazsan 295: ../$(include_fi): FORCE
296: cd .. && $(MAKE) $(include_fi)
1.6 anton 297:
298: #phony targets depend on FORCE; this is more portable than .PHONY
299: FORCE:
1.3 jwilke 300:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>