Annotation of gforth/engine/Makefile.in, revision 1.8
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.7 anton 49: FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)
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@
1.8 ! anton 78: LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS)
1.4 jwilke 79: LDLIBS = @LIBS@
1.3 jwilke 80:
1.6 anton 81: AOBJECTS = io.o memcmpc.o @LIBOBJS@
1.1 anton 82:
1.3 jwilke 83: OBJECTS = engine.o main.o
84: OBJECTS_DITC = engine-ditc.o main-ditc.o
85:
86: # In engine subdirectory there are (or should be) only files that belong to
87: # our engine, so we can make life easy
1.6 anton 88: ENGINE_DEPS = *.c *.h *.i ../arch/$(machine)/*.[ch]
1.1 anton 89:
1.6 anton 90: gforth: $(OBJECTS) $(AOBJECTS)
91: $(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@
1.1 anton 92:
1.6 anton 93: gforth-ditc: $(OBJECTS_DITC) $(AOBJECTS)
94: $(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@
1.3 jwilke 95:
96: engine.s: $(ENGINE_DEPS)
97: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
98:
99: engine.o: $(ENGINE_DEPS)
100: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c -o $@
101:
102: engine-ditc.o: $(ENGINE_DEPS)
103: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c engine.c
104:
105: main.o: $(ENGINE_DEPS)
106: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c main.c
107:
108: main-ditc.o: $(ENGINE_DEPS)
109: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c main.c
110:
111: engine: $(OBJECTS) $(OBJECTS0) ;
112:
113: engine_ditc: $(OBJECTS_DITC) $(OBJECTS0) ;
1.2 pazsan 114:
115: #NeXTstep hack
116:
117: termios.o: /usr/lib/libposix.a
1.3 jwilke 118: ar x /usr/lib/libposix.a termios.o
1.6 anton 119:
120: prim.i: FORCE
121: cd ..; $(MAKE) engine/$@
122:
123: prim_lab.i: FORCE
124: cd ..; $(MAKE) engine/$@
125:
126: #phony targets depend on FORCE; this is more portable than .PHONY
127: FORCE:
1.3 jwilke 128:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>