| 1 : |
anton
|
1.1
|
#$Id: Makefile,v 1.10 1993/11/19 17:56:45 anton Exp $ |
| 2 : |
|
|
#Copyright 1992 by the ANSI figForth Development Group |
| 3 : |
|
|
|
| 4 : |
|
|
RM = echo 'Trying to remove' |
| 5 : |
|
|
GCC = gcc |
| 6 : |
|
|
CC = gcc |
| 7 : |
|
|
SWITCHES = -DUSE_TOS -DUSE_FTOS # -DDIRECT_THREADED |
| 8 : |
|
|
CFLAGS = -O4 -Wall -g $(SWITCHES) |
| 9 : |
|
|
|
| 10 : |
|
|
#-Xlinker -n puts text and data into the same 256M region |
| 11 : |
|
|
#John Wavrik should use -Xlinker -N to get a writable text (executable) |
| 12 : |
|
|
LDFLAGS = -g # -Xlinker -N |
| 13 : |
|
|
LDLIBS = -lm -lmalloc |
| 14 : |
|
|
|
| 15 : |
|
|
EMACS = emacs |
| 16 : |
|
|
|
| 17 : |
|
|
INCLUDES = forth.h io.h |
| 18 : |
|
|
|
| 19 : |
|
|
FORTH_SRC = cross.fs debug.fs environ.fs errore.fs extend.fs \ |
| 20 : |
|
|
filedump.fs glosgen.fs kernal.fs look.fs machine32b.fs \ |
| 21 : |
|
|
machine32l.fs main.fs other.fs search-order.fs see.fs sieve.fs \ |
| 22 : |
|
|
struct.fs tools.fs toolsext.fs vars.fs wordinfo.fs |
| 23 : |
|
|
|
| 24 : |
|
|
SOURCES = Makefile primitives primitives2c.el engine.c main.c io.c \ |
| 25 : |
|
|
apollo68k.h decstation.h 386.h hppa.h sparc.h \ |
| 26 : |
|
|
$(INCLUDES) $(FORTH_SRC) |
| 27 : |
|
|
|
| 28 : |
|
|
RCS_FILES = $(SOURCES) INSTALL ToDo model high-level |
| 29 : |
|
|
|
| 30 : |
|
|
GEN = ansforth |
| 31 : |
|
|
|
| 32 : |
|
|
GEN_PRECIOUS = primitives.i prim_labels.i primitives.b |
| 33 : |
|
|
|
| 34 : |
|
|
OBJECTS = engine.o io.o main.o |
| 35 : |
|
|
|
| 36 : |
|
|
all: ansforth aliases.fs |
| 37 : |
|
|
|
| 38 : |
|
|
#from the gcc Makefile: |
| 39 : |
|
|
#"Deletion of files made during compilation. |
| 40 : |
|
|
# There are four levels of this: |
| 41 : |
|
|
# `mostlyclean', `clean', `distclean' and `realclean'. |
| 42 : |
|
|
# `mostlyclean' is useful while working on a particular type of machine. |
| 43 : |
|
|
# It deletes most, but not all, of the files made by compilation. |
| 44 : |
|
|
# It does not delete libgcc.a or its parts, so it won't have to be recompiled. |
| 45 : |
|
|
# `clean' deletes everything made by running `make all'. |
| 46 : |
|
|
# `distclean' also deletes the files made by config. |
| 47 : |
|
|
# `realclean' also deletes everything that could be regenerated automatically." |
| 48 : |
|
|
|
| 49 : |
|
|
clean: |
| 50 : |
|
|
-rm $(GEN) |
| 51 : |
|
|
|
| 52 : |
|
|
distclean: clean |
| 53 : |
|
|
-rm machine.h |
| 54 : |
|
|
|
| 55 : |
|
|
realclean: distclean |
| 56 : |
|
|
-rm $(GEN_PRECIOUS) |
| 57 : |
|
|
|
| 58 : |
|
|
current: $(RCS_FILES) |
| 59 : |
|
|
|
| 60 : |
|
|
ansforth: $(OBJECTS) |
| 61 : |
|
|
$(GCC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@ |
| 62 : |
|
|
|
| 63 : |
|
|
engine.s: engine.c primitives.i prim_labels.i machine.h $(INCLUDES) |
| 64 : |
|
|
$(GCC) $(CFLAGS) -S engine.c |
| 65 : |
|
|
|
| 66 : |
|
|
engine.o: engine.c primitives.i prim_labels.i machine.h $(INCLUDES) |
| 67 : |
|
|
|
| 68 : |
|
|
primitives.b: primitives |
| 69 : |
|
|
m4 primitives >$@ |
| 70 : |
|
|
|
| 71 : |
|
|
primitives.i : primitives.b primitives2c.el |
| 72 : |
|
|
$(EMACS) -batch -load primitives2c.el -funcall make-c |
| 73 : |
|
|
|
| 74 : |
|
|
prim_labels.i : primitives.b primitives2c.el |
| 75 : |
|
|
$(EMACS) -batch -load primitives2c.el -funcall make-list |
| 76 : |
|
|
|
| 77 : |
|
|
prim_alias.4th: primitives.b primitives2c.el |
| 78 : |
|
|
$(EMACS) -batch -load primitives2c.el -funcall make-alias |
| 79 : |
|
|
|
| 80 : |
|
|
aliases.fs: prim_alias.4th |
| 81 : |
|
|
-$(GCC) -E -P -x c-header prim_alias.4th >$@ |
| 82 : |
|
|
|
| 83 : |
|
|
primitives.4th: primitives.b primitives2c.el |
| 84 : |
|
|
$(EMACS) -batch -load primitives2c.el -funcall make-forth |
| 85 : |
|
|
|
| 86 : |
|
|
#GNU make default rules |
| 87 : |
|
|
% :: RCS/%,v |
| 88 : |
|
|
co $@ |
| 89 : |
|
|
%.o : %.c $(INCLUDES) |
| 90 : |
|
|
$(CC) $(CFLAGS) -c $< -o $@ |