Annotation of gforth/engine/Makefile.in, revision 1.10
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.10 ! pazsan 25: EXE=@EXE@
1.4 jwilke 26:
27: # ------------- System specific variables
28:
1.6 anton 29: machine=@machine@
1.4 jwilke 30: # this is the type of machine
31: # used to extend the include path with ./arch/$machine
32: # so we could include a machine specific
33: # machine.h file
34:
35: PATHSEP = @PATHSEP@
36:
37: osclass = @OSCLASS@
38:
39: # ------------- Utility programs
1.3 jwilke 40:
1.1 anton 41: SHELL = /bin/sh
42: RM = rm
43: RMTREE = rm -rf
44: CP = cp
45: TAR = tar cf -
46: GCC = @CC@
47: CC = $(GCC)
48: STRIP = strip
1.3 jwilke 49:
1.7 anton 50: FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(datadir)/gforth/site-forth$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION)
1.5 pazsan 51:
52: # ------------ Install Directorys
53:
54: VPATH = @srcdir@
55: prefix = @prefix@
56: exec_prefix = @exec_prefix@
57: srcdir = @srcdir@
58: bindir = $(exec_prefix)/bin
59: #read-only architecture-independent files
60: datadir = $(prefix)/share
61: #read-only architecture-dependent non-ascii files
62: libdir = $(prefix)/lib
63: infodir = $(prefix)/info
64: mandir = $(prefix)/man
65: man1dir= $(mandir)/man1
66: man1ext= .1
1.4 jwilke 67:
68: # ------------- Compiler Flags
1.3 jwilke 69:
1.1 anton 70: XCFLAGS = @CFLAGS@
71: XDEFINES = @DEFS@
72: SWITCHES = $(XCFLAGS) $(XDEFINES)
1.3 jwilke 73: ENGINE_FLAGS = @ENGINE_FLAGS@ -fno-defer-pop -fcaller-saves
1.1 anton 74: DEBUGFLAG = @DEBUGFLAG@
1.6 anton 75: CFLAGS = $(DEBUGFLAG) -I$(srcdir)/../arch/$(machine) -O4 -Wall $(SWITCHES) -DDEFAULTPATH=\"$(FORTHPATH)\"
1.4 jwilke 76:
77: #John Wavrik should use -Xlinker -N to get a writable text (executable)
78: XLDFLAGS = @LDFLAGS@
1.8 anton 79: LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS)
1.4 jwilke 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.9 anton 89: DEPS = config.h *.h ../arch/$(machine)/*.[h]
90: ENGINE_DEPS = engine.c $(DEPS) prim_lab.i prim.i
1.1 anton 91:
1.10 ! pazsan 92: gforth$(EXE): $(OBJECTS) $(AOBJECTS)
1.6 anton 93: $(GCC) $(LDFLAGS) $(OBJECTS) $(AOBJECTS) $(LDLIBS) -o $@
1.1 anton 94:
1.10 ! pazsan 95: gforth-ditc$(EXE): $(OBJECTS_DITC) $(AOBJECTS)
1.6 anton 96: $(GCC) $(LDFLAGS) $(OBJECTS_DITC) $(AOBJECTS) $(LDLIBS) -o $@
1.3 jwilke 97:
98: engine.s: $(ENGINE_DEPS)
99: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -S engine.c
100:
101: engine.o: $(ENGINE_DEPS)
102: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -c engine.c -o $@
103:
104: engine-ditc.o: $(ENGINE_DEPS)
105: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c engine.c
106:
1.9 anton 107: main.o: main.c $(DEPS)
1.3 jwilke 108: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -o $@ -c main.c
109:
1.9 anton 110: main-ditc.o: main.c $(DEPS)
1.3 jwilke 111: $(GCC) $(CFLAGS) $(ENGINE_FLAGS) -DDOUBLY_INDIRECT -o $@ -c main.c
112:
113: engine: $(OBJECTS) $(OBJECTS0) ;
114:
115: engine_ditc: $(OBJECTS_DITC) $(OBJECTS0) ;
1.2 pazsan 116:
117: #NeXTstep hack
118:
119: termios.o: /usr/lib/libposix.a
1.3 jwilke 120: ar x /usr/lib/libposix.a termios.o
1.6 anton 121:
122: prim.i: FORCE
123: cd ..; $(MAKE) engine/$@
124:
125: prim_lab.i: FORCE
126: cd ..; $(MAKE) engine/$@
1.9 anton 127:
128: config.h: FORCE
129: cd .. && $(MAKE) engine/$@
1.6 anton 130:
131: #phony targets depend on FORCE; this is more portable than .PHONY
132: FORCE:
1.3 jwilke 133:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>