# Makefile for the CLISP binaries
# DO NOT EDIT! GENERATED AUTOMATICALLY!

# -------------- Start of configurable section --------------------

# Directories used by "make install":
prefix = 
exec_prefix = $(prefix)
bindir = $(exec_prefix)\bin
mandir = $(exec_prefix)\man
libdir = $(exec_prefix)\lib
lisplibdir = $(libdir)\lisp

# Programs used by "make":
CC = wcl386
CFLAGS = -3r -oxet -j -zq -w0 -zp4
CPP = wcl386 -p -zq
CLFLAGS = 
LIBS = 
X_LIBS = 
DISASM = wdisasm -au -s
RC = wrc -i=d:\watcom95\h\win

MAKE = make
RM = del
CP = copy
LN = copy
MV = ren
CAT = type
TOUCH = touch
AR = ar
RANLIB = ranlib

# Programs used by "make install":
INSTALL = copy
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

# Programs used by "make distrib":

# formatter for manual page
ROFF_MAN = nroff -man # try "groff -Tascii -mandoc" or "nroff -man"
ROFF_DVI =  # try "groff -Tdvi -mandoc"

# -------------- End of configurable section --------------------

COMMENT5 = comment5
ANSIDECL = ansidecl
DEEMA = deema
TXT2C = txt2c

DFILES = \
spvw.d \
spvwtabf.d \
spvwtabs.d \
spvwtabo.d \
eval.d \
control.d \
pathname.d \
stream.d \
io.d \
array.d \
hashtabl.d \
list.d \
package.d \
record.d \
sequence.d \
charstrg.d \
debug.d \
error.d \
misc.d \
predtype.d \
symbol.d \
lisparit.d \
graph.d \
windows.d \
lispbibl.d \
fsubr.d \
subr.d \
pseudofun.d \
constsym.d \
constobj.d \
msdos.d \
constpack.d \
avl.d \
sort.d \
wintext.d \
winstat.d \
winmain.d \
winaux.d \
aridecl.d \
arilev0.d \
arilev1.d \
intelem.d \
intlog.d \
intplus.d \
intcomp.d \
intbyte.d \
intmal.d \
intdiv.d \
intgcd.d \
int2adic.d \
intsqrt.d \
intprint.d \
intread.d \
rational.d \
sfloat.d \
ffloat.d \
dfloat.d \
lfloat.d \
flo_konv.d \
flo_rest.d \
realelem.d \
realrand.d \
realtran.d \
compelem.d \
comptran.d \
arilev1c.d \
arilev1e.d \
arilev1i.d \
genclisph.d \
modules.d \
noreadline.d \
main.d

CFILES = \
spvw.c \
spvwtabf.c \
spvwtabs.c \
spvwtabo.c \
eval.c \
control.c \
pathname.c \
stream.c \
io.c \
array.c \
hashtabl.c \
list.c \
package.c \
record.c \
sequence.c \
charstrg.c \
debug.c \
error.c \
misc.c \
predtype.c \
symbol.c \
lisparit.c \
graph.c \
windows.c \
lispbibl.c \
fsubr.c \
subr.c \
pseudofun.c \
constsym.c \
constobj.c \
msdos.c \
constpack.c \
avl.c \
sort.c \
wintext.c \
winstat.c \
winmain.c \
winaux.c \
aridecl.c \
arilev0.c \
arilev1.c \
intelem.c \
intlog.c \
intplus.c \
intcomp.c \
intbyte.c \
intmal.c \
intdiv.c \
intgcd.c \
int2adic.c \
intsqrt.c \
intprint.c \
intread.c \
rational.c \
sfloat.c \
ffloat.c \
dfloat.c \
lfloat.c \
flo_konv.c \
flo_rest.c \
realelem.c \
realrand.c \
realtran.c \
compelem.c \
comptran.c \
arilev1c.c \
arilev1e.c \
arilev1i.c \
genclisph.c \
modules.c \
noreadline.c \
main.c

OBJECTS = \
spvw.obj \
spvwtabf.obj \
spvwtabs.obj \
spvwtabo.obj \
eval.obj \
control.obj \
pathname.obj \
stream.obj \
io.obj \
array.obj \
hashtabl.obj \
list.obj \
package.obj \
record.obj \
sequence.obj \
charstrg.obj \
debug.obj \
error.obj \
misc.obj \
predtype.obj \
symbol.obj \
lisparit.obj \
graph.obj \
windows.obj

LSPFILES = \
init.lsp \
defseq.lsp \
backquot.lsp \
defmacro.lsp \
macros1.lsp \
macros2.lsp \
defs1.lsp \
timezone.lsp \
places.lsp \
floatpri.lsp \
type.lsp \
defstruc.lsp \
format.lsp \
user1.lsp \
user2.lsp \
trace.lsp \
macros3.lsp \
config.lsp \
compiler.lsp \
defs2.lsp \
loop.lsp \
clos.lsp \
conditio.lsp \
defs3.lsp \
gstream.lsp \
foreign.lsp \
screen.lsp \
stdwin1.lsp \
stdwin2.lsp \
rexx.lsp \
editor.lsp

