[gforth] / gforth / Attic / Makefile  

gforth: gforth/Attic/Makefile


1 : anton 1.1 #Copyright 1992 by the ANSI figForth Development Group
2 :    
3 :     RM = echo 'Trying to remove'
4 :     GCC = gcc
5 : anton 1.11 FORTH = gforth
6 : anton 1.1 CC = gcc
7 : pazsan 1.14 SWITCHES = \
8 : pazsan 1.16 -fno-defer-pop -fcaller-saves \
9 :     -DUSE_TOS -DUSE_FTOS -DDEFAULTBIN='"'`pwd`'"' \
10 : anton 1.17 -DDIRECT_THREADED -D_POSIX_VERSION -DUSE_GETOPT #-DNDEBUG #turn off assertions
11 : anton 1.1 CFLAGS = -O4 -Wall -g $(SWITCHES)
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 : pazsan 1.8 LDFLAGS = -g -Xlinker -N
16 : anton 1.3 LDLIBS = -lm
17 : anton 1.1
18 :     EMACS = emacs
19 :    
20 :     INCLUDES = forth.h io.h
21 :    
22 : anton 1.17 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 : anton 1.1
29 :     SOURCES = Makefile primitives primitives2c.el engine.c main.c io.c \
30 : anton 1.19 apollo68k.h decstation.h 386.h hppa.h sparc.h gforth.ds \
31 : anton 1.1 $(INCLUDES) $(FORTH_SRC)
32 :    
33 :     RCS_FILES = $(SOURCES) INSTALL ToDo model high-level
34 :    
35 : anton 1.11 GEN = gforth
36 : anton 1.1
37 : anton 1.17 GEN_PRECIOUS = primitives.i prim_labels.i primitives.b aliases.fs
38 : anton 1.1
39 :     OBJECTS = engine.o io.o main.o
40 :    
41 : anton 1.3 # things that need a working forth system to be generated
42 :     # this is used for antidependences,
43 : anton 1.19 FORTH_GEN = primitives.i prim_labels.i prim_alias.4th \
44 :     kernl32l.fi kernl32b.fi gforth.texi
45 : anton 1.3
46 : anton 1.19 all: gforth
47 : anton 1.1
48 :     #from the gcc Makefile:
49 :     #"Deletion of files made during compilation.
50 :     # There are four levels of this:
51 :     # `mostlyclean', `clean', `distclean' and `realclean'.
52 :     # `mostlyclean' is useful while working on a particular type of machine.
53 :     # It deletes most, but not all, of the files made by compilation.
54 :     # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
55 :     # `clean' deletes everything made by running `make all'.
56 :     # `distclean' also deletes the files made by config.
57 :     # `realclean' also deletes everything that could be regenerated automatically."
58 :    
59 :     clean:
60 : anton 1.19 -rm $(GEN) *.o *.s
61 : anton 1.1
62 :     distclean: clean
63 : anton 1.18 -rm machine.h machine.fs
64 : anton 1.1
65 :     realclean: distclean
66 :     -rm $(GEN_PRECIOUS)
67 :    
68 : anton 1.17 #does not work
69 :     #gforth.tar.gz: $(SOURCES) $(GEN_PRECIOUS) CVS
70 :     # cd ..; tar cvf gforth/gforth.tar gforth/{$^}; gzip -9 gforth/gforth.tar
71 : anton 1.1
72 : anton 1.11 gforth: $(OBJECTS) $(FORTH_GEN)
73 : pazsan 1.14 -cp gforth gforth~
74 : anton 1.1 $(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
75 :    
76 : anton 1.12 kernl32l.fi: main.fs search-order.fs cross.fs aliases.fs vars.fs add.fs \
77 : anton 1.9 errore.fs kernal.fs extend.fs tools.fs toolsext.fs \
78 : pazsan 1.13 mach32l.fs $(FORTH_GEN)
79 : pazsan 1.14 -cp kernl32l.fi kernl32l.fi~
80 : pazsan 1.16 $(FORTH) -e 's" mach32l.fs"' main.fs
81 : anton 1.3
82 : anton 1.12 kernl32b.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 : pazsan 1.13 mach32b.fs $(FORTH_GEN)
85 : pazsan 1.14 -cp kernl32b.fi kernl32b.fi~
86 : pazsan 1.16 $(FORTH) -e 's" mach32b.fs"' main.fs
87 : anton 1.3
88 : anton 1.1 engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
89 :     $(GCC) $(CFLAGS) -S engine.c
90 :    
91 :     engine.o: engine.c primitives.i prim_labels.i machine.h $(INCLUDES)
92 :    
93 :     primitives.b: primitives
94 :     m4 primitives >$@
95 :    
96 : anton 1.3 primitives.i : primitives.b prims2x.fs
97 : pazsan 1.8 $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-c process-file bye" >$@
98 : anton 1.1
99 : anton 1.3 prim_labels.i : primitives.b prims2x.fs
100 : pazsan 1.8 $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-label process-file bye" >$@
101 : anton 1.1
102 : pazsan 1.8 aliases.fs: primitives.b prims2x.fs
103 :     $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-alias process-file bye" >$@
104 : anton 1.1
105 : pazsan 1.16 primitives.fs: primitives.b prims2x.fs
106 :     $(FORTH) prims2x.fs -e "s\" primitives.b\" ' output-forth process-file bye" >$@
107 : anton 1.19
108 :     gforth.texi: gforth.ds primitives.b ds2texi.fs prims2x.fs
109 :     $(FORTH) 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" >$@
110 :    
111 :     gforth.dvi: gforth.texi
112 :     tex gforth.texi
113 : pazsan 1.16
114 : anton 1.3 #primitives.4th: primitives.b primitives2c.el
115 :     # $(EMACS) -batch -load primitives2c.el -funcall make-forth
116 : anton 1.1
117 :     #GNU make default rules
118 : anton 1.12 #% :: RCS/%,v
119 :     # co $@
120 : pazsan 1.16
121 :     %.s : %.c $(INCLUDES)
122 :     $(CC) $(CFLAGS) -S $< -o $@
123 :    
124 :     %.o : %.s
125 :     $(CC) $(CFLAGS) -c $< -o $@
126 : anton 1.12

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help