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

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

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