FASFILES = \
init.fas \
defseq.fas \
backquot.fas \
defmacro.fas \
macros1.fas \
macros2.fas \
defs1.fas \
timezone.fas \
places.fas \
floatpri.fas \
type.fas \
defstruc.fas \
format.fas \
user1.fas \
user2.fas \
trace.fas \
macros3.fas \
config.fas \
compiler.fas \
defs2.fas \
loop.fas \
clos.fas \
conditio.fas \
defs3.fas \
gstream.fas \
foreign.fas \
screen.fas \
stdwin1.fas \
stdwin2.fas \
rexx.fas \
editor.fas

TXTFILES = \
LISP-tutorial.txt \
CLOS-guide.txt \
cltl2.txt

TESTLSPFILES = \
stage\init.lsp \
stage\defseq.lsp \
stage\backquot.lsp \
stage\defmacro.lsp \
stage\macros1.lsp \
stage\macros2.lsp \
stage\defs1.lsp \
stage\timezone.lsp \
stage\places.lsp \
stage\floatpri.lsp \
stage\type.lsp \
stage\defstruc.lsp \
stage\format.lsp \
stage\user1.lsp \
stage\user2.lsp \
stage\trace.lsp \
stage\macros3.lsp \
stage\config.lsp \
stage\compiler.lsp \
stage\defs2.lsp \
stage\loop.lsp \
stage\clos.lsp \
stage\conditio.lsp \
stage\defs3.lsp \
stage\gstream.lsp \
stage\foreign.lsp \
stage\screen.lsp \
stage\stdwin1.lsp \
stage\stdwin2.lsp \
stage\rexx.lsp \
stage\editor.lsp

TESTFASFILES = \
stage\init.fas \
stage\defseq.fas \
stage\backquot.fas \
stage\defmacro.fas \
stage\macros1.fas \
stage\macros2.fas \
stage\defs1.fas \
stage\timezone.fas \
stage\places.fas \
stage\floatpri.fas \
stage\type.fas \
stage\defstruc.fas \
stage\format.fas \
stage\user1.fas \
stage\user2.fas \
stage\trace.fas \
stage\macros3.fas \
stage\config.fas \
stage\compiler.fas \
stage\defs2.fas \
stage\loop.fas \
stage\clos.fas \
stage\conditio.fas \
stage\defs3.fas \
stage\gstream.fas \
stage\foreign.fas \
stage\screen.fas \
stage\stdwin1.fas \
stage\stdwin2.fas \
stage\rexx.fas \
stage\editor.fas


all : init allc allo lisp.exe interpreted.mem halfcompiled.mem compiled.mem manual


init : comment5.exe ansidecl.exe deema.exe txt2c.exe $(DFILES) modules.h

comment5.exe : ..\utils\comment5.c
	$(CC) $(CFLAGS) ..\utils\comment5.c -fo=comment5.exe

ansidecl.exe : ..\utils\ansidecl.d comment5.exe
	$(LN) ..\utils\ansidecl.d ansidecl.d
	$(COMMENT5) ansidecl.d ansidecl.c
	$(RM) ansidecl.d
	$(CC) $(CFLAGS) ansidecl.c -fo=ansidecl.exe
	$(RM) ansidecl.c

deema.exe : ..\utils\deema.c
	$(CC) $(CFLAGS) ..\utils\deema.c -fo=deema.exe

txt2c.exe : ..\utils\txt2c.c
	$(CC) $(CFLAGS) ..\utils\txt2c.c -fo=txt2c.exe


allc : init $(CFILES)

spvw.c : spvw.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) spvw.d | $(ANSIDECL) | $(DEEMA) > spvw.c

spvwtabf.c : spvwtabf.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) spvwtabf.d | $(ANSIDECL) | $(DEEMA) > spvwtabf.c

spvwtabs.c : spvwtabs.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) spvwtabs.d | $(ANSIDECL) | $(DEEMA) > spvwtabs.c

spvwtabo.c : spvwtabo.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) spvwtabo.d | $(ANSIDECL) | $(DEEMA) > spvwtabo.c

eval.c : eval.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) eval.d | $(ANSIDECL) | $(DEEMA) > eval.c

control.c : control.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) control.d | $(ANSIDECL) | $(DEEMA) > control.c

pathname.c : pathname.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) pathname.d | $(ANSIDECL) | $(DEEMA) > pathname.c

stream.c : stream.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) stream.d | $(ANSIDECL) | $(DEEMA) > stream.c

io.c : io.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) io.d | $(ANSIDECL) | $(DEEMA) > io.c

array.c : array.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) array.d | $(ANSIDECL) | $(DEEMA) > array.c

