Annotation of gforth/Makefile.in, revision 1.3
1.1 pazsan 1: #Copyright 1992 by the ANSI figForth Development Group
2:
3: RM = echo 'Trying to remove'
4: GCC = gcc
5: FORTH = gforth
6: CC = gcc
1.2 pazsan 7: MAKE = gmake
1.1 pazsan 8: XCFLAGS =
9: XDEFINES =
1.2 pazsan 10: SWITCHES = $(XCFLAGS) $(XDEFINES) -DDEFAULTBIN='"'`pwd`'"' #-DNDEBUG #turn off assertions
11: CFLAGS = -O4 -Wall $(SWITCHES)
1.1 pazsan 12:
13: #-Xlinker -n puts text and data into the same 256M region
14: #John Wavrik should use -Xlinker -N to get a writable text (executable)
15: LDFLAGS = -Xlinker -N
1.2 pazsan 16: LDLIBS = -lm
1.1 pazsan 17:
18: EMACS = emacs
19:
20: INCLUDES = forth.h io.h
21:
22: FORTH_SRC = add.fs assert.fs blocks.fs bufio.fs cross.fs debug.fs \
23: debugging.fs environ.fs errore.fs etags.fs extend.fs filedump.fs \
24: float.fs glocals.fs glosgen.fs gray.fs hash.fs kernal.fs \
25: locals-test.fs look.fs mach32b.fs mach32l.fs main.fs other.fs \
26: prims2x.fs search-order.fs see.fs sieve.fs startup.fs struct.fs \
27: test2.fs tools.fs toolsext.fs vars.fs vt100.fs wordinfo.fs
28:
29: SOURCES = Makefile primitives primitives2c.el engine.c main.c io.c \
30: apollo68k.h decstation.h 386.h hppa.h sparc.h gforth.ds \
31: $(INCLUDES) $(FORTH_SRC)
32:
33: RCS_FILES = $(SOURCES) INSTALL ToDo model high-level
34:
35: GEN = gforth
36:
37: GEN_PRECIOUS = primitives.i prim_labels.i primitives.b aliases.fs
38:
39: OBJECTS = engine.o io.o main.o
40:
41: # things that need a working forth system to be generated
42: # this is used for antidependences,
1.2 pazsan 43: FORTH_GEN = primitives.i prim_labels.i aliases.fs \
1.1 pazsan 44: kernl32l.fi kernl32b.fi gforth.texi
45:
1.2 pazsan 46: all:
47: if [ ! -x gforth ]; then $(MAKE) first; fi
48: $(MAKE) more
1.1 pazsan 49:
1.2 pazsan 50: first: gforth
51:
1.3 ! pazsan 52: more: $(FORTH_GEN) gforth
1.2 pazsan 53:
1.1 pazsan 54: #from the gcc Makefile:
55: #"Deletion of files made during compilation.
56: # There are four levels of this:
57: # `mostlyclean', `clean', `distclean' and `realclean'.
58: # `mostlyclean' is useful while working on a particular type of machine.
59: # It deletes most, but not all, of the files made by compilation.
60: # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
61: # `clean' deletes everything made by running `make all'.
62: # `distclean' also deletes the files made by config.
63: # `realclean' also deletes everything that could be regenerated automatically."
64:
65: clean:
66: -rm $(GEN) *.o *.s
67:
68: distclean: clean
69: -rm machine.h machine.fs
70:
71: realclean: distclean
72: -rm $(GEN_PRECIOUS)
73:
74: #does not work
75: #gforth.tar.gz: $(SOURCES) $(GEN_PRECIOUS) CVS
76: # cd ..; tar cvf gforth/gforth.tar gforth/{$^}; gzip -9 gforth/gforth.tar
77:
1.2 pazsan 78: gforth: $(OBJECTS)
1.1 pazsan 79: -cp gforth gforth~
80: $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
81:
82: kernl32l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
83: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
84: mach32l.fs $(FORTH_GEN)
85: -cp kernl32l.fi kernl32l.fi~
86: $(FORTH) -e 's" mach32l.fs"' main.fs
87:
88: kernl32b.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
89: errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
90: mach32b.fs $(FORTH_GEN)
91: -cp kernl32b.fi kernl32b.fi~
92: $(FORTH) -e 's" mach32b.fs"' main.fs
93:
94: engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
95: $(GCC) $(CFLAGS) -S engine.c
96:
97: engine.o: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
98:
99: primitives.b: primitives
100: m4 primitives >$@
101:
102: primitives.i : primitives.b prims2x.fs
103: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
104:
105: prim_labels.i : primitives.b prims2x.fs
106: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
107:
108: aliases.fs: primitives.b prims2x.fs
109: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
110:
111: primitives.fs: primitives.b prims2x.fs
112: $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
113:
114: gforth.texi: gforth.ds primitives.b ds2texi.fs prims2x.fs
115: $(FORTH) -e "warnings off" search-order.fs struct.fs debugging.fs ds2texi.fs prims2x.fs -e "s\" primitives.b\" ' register-doc process-file s\" gforth.ds\" r/o open-file throw ds2texi bye" >$@
116:
117: gforth.dvi: gforth.texi
118: tex gforth.texi
119:
120: #primitives.4th: primitives.b primitives2c.el
121: # $(EMACS) -batch -load primitives2c.el -funcall make-forth
122:
123: #GNU make default rules
124: #% :: RCS/%,v
125: # co $@
126:
127: %.s : %.c $(INCLUDES)
128: $(CC) $(CFLAGS) -S $< -o $@
129:
130: %.o : %.s
131: $(CC) $(CFLAGS) -c $< -o $@
132:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>