Annotation of gforth/engine/Makefile.in, revision 1.6
1.6 ! anton 1: #Makefile for the C part of Gforth
1.1 anton 2:
3: #Copyright (C) 1995-1997 Free Software Foundation, Inc.
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
19: #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20:
1.4 jwilke 21: # ------------- gforth version
22:
1.6 ! anton 23: VERSION =@VERSION@
! 24: DOSVERSION=`echo $VERSION|sed 's/\.//g'`
1.4 jwilke 25:
26: # ------------- System specific variables
27:
1.6 ! anton 28: machine=@machine@
1.4 jwilke 29: # this is the type of machine
30: # used to extend the include path with ./arch/$machine
31: # so we could include a machine specific
32: # machine.h file
33:
34: PATHSEP = @PATHSEP@
35:
36: osclass = @OSCLASS@
37:
38: # ------------- Utility programs
1.3 jwilke 39:
1.1 anton 40: SHELL = /bin/sh
41: RM = rm
42: RMTREE = rm -rf
43: CP = cp
44: TAR = tar cf -
45: GCC = @CC@
46: CC = $(GCC)
47: STRIP = strip
1.3 jwilke 48:
1.4 jwilke 49: FORTHPATH = $(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)$(PATHSEP).
1.5 pazsan 50:
51: # ------------ Install Directorys
52:
53: VPATH = @srcdir@
54: prefix = @prefix@
55: exec_prefix = @exec_prefix@
56: srcdir = @srcdir@
57: bindir = $(exec_prefix)/bin
58: #read-only architecture-independent files
59: datadir = $(prefix)/share
60: #read-only architecture-dependent non-ascii files
61: libdir = $(prefix)/lib
62: infodir = $(prefix)/info
63: mandir = $(prefix)/man
64: man1dir= $(mandir)/man1
65: man1ext= .1
1.4 jwilke 66:
67: # ------------- Compiler Flags
1.3 jwilke 68:
1.1 anton 69: XCFLAGS = @CFLAGS@
70: XDEFINES = @DEFS@
71: SWITCHES = $(XCFLAGS) $(XDEFINES)
1.3 jwilke 72: ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves
1.1 anton 73: DEBUGFLAG = @DEBUGFLAG@
1.6 ! anton 74: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
1.4 jwilke 75:
76: #John Wavrik should use -Xlinker -N to get a writable text (executable)
77: XLDFLAGS = @LDFLAGS@
78: GCCLDFLAGS = @GCCLDFLAGS@
79: LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS) $(GCCLDFLAGS)
80: LDLIBS = @LIBS@
1.3 jwilke 81:
1.6 ! anton 82: AOBJECTS = io.o memcmpc.o @LIBOBJS@
1.1 anton 83:
1.3 jwilke 84: OBJECTS = engine.o main.o
85: OBJECTS_DITC = engine-ditc.o main-ditc.o
86:
87: # In engine subdirectory there are (or should be) only files that belong to
88: # our engine, so we can make life easy
1.6 ! anton 89: ENGINE_DEPS = *.c *.h *.i ../arch/$(machine)/*.[ch]
1.1 anton 90:
1.6 ! anton 91: gforth: $(OBJECTS) $(AOBJECTS)
! 92: $(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@
1.1 anton 93:
1.6 ! anton 94: gforth-ditc: $(OBJECTS_DITC) $(AOBJECTS)
! 95: $(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@
1.3 jwilke 96:
97: engine.s: $(ENGINE_DEPS)
98: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
99:
100: engine.o: $(ENGINE_DEPS)
101: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c -o $@
102:
103: engine-ditc.o: $(ENGINE_DEPS)
104: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c engine.c
105:
106: main.o: $(ENGINE_DEPS)
107: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c main.c
108:
109: main-ditc.o: $(ENGINE_DEPS)
110: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c main.c
111:
112: engine: $(OBJECTS) $(OBJECTS0) ;
113:
114: engine_ditc: $(OBJECTS_DITC) $(OBJECTS0) ;
1.2 pazsan 115:
116: #NeXTstep hack
117:
118: termios.o: /usr/lib/libposix.a
1.3 jwilke 119: ar x /usr/lib/libposix.a termios.o
1.6 ! anton 120:
! 121: prim.i: FORCE
! 122: cd ..; $(MAKE) engine/$@
! 123:
! 124: prim_lab.i: FORCE
! 125: cd ..; $(MAKE) engine/$@
! 126:
! 127: #phony targets depend on FORCE; this is more portable than .PHONY
! 128: FORCE:
1.3 jwilke 129:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>