hashtabl.c : hashtabl.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) hashtabl.d | $(ANSIDECL) | $(DEEMA) > hashtabl.c

list.c : list.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) list.d | $(ANSIDECL) | $(DEEMA) > list.c

package.c : package.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) package.d | $(ANSIDECL) | $(DEEMA) > package.c

record.c : record.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) record.d | $(ANSIDECL) | $(DEEMA) > record.c

sequence.c : sequence.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) sequence.d | $(ANSIDECL) | $(DEEMA) > sequence.c

charstrg.c : charstrg.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) charstrg.d | $(ANSIDECL) | $(DEEMA) > charstrg.c

debug.c : debug.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) debug.d | $(ANSIDECL) | $(DEEMA) > debug.c

error.c : error.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) error.d | $(ANSIDECL) | $(DEEMA) > error.c

misc.c : misc.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) misc.d | $(ANSIDECL) | $(DEEMA) > misc.c

predtype.c : predtype.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) predtype.d | $(ANSIDECL) | $(DEEMA) > predtype.c

symbol.c : symbol.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) symbol.d | $(ANSIDECL) | $(DEEMA) > symbol.c

lisparit.c : lisparit.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) lisparit.d | $(ANSIDECL) | $(DEEMA) > lisparit.c

graph.c : graph.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) graph.d | $(ANSIDECL) | $(DEEMA) > graph.c

windows.c : windows.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) windows.d | $(ANSIDECL) | $(DEEMA) > windows.c

lispbibl.c : lispbibl.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) lispbibl.d | $(ANSIDECL) | $(DEEMA) > lispbibl.c

fsubr.c : fsubr.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) fsubr.d | $(ANSIDECL) | $(DEEMA) > fsubr.c

subr.c : subr.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) subr.d | $(ANSIDECL) | $(DEEMA) > subr.c

pseudofun.c : pseudofun.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) pseudofun.d | $(ANSIDECL) | $(DEEMA) > pseudofun.c

constsym.c : constsym.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) constsym.d | $(ANSIDECL) | $(DEEMA) > constsym.c

constobj.c : constobj.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) constobj.d | $(ANSIDECL) | $(DEEMA) > constobj.c

msdos.c : msdos.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) msdos.d | $(ANSIDECL) | $(DEEMA) > msdos.c

constpack.c : constpack.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) constpack.d | $(ANSIDECL) | $(DEEMA) > constpack.c

avl.c : avl.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) avl.d | $(ANSIDECL) | $(DEEMA) > avl.c

sort.c : sort.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) sort.d | $(ANSIDECL) | $(DEEMA) > sort.c

wintext.c : wintext.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) wintext.d | $(ANSIDECL) | $(DEEMA) > wintext.c

winstat.c : winstat.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) winstat.d | $(ANSIDECL) | $(DEEMA) > winstat.c

winmain.c : winmain.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) winmain.d | $(ANSIDECL) | $(DEEMA) > winmain.c

winaux.c : winaux.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) winaux.d | $(ANSIDECL) | $(DEEMA) > winaux.c

aridecl.c : aridecl.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) aridecl.d | $(ANSIDECL) | $(DEEMA) > aridecl.c

arilev0.c : arilev0.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) arilev0.d | $(ANSIDECL) | $(DEEMA) > arilev0.c

arilev1.c : arilev1.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) arilev1.d | $(ANSIDECL) | $(DEEMA) > arilev1.c

intelem.c : intelem.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intelem.d | $(ANSIDECL) | $(DEEMA) > intelem.c

intlog.c : intlog.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intlog.d | $(ANSIDECL) | $(DEEMA) > intlog.c

intplus.c : intplus.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intplus.d | $(ANSIDECL) | $(DEEMA) > intplus.c

intcomp.c : intcomp.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intcomp.d | $(ANSIDECL) | $(DEEMA) > intcomp.c

intbyte.c : intbyte.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intbyte.d | $(ANSIDECL) | $(DEEMA) > intbyte.c

intmal.c : intmal.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intmal.d | $(ANSIDECL) | $(DEEMA) > intmal.c

intdiv.c : intdiv.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intdiv.d | $(ANSIDECL) | $(DEEMA) > intdiv.c

intgcd.c : intgcd.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intgcd.d | $(ANSIDECL) | $(DEEMA) > intgcd.c

int2adic.c : int2adic.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) int2adic.d | $(ANSIDECL) | $(DEEMA) > int2adic.c

intsqrt.c : intsqrt.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intsqrt.d | $(ANSIDECL) | $(DEEMA) > intsqrt.c

intprint.c : intprint.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intprint.d | $(ANSIDECL) | $(DEEMA) > intprint.c

intread.c : intread.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) intread.d | $(ANSIDECL) | $(DEEMA) > intread.c

rational.c : rational.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) rational.d | $(ANSIDECL) | $(DEEMA) > rational.c

sfloat.c : sfloat.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) sfloat.d | $(ANSIDECL) | $(DEEMA) > sfloat.c

ffloat.c : ffloat.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) ffloat.d | $(ANSIDECL) | $(DEEMA) > ffloat.c

dfloat.c : dfloat.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) dfloat.d | $(ANSIDECL) | $(DEEMA) > dfloat.c

lfloat.c : lfloat.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) lfloat.d | $(ANSIDECL) | $(DEEMA) > lfloat.c

flo_konv.c : flo_konv.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) flo_konv.d | $(ANSIDECL) | $(DEEMA) > flo_konv.c

flo_rest.c : flo_rest.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) flo_rest.d | $(ANSIDECL) | $(DEEMA) > flo_rest.c

realelem.c : realelem.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) realelem.d | $(ANSIDECL) | $(DEEMA) > realelem.c

realrand.c : realrand.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) realrand.d | $(ANSIDECL) | $(DEEMA) > realrand.c

realtran.c : realtran.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) realtran.d | $(ANSIDECL) | $(DEEMA) > realtran.c

compelem.c : compelem.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) compelem.d | $(ANSIDECL) | $(DEEMA) > compelem.c

comptran.c : comptran.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) comptran.d | $(ANSIDECL) | $(DEEMA) > comptran.c

arilev1c.c : arilev1c.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) arilev1c.d | $(ANSIDECL) | $(DEEMA) > arilev1c.c

arilev1e.c : arilev1e.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) arilev1e.d | $(ANSIDECL) | $(DEEMA) > arilev1e.c

arilev1i.c : arilev1i.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) arilev1i.d | $(ANSIDECL) | $(DEEMA) > arilev1i.c

genclisph.c : genclisph.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) genclisph.d | $(ANSIDECL) | $(DEEMA) > genclisph.c

modules.c : modules.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) modules.d | $(ANSIDECL) | $(DEEMA) > modules.c

noreadline.c : noreadline.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) noreadline.d | $(ANSIDECL) | $(DEEMA) > noreadline.c

main.c : main.d comment5.exe ansidecl.exe deema.exe
	$(COMMENT5) main.d | $(ANSIDECL) | $(DEEMA) > main.c

allo : allc spvw.obj spvwtabf.obj spvwtabs.obj spvwtabo.obj eval.obj control.obj pathname.obj stream.obj io.obj array.obj hashtabl.obj list.obj package.obj record.obj sequence.obj charstrg.obj debug.obj error.obj misc.obj predtype.obj symbol.obj lisparit.obj graph.obj windows.obj

alls : allc spvw.s spvwtabf.s spvwtabs.s spvwtabo.s eval.s control.s pathname.s stream.s io.s array.s hashtabl.s list.s package.s record.s sequence.s charstrg.s debug.s error.s misc.s predtype.s symbol.s lisparit.s graph.s windows.s

spvw.i : spvw.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c constpack.c avl.c sort.c arilev0.c aridecl.c version.h
	$(CPP) $(CFLAGS) spvw.c > spvw.i

spvw.s : spvw.obj
	$(DISASM) spvw.obj -l=spvw.s

spvw.obj : spvw.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c constpack.c avl.c sort.c arilev0.c aridecl.c version.h
	$(CC) $(CFLAGS) -c spvw.c

spvwtabf.i : spvwtabf.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) spvwtabf.c > spvwtabf.i

spvwtabf.s : spvwtabf.obj
	$(DISASM) spvwtabf.obj -l=spvwtabf.s

spvwtabf.obj : spvwtabf.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c spvwtabf.c

spvwtabs.i : spvwtabs.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) spvwtabs.c > spvwtabs.i

spvwtabs.s : spvwtabs.obj
	$(DISASM) spvwtabs.obj -l=spvwtabs.s

spvwtabs.obj : spvwtabs.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c spvwtabs.c

spvwtabo.i : spvwtabo.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) spvwtabo.c > spvwtabo.i

spvwtabo.s : spvwtabo.obj
	$(DISASM) spvwtabo.obj -l=spvwtabo.s

spvwtabo.obj : spvwtabo.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c spvwtabo.c

eval.i : eval.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) eval.c > eval.i

eval.s : eval.obj
	$(DISASM) eval.obj -l=eval.s

eval.obj : eval.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c eval.c

control.i : control.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) control.c > control.i

control.s : control.obj
	$(DISASM) control.obj -l=control.s

control.obj : control.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c control.c

pathname.i : pathname.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) pathname.c > pathname.i

pathname.s : pathname.obj
	$(DISASM) pathname.obj -l=pathname.s

pathname.obj : pathname.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c pathname.c

stream.i : stream.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CPP) $(CFLAGS) stream.c > stream.i

stream.s : stream.obj
	$(DISASM) stream.obj -l=stream.s

stream.obj : stream.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CC) $(CFLAGS) -c stream.c

io.i : io.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CPP) $(CFLAGS) io.c > io.i

io.s : io.obj
	$(DISASM) io.obj -l=io.s

io.obj : io.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CC) $(CFLAGS) -c io.c

array.i : array.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CPP) $(CFLAGS) array.c > array.i

array.s : array.obj
	$(DISASM) array.obj -l=array.s

array.obj : array.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CC) $(CFLAGS) -c array.c

hashtabl.i : hashtabl.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c aridecl.c
	$(CPP) $(CFLAGS) hashtabl.c > hashtabl.i

hashtabl.s : hashtabl.obj
	$(DISASM) hashtabl.obj -l=hashtabl.s

hashtabl.obj : hashtabl.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c aridecl.c
	$(CC) $(CFLAGS) -c hashtabl.c

list.i : list.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) list.c > list.i

list.s : list.obj
	$(DISASM) list.obj -l=list.s

list.obj : list.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c list.c

package.i : package.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c constpack.c arilev0.c
	$(CPP) $(CFLAGS) package.c > package.i

package.s : package.obj
	$(DISASM) package.obj -l=package.s

package.obj : package.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c constpack.c arilev0.c
	$(CC) $(CFLAGS) -c package.c

record.i : record.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) record.c > record.i

record.s : record.obj
	$(DISASM) record.obj -l=record.s

record.obj : record.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c record.c

sequence.i : sequence.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) sequence.c > sequence.i

sequence.s : sequence.obj
	$(DISASM) sequence.obj -l=sequence.s

sequence.obj : sequence.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c sequence.c

charstrg.i : charstrg.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) charstrg.c > charstrg.i

charstrg.s : charstrg.obj
	$(DISASM) charstrg.obj -l=charstrg.s

charstrg.obj : charstrg.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c charstrg.c

debug.i : debug.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) debug.c > debug.i

debug.s : debug.obj
	$(DISASM) debug.obj -l=debug.s

debug.obj : debug.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c debug.c

error.i : error.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) error.c > error.i

error.s : error.obj
	$(DISASM) error.obj -l=error.s

error.obj : error.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c error.c

misc.i : misc.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CPP) $(CFLAGS) misc.c > misc.i

misc.s : misc.obj
	$(DISASM) misc.obj -l=misc.s

misc.obj : misc.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CC) $(CFLAGS) -c misc.c

predtype.i : predtype.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) predtype.c > predtype.i

predtype.s : predtype.obj
	$(DISASM) predtype.obj -l=predtype.s

predtype.obj : predtype.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c predtype.c

symbol.i : symbol.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) symbol.c > symbol.i

symbol.s : symbol.obj
	$(DISASM) symbol.obj -l=symbol.s

symbol.obj : symbol.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c symbol.c

lisparit.i : lisparit.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c aridecl.c arilev0.c arilev1.c intelem.c intlog.c intplus.c intcomp.c intbyte.c intmal.c intdiv.c intgcd.c int2adic.c intsqrt.c intprint.c intread.c rational.c sfloat.c ffloat.c dfloat.c lfloat.c flo_konv.c flo_rest.c realelem.c realrand.c realtran.c compelem.c comptran.c arilev1c.c arilev1e.c arilev1i.c
	$(CPP) $(CFLAGS) lisparit.c > lisparit.i

lisparit.s : lisparit.obj
	$(DISASM) lisparit.obj -l=lisparit.s

lisparit.obj : lisparit.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c aridecl.c arilev0.c arilev1.c intelem.c intlog.c intplus.c intcomp.c intbyte.c intmal.c intdiv.c intgcd.c int2adic.c intsqrt.c intprint.c intread.c rational.c sfloat.c ffloat.c dfloat.c lfloat.c flo_konv.c flo_rest.c realelem.c realrand.c realtran.c compelem.c comptran.c arilev1c.c arilev1e.c arilev1i.c
	$(CC) $(CFLAGS) -c lisparit.c

graph.i : graph.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CPP) $(CFLAGS)  graph.c > graph.i

graph.s : graph.obj
	$(DISASM) graph.obj -l=graph.s

graph.obj : graph.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c arilev0.c
	$(CC) $(CFLAGS)  -c graph.c

windows.i : windows.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c wintext.c winstat.c winmain.c winaux.c
	$(CPP) $(CFLAGS) windows.c > windows.i

windows.s : windows.obj
	$(DISASM) windows.obj -l=windows.s

windows.obj : windows.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c wintext.c winstat.c winmain.c winaux.c
	$(CC) $(CFLAGS) -c windows.c

genclisph.i : genclisph.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) genclisph.c > genclisph.i

genclisph.s : genclisph.obj
	$(DISASM) genclisph.obj -l=genclisph.s

genclisph.obj : genclisph.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c genclisph.c

modules.i : modules.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c modules.h
	$(CPP) $(CFLAGS) -DNO_CLISP_H modules.c > modules.i

modules.s : modules.obj
	$(DISASM) modules.obj -l=modules.s

modules.obj : modules.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c modules.h
	$(CC) $(CFLAGS) -DNO_CLISP_H -c modules.c

noreadline.i : noreadline.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) noreadline.c > noreadline.i

noreadline.s : noreadline.obj
	$(DISASM) noreadline.obj -l=noreadline.s

noreadline.obj : noreadline.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c noreadline.c

main.i : main.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CPP) $(CFLAGS) main.c > main.i

main.s : main.obj
	$(DISASM) main.obj -l=main.s

main.obj : main.c lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c
	$(CC) $(CFLAGS) -c main.c

lisp.res : clispwin.rc clispwin.ico clispwin.cur
	$(RC) -r clispwin.rc -fo=lisp.res

lisp.exe : $(OBJECTS) modules.obj   lisp.res
	$(RM) lisp.exe
	$(CC) $(CFLAGS) -l=win386 -fe=lisp -fd=wcclink.lnk
	wlink @wcclink.lnk @wcclink.in
	wbind lisp.exe -R lisp.res
	$(RM) lisp.rex
	$(RM) wcclink.lnk


alllsp : $(LSPFILES)

config.lsp : cfgdos.lsp
	$(CP) cfgdos.lsp config.lsp

interpreted.mem : lisp.exe $(LSPFILES)
	lisp.exe -m 750KW < interpreted.in
	-$(RM) interpreted.mem
	$(MV) lispinit.mem interpreted.mem

init.fas : init.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c init.lsp

defseq.fas : defseq.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c defseq.lsp

backquot.fas : backquot.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c backquot.lsp

defmacro.fas : defmacro.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c defmacro.lsp

macros1.fas : macros1.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c macros1.lsp

macros2.fas : macros2.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c macros2.lsp

defs1.fas : defs1.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c defs1.lsp

timezone.fas : timezone.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c timezone.lsp

places.fas : places.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c places.lsp

floatpri.fas : floatpri.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c floatpri.lsp

type.fas : type.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c type.lsp

defstruc.fas : defstruc.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c defstruc.lsp

format.fas : format.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c format.lsp

user1.fas : user1.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c user1.lsp

user2.fas : user2.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c user2.lsp

trace.fas : trace.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c trace.lsp

macros3.fas : macros3.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c macros3.lsp

config.fas : config.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c config.lsp

compiler.fas : compiler.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c compiler.lsp

defs2.fas : defs2.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c defs2.lsp

loop.fas : loop.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c loop.lsp

clos.fas : clos.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c clos.lsp

conditio.fas : conditio.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c conditio.lsp

defs3.fas : defs3.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c defs3.lsp

gstream.fas : gstream.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c gstream.lsp

foreign.fas : foreign.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c foreign.lsp

screen.fas : screen.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c screen.lsp

stdwin1.fas : stdwin1.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c stdwin1.lsp

stdwin2.fas : stdwin2.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c stdwin2.lsp

rexx.fas : rexx.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c rexx.lsp

editor.fas : editor.lsp lisp.exe interpreted.mem
	lisp.exe -m 750KW -M interpreted.mem -q -c editor.lsp

halfcompiled.mem : lisp.exe $(LSPFILES) compiler.fas
	-$(RM) interpreted.mem
	lisp.exe -m 750KW < interpreted.in
	$(MV) lispinit.mem interpreted.mem
	$(TOUCH) compiler.fas
	$(TOUCH) halfcompiled.mem

compiled.mem : lisp.exe $(FASFILES)
	lisp.exe < compiled.in
	-$(RM) compiled.mem
	$(MV) lispinit.mem compiled.mem


# Perform self-tests.
check : test

# Test: recompile $(LSPFILES) and check if the resulting .mem file has the same length.
test : compiled.mem stage $(TESTLSPFILES) $(TESTFASFILES)
	comp *.fas stage
	REM The test passed if no differences were found.

stage :
	-mkdir stage

stage\init.lsp : init.lsp
	$(LN) init.lsp stage

stage\defseq.lsp : defseq.lsp
	$(LN) defseq.lsp stage

stage\backquot.lsp : backquot.lsp
	$(LN) backquot.lsp stage

stage\defmacro.lsp : defmacro.lsp
	$(LN) defmacro.lsp stage

stage\macros1.lsp : macros1.lsp
	$(LN) macros1.lsp stage

stage\macros2.lsp : macros2.lsp
	$(LN) macros2.lsp stage

stage\defs1.lsp : defs1.lsp
	$(LN) defs1.lsp stage

stage\timezone.lsp : timezone.lsp
	$(LN) timezone.lsp stage

stage\places.lsp : places.lsp
	$(LN) places.lsp stage

stage\floatpri.lsp : floatpri.lsp
	$(LN) floatpri.lsp stage

stage\type.lsp : type.lsp
	$(LN) type.lsp stage

stage\defstruc.lsp : defstruc.lsp
	$(LN) defstruc.lsp stage

stage\format.lsp : format.lsp
	$(LN) format.lsp stage

stage\user1.lsp : user1.lsp
	$(LN) user1.lsp stage

stage\user2.lsp : user2.lsp
	$(LN) user2.lsp stage

stage\trace.lsp : trace.lsp
	$(LN) trace.lsp stage

stage\macros3.lsp : macros3.lsp
	$(LN) macros3.lsp stage

stage\config.lsp : config.lsp
	$(LN) config.lsp stage

stage\compiler.lsp : compiler.lsp
	$(LN) compiler.lsp stage

stage\defs2.lsp : defs2.lsp
	$(LN) defs2.lsp stage

stage\loop.lsp : loop.lsp
	$(LN) loop.lsp stage

stage\clos.lsp : clos.lsp
	$(LN) clos.lsp stage

stage\conditio.lsp : conditio.lsp
	$(LN) conditio.lsp stage

stage\defs3.lsp : defs3.lsp
	$(LN) defs3.lsp stage

stage\gstream.lsp : gstream.lsp
	$(LN) gstream.lsp stage

stage\foreign.lsp : foreign.lsp
	$(LN) foreign.lsp stage

stage\screen.lsp : screen.lsp
	$(LN) screen.lsp stage

stage\stdwin1.lsp : stdwin1.lsp
	$(LN) stdwin1.lsp stage

stage\stdwin2.lsp : stdwin2.lsp
	$(LN) stdwin2.lsp stage

stage\rexx.lsp : rexx.lsp
	$(LN) rexx.lsp stage

stage\editor.lsp : editor.lsp
	$(LN) editor.lsp stage

stage\init.fas : stage\init.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/init.lsp

stage\defseq.fas : stage\defseq.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/defseq.lsp

stage\backquot.fas : stage\backquot.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/backquot.lsp

stage\defmacro.fas : stage\defmacro.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/defmacro.lsp

stage\macros1.fas : stage\macros1.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/macros1.lsp

stage\macros2.fas : stage\macros2.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/macros2.lsp

stage\defs1.fas : stage\defs1.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/defs1.lsp

stage\timezone.fas : stage\timezone.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/timezone.lsp

stage\places.fas : stage\places.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/places.lsp

stage\floatpri.fas : stage\floatpri.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/floatpri.lsp

stage\type.fas : stage\type.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/type.lsp

stage\defstruc.fas : stage\defstruc.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/defstruc.lsp

stage\format.fas : stage\format.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/format.lsp

stage\user1.fas : stage\user1.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/user1.lsp

stage\user2.fas : stage\user2.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/user2.lsp

stage\trace.fas : stage\trace.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/trace.lsp

stage\macros3.fas : stage\macros3.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/macros3.lsp

stage\config.fas : stage\config.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/config.lsp

stage\compiler.fas : stage\compiler.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/compiler.lsp

stage\defs2.fas : stage\defs2.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/defs2.lsp

stage\loop.fas : stage\loop.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/loop.lsp

stage\clos.fas : stage\clos.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/clos.lsp

stage\conditio.fas : stage\conditio.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/conditio.lsp

stage\defs3.fas : stage\defs3.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/defs3.lsp

stage\gstream.fas : stage\gstream.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/gstream.lsp

stage\foreign.fas : stage\foreign.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/foreign.lsp

stage\screen.fas : stage\screen.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/screen.lsp

stage\stdwin1.fas : stage\stdwin1.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/stdwin1.lsp

stage\stdwin2.fas : stage\stdwin2.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/stdwin2.lsp

stage\rexx.fas : stage\rexx.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/rexx.lsp

stage\editor.fas : stage\editor.lsp lisp.exe compiled.mem
	lisp.exe -M compiled.mem -q -c stage/editor.lsp

compiled2.mem : lisp.exe $(TESTFASFILES)
	lisp.exe -x "(cd \"stage/\") (load \"init.fas\") (cd \"..\\\") (sys::%saveinitmem) (exit)"
	-$(RM) compiled2.mem
	$(MV) lispinit.mem compiled2.mem


manual : ANNOUNCE COPYRIGHT GNU-GPL SUMMARY NEWS README clisp.1 clisp.html impnotes.txt $(TXTFILES)

manualx : manual clisp.man

ANNOUNCE : ..\ANNOUNCE
	-$(LN) ..\ANNOUNCE ANNOUNCE

COPYRIGHT : ..\COPYRIGHT
	-$(LN) ..\COPYRIGHT COPYRIGHT

GNU-GPL : ..\GNU-GPL
	-$(LN) ..\GNU-GPL GNU-GPL

SUMMARY : ..\SUMMARY
	-$(LN) ..\SUMMARY SUMMARY

README : _README lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c txt2c.exe 
	$(TXT2C) < _README > txt.c
	$(CC) $(CFLAGS) txt.c -fo=txt.exe
	txt > README
	$(RM) txt.c
	$(RM) txt.exe

clisp.1 : _clisp.1 lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c txt2c.exe 
	$(TXT2C) < _clisp.1 > txt.c
	$(CC) $(CFLAGS) txt.c -fo=txt.exe
	txt | grep -v -f grep.in > clisp.1
	$(RM) txt.c
	$(RM) txt.exe

clisp.html : _clisp.html lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c txt2c.exe 
	$(TXT2C) < _clisp.html > txt.c
	$(CC) $(CFLAGS) txt.c -fo=txt.exe
	txt > clisp.html
	$(RM) txt.c
	$(RM) txt.exe

impnotes.txt : _impnotes.txt lispbibl.c fsubr.c subr.c pseudofun.c constsym.c constobj.c msdos.c txt2c.exe 
	$(TXT2C) < _impnotes.txt > txt.c
	$(CC) $(CFLAGS) txt.c -fo=txt.exe
	txt > impnotes.txt
	$(RM) txt.c
	$(RM) txt.exe

clisp.man : clisp.1
	$(ROFF_MAN) clisp.1 > clisp.man

clisp.dvi : clisp.1
	$(ROFF_DVI) clisp.1 > clisp.dvi

LISP-tutorial.txt : ..\doc\LISP-tutorial.txt
	-$(LN) ..\doc\LISP-tutorial.txt LISP-tutorial.txt

CLOS-guide.txt : ..\doc\CLOS-guide.txt
	-$(LN) ..\doc\CLOS-guide.txt CLOS-guide.txt

cltl2.txt : ..\doc\cltl2.txt
	-$(LN) ..\doc\cltl2.txt cltl2.txt


install : install-bin

installdirs : force
	-mkdir $(libdir)
	-mkdir $(lisplibdir)
	-mkdir $(bindir)

install-bin : lisp.exe compiled.mem force
	-mkdir $(libdir)
	-mkdir $(lisplibdir)
	$(INSTALL_PROGRAM) lisp.exe $(lisplibdir)\lisp.exe
	$(INSTALL_DATA) compiled.mem $(lisplibdir)\lispinit.mem
	-mkdir $(bindir)
	echo $(lisplibdir)\lisp.exe -M $(lisplibdir)\lispinit.mem %1 %2 %3 %4 %5 %6 %7 %8 %9 > $(bindir)\clisp.bat

uninstall : uninstall-bin

uninstall-bin : force
	$(RM) $(lisplibdir)/lisp.exe
	$(RM) $(lisplibdir)/lispinit.mem
	$(RM) $(bindir)/clisp.bat

# clean0 is harmless: removes only superfluous things: temporary files.
clean0 : force
	-$(RM) core ansidecl.c genclisph.exe clisp1.h clisp2.h clisp3.h txt.c txt.exe

# clean1 removes everything that becomes obsolete once lisp.exe is recompiled
# without changing the bytecode format and the tables in
# constobj.d, constpack.d, constsym.d, subr.d, fsubr.d, pseudofun.d.
clean1 : clean0
	-$(RM) lispbibl.h clisp.h *.i *.s *.obj *.a lisp.exe stage/* suite/*
	-rmdir stage
	-rmdir suite
	-$(RM) README clisp.1 clisp.html impnotes.txt $(TXTFILES) clreadline.3 readline.dvi

# clean2 removes everything that becomes obsolete once lisp.exe is recompiled
# without changing the bytecode format.
clean2 : clean1
	-$(RM) interpreted.mem halfcompiled.mem compiled.mem compiled2.mem

# clean3 removes everything that becomes obsolete once lisp.exe is recompiled.
# It leaves everything generated by "make allc".
clean3 : clean2
	-$(RM) $(FASFILES) *.lib

# clean4 removes everything that becomes obsolete
# when switching to a new version of the C compiler.
# It leaves everything generated by "make init".
clean4 : clean3
	-$(RM) $(CFILES)

# clean5 even undoes "make init".
clean5 : clean4
	-$(RM) config.lsp
	-$(RM) comment5.exe ansidecl.exe ccpaux.exe deelif.exe deerror.exe dedefined.exe traddecl.exe deema.exe mergestrings.exe txt2c.exe

# clean6 lets us go back to "makemake > makefile".
clean6 : clean5
	-$(RM) makefile

# clean7 lets us go back to the main "configure".
clean7 : clean6
	-$(RM) config.status config.log config.cache machine.h unixconf.h makemake
	-$(RM) readline.tar.Z

# clean8 moreover cleans up the SRCDIR.
clean8 : clean7
	-$(RM) lisparit0.d

# The normal "start over" command:
mostlyclean : clean4

# Clear all files that are built by "make ...":
clean : clean5

# Make "clear for distribution":
distclean : clean7

# Remove everything that can be generated otherwise:
realclean : clean8


force:

