## Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
## All rights reserved.
## Copyright (C) 2007-2011, Gabriel Dos Reis.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
##
##     - Redistributions of source code must retain the above copyright
##       notice, this list of conditions and the following disclaimer.
##
##     - Redistributions in binary form must reproduce the above copyright
##       notice, this list of conditions and the following disclaimer in
##       the documentation and/or other materials provided with the
##       distribution.
##
##     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
##       names of its contributors may be used to endorse or promote products
##       derived from this software without specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
## IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
## PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
## OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
## LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
## SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##

# * Adding new algebra
#
# This is a complex process by its very nature. Developers and Maintainers
# who undertake the process need to understand quite a lot of detail. The
# ultimate steps to add algebra are tedious but simple. Note that only
# algebra code that gets shipped with the system needs to undergo this
# process. User code can be compiled once the distributed algebra exists
# and does not need either this Makefile or this installation process.
#
# NOTE: If you add new algebra to this file you must also update
#
# \File{exposed.lsp.pamphlet}
#
# otherwise the new algebra won't be loaded by the interpreter when needed.
#
# The first idea that you need to understand is the overall process
# of adding algebra code. Lets assume that you have a brand new spad
# file, called \File{foo.spad} containing a simple domain `BAR'. The
# steps in the process of adding this file are:
#  1. Find out where the algebra code lives in the lattice.
#     You do this by 
#       a. starting a new interpsys session
#       b. collecting all the names of the algebra files BAR requires
#       c. determining which layer each of the required files resides
#       d. determine the highest layer (e.g. 14) that contains
#          the required files
#
#  2. insert the documentation into the next layer (e.g. 15)
#
#  3. insert the [[\${OUT}/BAR.$(FASLEXT)]] file into the layer's file list
#
# * Rebuilding the algebra from scratch
#
# Compile order is important. Here we try to define the ordered lattice
# of spad file dependencies. However this is, in reality, a graph rather
# than a lattice.
#


IN=$(srcdir)
OUT=$(axiom_targetdir)/algebra
DOC=$(axiom_target_docdir)/src/algebra
OUTSRC=$(axiom_target_srcdir)/algebra
INPUT=../input

# Name of the driver to launch the compiler
DRIVER = ../driver/open-axiom$(EXEEXT)

INTERPSYS = ../interp/interpsys$(EXEEXT)

COMPILE_SPAD = $(DRIVER) --execpath=$(INTERPSYS) \
		--system="$(AXIOM)" \
		--sysdb="$(axiom_src_datadir)/algebra/" \
		--strap=strap-2 --optimize=3 \
		--system-algebra --compile $<

BOOTSTRAP = $(DRIVER) --execpath=$(INTERPSYS) \
		--system="$(AXIOM)" \
		--sysdb="$(axiom_src_datadir)/algebra/" \
		--system-algebra --compile

oa_strap_0_fasls = \
	$(addprefix strap-0/,$(addsuffix .$(FASLEXT),$(oa_strap_0_sources)))


oa_strap_1_fasls = \
	$(addprefix strap-1/,$(addsuffix .$(FASLEXT),$(oa_strap_1_sources)))


oa_strap_2_fasls = \
	$(addprefix strap-2/,$(addsuffix .$(FASLEXT),$(oa_strap_2_sources)))

oa_strap_0_sources = \
	TYPE UTYPE BASTYPE KOERCE KRCFROM KONVERT RETRACT FRETRCT SETCAT \
	FINITE ORDTYPE ORDSET ORDFIN \
	PROPLOG BOOLE LOGIC \
	ABELGRP LLINSET RLINSET LINSET CABMON ABELMON ABELSG \
	SGROUP MONOID OAMON OAMONS OASGP OCAMON OAGROUP \
	RNG SRING RING ORDRING LMODULE RMODULE BMODULE \
	COMRING ENTIRER ALGEBRA MODULE DIVRING FIELD \
	DIFFSPC DIFFDOM DIFRING LINEXP PATMAB CFCAT REAL \
	INTDOM GCDDOM PID UFD OINTDOM INS EUCDOM \
	CHARZ CHARNZ STEP IEVALAB EVALAB \
	AGG HOAGG CLAGG ELTAB ELTAGG IXAGG LNAGG \
	FLAGG ELAGG RCAGG URAGG STAGG LSAGG A1AGG \
	BGAGG DIOPS DIAGG SETAGG FSAGG VECTCAT \
	FEVALAB PDDOM PDSPC DSEXT PDRING DIFEXT \
	RADCAT AMR FAMR FLINEXP POLYCAT UPOLYC PATAB FPATMAB PFECAT \
	KVTFROM SEXCAT QFCAT SEGCAT SEGXCAT LZSTAGG BTAGG \
	RNS FPS FPC TRANFUN TRIGCAT ATRIG HYPCAT AHYP ELEMFUN \
	BOOLEAN INT NNI PI SINT FRAC DFLOAT MAYBE LIST VECTOR CHAR STRING \
	INFORM OUTFORM STREAM PRIMARR SYMBOL SUP

oa_strap_1_sources = $(oa_strap_0_sources) \
	SRAGG ALAGG TBAGG KDAGG OPERCAT MATCAT ARR2CAT FFIELDC \
	SAOS IBITS SEX FLOAT CCLASS REF UNISEG SEG VOID \
	ALIST SEX PATRES PATTERN BOP ARITY NONE IDENT SET FARRAY IFARRAY \
	ANY SEXOF MATRIX IARRAY1


oa_strap_2_sources = $(oa_strap_1_sources) \
	IVECTOR

## Bootstrap layer 0 dependencies.
## This layer comprises mostly categories, and a limited number of domains.
## Categories are compiled for their exports.  Default definitions
## are skipped.  Similarly, domains are compiled, mostly as empty
## or incomplete types.  They are needed only for their being known as
## constructors.
## Consequently, the dependencies listed here are at the categories
## inheritance level; not necessarily at the use level.
strap-0/UTYPE.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/BASTYPE.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/KOERCE.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/KONVERT.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/RETRACT.$(FASLEXT): strap-0/KRCFROM.$(FASLEXT)
strap-0/FRETRCT.$(FASLEXT): strap-0/RETRACT.$(FASLEXT)
strap-0/SETCAT.$(FASLEXT): strap-0/BASTYPE.$(FASLEXT) strap-0/KOERCE.$(FASLEXT)
strap-0/FINITE.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/ORDTYPE.$(FASLEXT): strap-0/BASTYPE.$(FASLEXT)
strap-0/ORDSET.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) strap-0/ORDTYPE.$(FASLEXT)
strap-0/ORDFIN.$(FASLEXT): strap-0/ORDSET.$(FASLEXT) strap-0/FINITE.$(FASLEXT)
strap-0/LOGIC.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/BOOLE.$(FASLEXT): strap-0/LOGIC.$(FASLEXT)
strap-0/PROPLOG.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) strap-0/BOOLE.$(FASLEXT)
strap-0/SEXCAT.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)

strap-0/LLINSET.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/RLINSET.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/LINSET.$(FASLEXT): strap-0/LLINSET.$(FASLEXT) \
	strap-0/RLINSET.$(FASLEXT)
strap-0/ABELSG.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/ABELMON.$(FASLEXT): strap-0/ABELSG.$(FASLEXT)
strap-0/CABMON.$(FASLEXT): strap-0/ABELMON.$(FASLEXT)
strap-0/SGROUP.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/MONOID.$(FASLEXT): strap-0/SGROUP.$(FASLEXT)
strap-0/ABELGRP.$(FASLEXT): strap-0/CABMON.$(FASLEXT) \
	strap-0/LLINSET.$(FASLEXT)
strap-0/RNG.$(FASLEXT): strap-0/ABELGRP.$(FASLEXT)
strap-0/LMODULE.$(FASLEXT): strap-0/ABELGRP.$(FASLEXT) \
	strap-0/LLINSET.$(FASLEXT)
strap-0/RMODULE.$(FASLEXT): strap-0/ABELGRP.$(FASLEXT) \
	strap-0/RLINSET.$(FASLEXT)
strap-0/SRING.$(FASLEXT): strap-0/ABELMON.$(FASLEXT) strap-0/MONOID.$(FASLEXT)
strap-0/RING.$(FASLEXT): strap-0/RNG.$(FASLEXT) strap-0/MONOID.$(FASLEXT) \
	strap-0/LMODULE.$(FASLEXT) strap-0/KRCFROM.$(FASLEXT)
strap-0/COMRING.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/BMODULE.$(FASLEXT)
strap-0/INTDOM.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \
	strap-0/ALGEBRA.$(FASLEXT) strap-0/ENTIRER.$(FASLEXT)
strap-0/GCDDOM.$(FASLEXT): strap-0/INTDOM.$(FASLEXT)
strap-0/BMODULE.$(FASLEXT): strap-0/LMODULE.$(FASLEXT) \
	strap-0/RMODULE.$(FASLEXT)
strap-0/MODULE.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \
	strap-0/BMODULE.$(FASLEXT) strap-0/LINSET.$(FASLEXT)
strap-0/ENTIRER.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/BMODULE.$(FASLEXT)
strap-0/ALGEBRA.$(FASLEXT): strap-0/COMRING.$(FASLEXT) \
	strap-0/RING.$(FASLEXT) strap-0/MODULE.$(FASLEXT) \
	strap-0/KRCFROM.$(FASLEXT)

strap-0/UFD.$(FASLEXT): strap-0/GCDDOM.$(FASLEXT)

strap-0/DIFFSPC.$(FASLEXT): strap-0/DIFFDOM.$(FASLEXT)
strap-0/PATMAB.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/OASGP.$(FASLEXT): strap-0/ORDSET.$(FASLEXT) strap-0/SGROUP.$(FASLEXT)
strap-0/OAMON.$(FASLEXT): strap-0/OASGP.$(FASLEXT)
strap-0/OAMONS.$(FASLEXT): strap-0/OAMON.$(FASLEXT) strap-0/OCAMON.$(FASLEXT)
strap-0/OCAMON.$(FASLEXT): strap-0/OAMON.$(FASLEXT)
strap-0/OAGROUP.$(FASLEXT): strap-0/OCAMON.$(FASLEXT) \
	strap-0/ABELGRP.$(FASLEXT)
strap-0/ORDRING.$(FASLEXT): strap-0/OAGROUP.$(FASLEXT) \
	strap-0/RING.$(FASLEXT) strap-0/MONOID.$(FASLEXT)
strap-0/OINTDOM.$(FASLEXT): strap-0/ORDRING.$(FASLEXT) \
	strap-0/INTDOM.$(FASLEXT)
strap-0/GCDDOM.$(FASLEXT): strap-0/INTDOM.$(FASLEXT)
strap-0/PID.$(FASLEXT): strap-0/GCDDOM.$(FASLEXT)
strap-0/CHARNZ.$(FASLEXT): strap-0/RING.$(FASLEXT)
strap-0/CHARZ.$(FASLEXT): strap-0/RING.$(FASLEXT)
strap-0/EUCDOM.$(FASLEXT): strap-0/PID.$(FASLEXT)
strap-0/DIVRING.$(FASLEXT): strap-0/ENTIRER.$(FASLEXT) \
	strap-0/ALGEBRA.$(FASLEXT)
strap-0/DIVRING.$(FASLEXT): strap-0/RING.$(FASLEXT)
strap-0/FIELD.$(FASLEXT): strap-0/EUCDOM.$(FASLEXT) strap-0/UFD.$(FASLEXT) \
	strap-0/DIVRING.$(FASLEXT)
strap-0/DIFFDOM.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/DIFFSPC.$(FASLEXT): strap-0/DIFFDOM.$(FASLEXT)
strap-0/DIVRING.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/DIFFSPC.$(FASLEXT)
strap-0/DIFRING.$(FASLEXT): strap-0/RING.$(FASLEXT)
strap-0/PDRING.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/PDSPC.$(FASLEXT)

strap-0/IEVALAB.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/EVALAB.$(FASLEXT): strap-0/IEVALAB.$(FASLEXT) strap-0/SETCAT.$(FASLEXT)
strap-0/LINEXP.$(FASLEXT): strap-0/LMODULE.$(FASLEXT) strap-0/RING.$(FASLEXT)
strap-0/AMR.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/OAMON.$(FASLEXT) \
	strap-0/BMODULE.$(FASLEXT) strap-0/CHARNZ.$(FASLEXT) \
	strap-0/ALGEBRA.$(FASLEXT) strap-0/INTDOM.$(FASLEXT)
strap-0/FAMR.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/OAMON.$(FASLEXT) \
	strap-0/AMR.$(FASLEXT)
strap-0/PFECAT.$(FASLEXT): strap-0/UFD.$(FASLEXT) strap-0/CHARNZ.$(FASLEXT)
strap-0/QFCAT.$(FASLEXT): strap-0/FIELD.$(FASLEXT)
strap-0/POLYCAT.$(FASLEXT): strap-0/PDRING.$(FASLEXT) strap-0/FAMR.$(FASLEXT) \
	strap-0/FLINEXP.$(FASLEXT) strap-0/PFECAT.$(FASLEXT)
strap-0/UPOLYC.$(FASLEXT): strap-0/POLYCAT.$(FASLEXT)
strap-0/CFCAT.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/REAL.$(FASLEXT): strap-0/CHARZ.$(FASLEXT) strap-0/ORDRING.$(FASLEXT) \
	strap-0/COMRING.$(FASLEXT) strap-0/FIELD.$(FASLEXT) \
	strap-0/FRETRCT.$(FASLEXT) strap-0/ALGEBRA.$(FASLEXT) \
	strap-0/RADCAT.$(FASLEXT)
strap-0/STEP.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/INS.$(FASLEXT): strap-0/UFD.$(FASLEXT) strap-0/EUCDOM.$(FASLEXT) \
	strap-0/OINTDOM.$(FASLEXT) strap-0/DIFRING.$(FASLEXT) \
	strap-0/LINEXP.$(FASLEXT) strap-0/PATMAB.$(FASLEXT) \
	strap-0/CFCAT.$(FASLEXT) strap-0/REAL.$(FASLEXT) \
	strap-0/CHARZ.$(FASLEXT) strap-0/STEP.$(FASLEXT)
strap-0/RNS.$(FASLEXT): strap-0/FIELD.$(FASLEXT) strap-0/ORDRING.$(FASLEXT) \
	strap-0/REAL.$(FASLEXT) strap-0/RETRACT.$(FASLEXT) \
	strap-0/RADCAT.$(FASLEXT) strap-0/KONVERT.$(FASLEXT) \
	strap-0/PATAB.$(FASLEXT) strap-0/CHARZ.$(FASLEXT)
strap-0/FPS.$(FASLEXT): strap-0/RNS.$(FASLEXT)
strap-0/FEVALAB.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) \
	strap-0/EVALAB.$(FASLEXT)
strap-0/PDDOM.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/PDSPC.$(FASLEXT): strap-0/PDDOM.$(FASLEXT)
strap-0/DSEXT.$(FASLEXT): strap-0/PDSPC.$(FASLEXT)
strap-0/DIFEXT.$(FASLEXT): strap-0/DSEXT.$(FASLEXT) strap-0/PDRING.$(FASLEXT)
strap-0/FLINEXP.$(FASLEXT): strap-0/LINEXP.$(FASLEXT)
strap-0/PATAB.$(FASLEXT): strap-0/KONVERT.$(FASLEXT)
strap-0/FPATMAB.$(FASLEXT): strap-0/PATMAB.$(FASLEXT)
strap-0/FPC.$(FASLEXT): strap-0/FIELD.$(FASLEXT)
strap-0/TRANFUN.$(FASLEXT): strap-0/TRIGCAT.$(FASLEXT) \
	strap-0/ATRIG.$(FASLEXT) strap-0/HYPCAT.$(FASLEXT) \
	strap-0/AHYP.$(FASLEXT) strap-0/ELEMFUN.$(FASLEXT)

strap-0/BOOLEAN.$(FASLEXT): strap-0/ORDFIN.$(FASLEXT) \
	strap-0/PROPLOG.$(FASLEXT) strap-0/KONVERT.$(FASLEXT)
strap-0/INT.$(FASLEXT): strap-0/INS.$(FASLEXT) \
	strap-0/KONVERT.$(FASLEXT)
strap-0/NNI.$(FASLEXT): strap-0/INT.$(FASLEXT)
strap-0/PI.$(FASLEXT): strap-0/NNI.$(FASLEXT)
strap-0/SINT.$(FASLEXT): strap-0/INT.$(FASLEXT)
strap-0/DFLOAT.$(FASLEXT): strap-0/FPS.$(FASLEXT) \
	strap-0/TRANFUN.$(FASLEXT)
strap-0/AGG.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/HOAGG.$(FASLEXT): strap-0/AGG.$(FASLEXT) strap-0/EVALAB.$(FASLEXT)
strap-0/CLAGG.$(FASLEXT): strap-0/HOAGG.$(FASLEXT)
strap-0/ELTAB.$(FASLEXT): strap-0/TYPE.$(FASLEXT)
strap-0/ELTAGG.$(FASLEXT): strap-0/ELTAB.$(FASLEXT) strap-0/SETCAT.$(FASLEXT)
strap-0/IXAGG.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) \
	strap-0/ELTAGG.$(FASLEXT) strap-0/HOAGG.$(FASLEXT)
strap-0/LNAGG.$(FASLEXT): strap-0/IXAGG.$(FASLEXT) strap-0/CLAGG.$(FASLEXT)
strap-0/FLAGG.$(FASLEXT): strap-0/LNAGG.$(FASLEXT)
strap-0/ELAGG.$(FASLEXT): strap-0/LNAGG.$(FASLEXT)
strap-0/RCAGG.$(FASLEXT): strap-0/HOAGG.$(FASLEXT)
strap-0/URAGG.$(FASLEXT): strap-0/RCAGG.$(FASLEXT)
strap-0/STAGG.$(FASLEXT): strap-0/URAGG.$(FASLEXT) strap-0/LNAGG.$(FASLEXT)
strap-0/LSAGG.$(FASLEXT): strap-0/FLAGG.$(FASLEXT) strap-0/ELAGG.$(FASLEXT) \
	strap-0/STAGG.$(FASLEXT)
strap-0/LZSTAGG.$(FASLEXT): strap-0/STAGG.$(FASLEXT)
strap-0/A1AGG.$(FASLEXT): strap-0/FLAGG.$(FASLEXT)
strap-0/BGAGG.$(FASLEXT): strap-0/HOAGG.$(FASLEXT)
strap-0/DIOPS.$(FASLEXT): strap-0/BGAGG.$(FASLEXT) strap-0/CLAGG.$(FASLEXT)
strap-0/DIAGG.$(FASLEXT): strap-0/DIOPS.$(FASLEXT) strap-0/SETCAT.$(FASLEXT)
strap-0/SETAGG.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) strap-0/CLAGG.$(FASLEXT)
strap-0/FSAGG.$(FASLEXT): strap-0/DIAGG.$(FASLEXT) strap-0/SETAGG.$(FASLEXT) \
	strap-0/SETCAT.$(FASLEXT)
strap-0/SRAGG.$(FASLEXT): strap-0/A1AGG.$(FASLEXT)
strap-0/BTAGG.$(FASLEXT): strap-0/ORDSET.$(FASLEXT) strap-0/A1AGG.$(FASLEXT)
strap-0/VECTCAT.$(FASLEXT): strap-0/A1AGG.$(FASLEXT)
strap-0/SEGXCAT.$(FASLEXT): strap-0/SEGCAT.$(FASLEXT)

strap-0/STRING.$(FASLEXT): strap-0/SRAGG.$(FASLEXT)
strap-0/LIST.$(FASLEXT): strap-0/LSAGG.$(FASLEXT)
strap-0/PRIMARR.$(FASLEXT): strap-0/A1AGG.$(FASLEXT)
strap-0/VECTOR.$(FASLEXT): strap-0/VECTCAT.$(FASLEXT)
strap-0/CHAR.$(FASLEXT): strap-0/FSAGG.$(FASLEXT)
strap-0/STREAM.$(FASLEXT): strap-0/LZSTAGG.$(FASLEXT)
strap-0/SUP.$(FASLEXT): strap-0/UPOLYC.$(FASLEXT)
strap-0/FRAC.$(FASLEXT): strap-0/QFCAT.$(FASLEXT)
strap-0/SYMBOL.$(FASLEXT): strap-0/ORDSET.$(FASLEXT)
strap-0/INFORM.$(FASLEXT): strap-0/SEXOF.$(FASLEXT)
strap-0/SEXOF.$(FASLEXT): strap-0/SEXCAT.$(FASLEXT)
strap-0/OUTFORM.$(FASLEXT): strap-0/SETCAT.$(FASLEXT)
strap-0/MAYBE.$(FASLEXT): strap-0/UTYPE.$(FASLEXT)

## Bootstrap stage 1 dependencies.
## At this stage, we attempt to compile domains essential for completing
## the bootstrap process (stage 2).  Those that were compiled at stage 0
## were (necessarily) incomplete.

# We need Boolean to be complete when compiling the defaults of BasicType.
strap-1/BOOLEAN.$(FASLEXT): strap-1/BOOLE.$(FASLEXT)
strap-1/MAYBE.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) \
	strap-1/KOERCE.$(FASLEXT) strap-1/RETRACT.$(FASLEXT)
strap-1/BASTYPE.$(FASLEXT): strap-1/BOOLEAN.$(FASLEXT)
strap-1/SETCAT.$(FASLEXT): strap-1/BASTYPE.$(FASLEXT) strap-1/KOERCE.$(FASLEXT)
strap-1/KOERCE.$(FASLEXT): strap-1/TYPE.$(FASLEXT)
strap-1/KONVERT.$(FASLEXT): strap-1/TYPE.$(FASLEXT)
strap-1/RETRACT.$(FASLEXT): strap-1/KRCFROM.$(FASLEXT)
strap-1/SAOS.$(FASLEXT): strap-1/DFLOAT.$(FASLEXT) strap-1/INT.$(FASLEXT) \
	strap-1/LIST.$(FASLEXT) strap-1/PRIMARR.$(FASLEXT)
strap-1/SUP.$(FASLEXT): strap-1/SAOS.$(FASLEXT) strap-1/INS.$(FASLEXT) \
	strap-1/EUCDOM.$(FASLEXT) strap-1/FFIELDC.$(FASLEXT)
strap-1/FFIELDC.$(FASLEXT): strap-1/TBAGG.$(FASLEXT)
strap-1/FRAC.$(FASLEXT): strap-1/SUP.$(FASLEXT)
strap-1/FRETRCT.$(FASLEXT): strap-1/RETRACT.$(FASLEXT) strap-1/FRAC.$(FASLEXT)
strap-1/FINITE.$(FASLEXT): strap-1/SETCAT.$(FASLEXT)
strap-1/ORDTYPE.$(FASLEXT): strap-1/BASTYPE.$(FASLEXT)
strap-1/ORDSET.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) strap-1/ORDTYPE.$(FASLEXT)
strap-1/ORDFIN.$(FASLEXT): strap-1/ORDSET.$(FASLEXT) strap-1/FINITE.$(FASLEXT)
strap-1/LOGIC.$(FASLEXT): strap-1/TYPE.$(FASLEXT)
strap-1/BOOLE.$(FASLEXT): strap-1/LOGIC.$(FASLEXT)
strap-1/PROPLOG.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) strap-1/BOOLE.$(FASLEXT)

strap-1/LLINSET.$(FASLEXT): strap-1/SETCAT.$(FASLEXT)
strap-1/RLINSET.$(FASLEXT): strap-1/SETCAT.$(FASLEXT)
strap-1/LINSET.$(FASLEXT): strap-1/LLINSET.$(FASLEXT) \
	strap-1/RLINSET.$(FASLEXT)
strap-1/ABELSG.$(FASLEXT): strap-1/SETCAT.$(FASLEXT)
strap-1/ABELMON.$(FASLEXT): strap-1/ABELSG.$(FASLEXT)
strap-1/CABMON.$(FASLEXT): strap-1/ABELMON.$(FASLEXT)
strap-1/SGROUP.$(FASLEXT): strap-1/SETCAT.$(FASLEXT)
strap-1/MONOID.$(FASLEXT): strap-1/SGROUP.$(FASLEXT) strap-1/MAYBE.$(FASLEXT)
strap-1/ABELGRP.$(FASLEXT): strap-1/CABMON.$(FASLEXT) \
	strap-1/LLINSET.$(FASLEXT)
strap-1/RNG.$(FASLEXT): strap-1/ABELGRP.$(FASLEXT)
strap-1/LMODULE.$(FASLEXT): strap-1/ABELGRP.$(FASLEXT) \
	strap-1/LLINSET.$(FASLEXT)
strap-1/RMODULE.$(FASLEXT): strap-1/ABELGRP.$(FASLEXT) \
	strap-1/RLINSET.$(FASLEXT)
strap-1/RING.$(FASLEXT): strap-1/RNG.$(FASLEXT) strap-1/MONOID.$(FASLEXT) \
	strap-1/LMODULE.$(FASLEXT) strap-1/KRCFROM.$(FASLEXT)
strap-1/COMRING.$(FASLEXT): strap-1/RING.$(FASLEXT) strap-1/BMODULE.$(FASLEXT)
strap-1/INTDOM.$(FASLEXT): strap-1/COMRING.$(FASLEXT) \
	strap-1/ALGEBRA.$(FASLEXT) strap-1/ENTIRER.$(FASLEXT)
strap-1/GCDDOM.$(FASLEXT): strap-1/INTDOM.$(FASLEXT)
strap-1/BMODULE.$(FASLEXT): strap-1/LMODULE.$(FASLEXT) \
	strap-1/RMODULE.$(FASLEXT)
strap-1/MODULE.$(FASLEXT): strap-1/COMRING.$(FASLEXT) \
	strap-1/BMODULE.$(FASLEXT) strap-1/LINSET.$(FASLEXT)
strap-1/ENTIRER.$(FASLEXT): strap-1/RING.$(FASLEXT) strap-1/BMODULE.$(FASLEXT)
strap-1/ALGEBRA.$(FASLEXT): strap-1/COMRING.$(FASLEXT) \
	strap-1/RING.$(FASLEXT) strap-1/MODULE.$(FASLEXT) \
	strap-1/KRCFROM.$(FASLEXT)
strap-1/UFD.$(FASLEXT): strap-1/GCDDOM.$(FASLEXT)
strap-1/PID.$(FASLEXT): strap-1/GCDDOM.$(FASLEXT)
strap-1/EUCDOM.$(FASLEXT): strap-1/PID.$(FASLEXT)
strap-1/DIFFSPC.$(FASLEXT): strap-1/DIFFDOM.$(FASLEXT)
strap-1/PATMAB.$(FASLEXT): strap-1/SETCAT.$(FASLEXT)
strap-1/OASGP.$(FASLEXT): strap-1/ORDSET.$(FASLEXT) strap-1/SGROUP.$(FASLEXT)
strap-1/OAMON.$(FASLEXT): strap-1/OASGP.$(FASLEXT)
strap-1/OAMONS.$(FASLEXT): strap-1/OAMON.$(FASLEXT) strap-1/OCAMON.$(FASLEXT)
strap-1/OCAMON.$(FASLEXT): strap-1/OAMON.$(FASLEXT)
strap-1/OAGROUP.$(FASLEXT): strap-1/OCAMON.$(FASLEXT) \
	strap-1/ABELGRP.$(FASLEXT)
strap-1/ORDRING.$(FASLEXT): strap-1/OAGROUP.$(FASLEXT) \
	strap-1/RING.$(FASLEXT) strap-1/MONOID.$(FASLEXT)
strap-1/OINTDOM.$(FASLEXT): strap-1/ORDRING.$(FASLEXT) \
	strap-1/INTDOM.$(FASLEXT)
strap-1/FIELD.$(FASLEXT): strap-1/EUCDOM.$(FASLEXT) strap-1/UFD.$(FASLEXT) \
	strap-1/DIVRING.$(FASLEXT)
strap-1/DIFFDOM.$(FASLEXT): strap-1/TYPE.$(FASLEXT)
strap-1/DIFFSPC.$(FASLEXT): strap-1/DIFFDOM.$(FASLEXT)
strap-1/DIFRING.$(FASLEXT): strap-1/RING.$(FASLEXT)
strap-1/PDRING.$(FASLEXT): strap-1/RING.$(FASLEXT) strap-1/PDSPC.$(FASLEXT)
strap-1/PDSPC.$(FASLEXT): strap-1/PDDOM.$(FASLEXT)
strap-1/DSEXT.$(FASLEXT): strap-1/PDSPC.$(FASLEXT)
strap-1/DIFEXT.$(FASLEXT): strap-1/RING.$(FASLEXT) strap-1/DSEXT.$(FASLEXT) \
	strap-1/PDRING.$(FASLEXT)
strap-1/FLINEXP.$(FASLEXT): strap-1/LINEXP.$(FASLEXT)
strap-1/PATAB.$(FASLEXT): strap-1/KONVERT.$(FASLEXT)
strap-1/FPATMAB.$(FASLEXT): strap-1/PATAB.$(FASLEXT)
strap-1/CHARNZ.$(FASLEXT): strap-1/RING.$(FASLEXT)
strap-1/FPS.$(FASLEXT): strap-0/FIELD.$(FASLEXT) strap-1/ORDRING.$(FASLEXT) \
	strap-1/REAL.$(FASLEXT) strap-1/RETRACT.$(FASLEXT) \
	strap-1/CHARZ.$(FASLEXT)
strap-1/HYPCAT.$(FASLEXT): strap-1/ELEMFUN.$(FASLEXT)
strap-1/TRANFUN.$(FASLEXT): strap-1/TRIGCAT.$(FASLEXT) \
	strap-1/ATRIG.$(FASLEXT) strap-1/HYPCAT.$(FASLEXT) \
	strap-1/AHYP.$(FASLEXT)
strap-1/SEGXCAT.$(FASLEXT): strap-1/SEGCAT.$(FASLEXT)
strap-1/SEG.$(FASLEXT): strap-1/SEGXCAT.$(FASLEXT)
strap-1/UNISEG.$(FASLEXT): strap-1/SEG.$(FASLEXT)
strap-1/FLOAT.$(FASLEXT): strap-1/REF.$(FASLEXT) strap-1/UNISEG.$(FASLEXT) \
	strap-1/CCLASS.$(FASLEXT) strap-1/VOID.$(FASLEXT) \
	strap-1/SYMBOL.$(FASLEXT)
strap-1/SYMBOL.$(FASLEXT): strap-1/ALIST.$(FASLEXT) strap-1/SEX.$(FASLEXT) \
	strap-1/PATRES.$(FASLEXT) strap-1/A1AGG.$(FASLEXT) \
	strap-1/FLAGG.$(FASLEXT)
strap-1/FLAGG.$(FASLEXT): strap-1/LNAGG.$(FASLEXT)
strap-1/PATRES.$(FASLEXT): strap-1/PATTERN.$(FASLEXT)
strap-1/PATTERN.$(FASLEXT): strap-1/BOP.$(FASLEXT) strap-1/ANY.$(FASLEXT) \
	strap-1/INS.$(FASLEXT)
strap-1/ANY.$(FASLEXT): strap-1/SEXOF.$(FASLEXT)
strap-1/BOP.$(FASLEXT): strap-1/OPERCAT.$(FASLEXT) strap-1/ARITY.$(FASLEXT) \
	strap-1/NONE.$(FASLEXT) strap-1/IDENT.$(FASLEXT) \
	strap-1/SET.$(FASLEXT) strap-1/ALIST.$(FASLEXT)
strap-1/SET.$(FASLEXT): strap-1/FARRAY.$(FASLEXT)
strap-1/FARRAY.$(FASLEXT): strap-1/IFARRAY.$(FASLEXT)
strap-1/IFARRAY.$(FASLEXT): strap-1/INS.$(FASLEXT) strap-1/EUCDOM.$(FASLEXT) \
	strap-1/DIFFSPC.$(FASLEXT)
strap-1/ALIST.$(FASLEXT): strap-1/ALAGG.$(FASLEXT)
strap-1/ALAGG.$(FASLEXT): strap-1/TBAGG.$(FASLEXT)
strap-1/TBAGG.$(FASLEXT): strap-1/KDAGG.$(FASLEXT)
strap-1/CCLASS.$(FASLEXT): strap-1/IBITS.$(FASLEXT)
strap-1/DFLOAT.$(FASLEXT): strap-1/FPS.$(FASLEXT) \
	strap-1/TRANFUN.$(FASLEXT) strap-1/FLOAT.$(FASLEXT)
strap-1/SEXCAT.$(FASLEXT): strap-1/KVTFROM.$(FASLEXT)
strap-1/POLYCAT.$(FASLEXT): strap-1/SEXCAT.$(FASLEXT) \
	strap-1/IVECTOR.$(FASLEXT) strap-1/IARRAY1.$(FASLEXT)
strap-1/QFCAT.$(FASLEXT): strap-1/FEVALAB.$(FASLEXT) \
	 strap-1/EUCDOM.$(FASLEXT) strap-1/DIFEXT.$(FASLEXT) \
	strap-1/FLINEXP.$(FASLEXT) strap-1/FPATMAB.$(FASLEXT) \
	strap-1/CHARNZ.$(FASLEXT) strap-1/PFECAT.$(FASLEXT) \
	strap-1/DFLOAT.$(FASLEXT)
strap-1/DIVRING.$(FASLEXT): strap-1/ENTIRER.$(FASLEXT) \
	strap-1/ALGEBRA.$(FASLEXT)
strap-1/INTDOM.$(FASLEXT): strap-1/FIELD.$(FASLEXT)
strap-1/A1AGG.$(FASLEXT): strap-1/BOOLE.$(FASLEXT)
strap-1/DIOPS.$(FASLEXT): strap-1/BGAGG.$(FASLEXT) strap-1/INT.$(FASLEXT) \
	strap-1/CLAGG.$(FASLEXT) strap-1/CHAR.$(FASLEXT)
strap-1/DIAGG.$(FASLEXT): strap-1/DIOPS.$(FASLEXT)
strap-1/FSAGG.$(FASLEXT): strap-1/DIAGG.$(FASLEXT) strap-1/INS.$(FASLEXT)
strap-1/STRING.$(FASLEXT): strap-1/SRAGG.$(FASLEXT) strap-1/CHAR.$(FASLEXT)
strap-1/INT.$(FASLEXT): strap-1/STRING.$(FASLEXT) strap-1/ORDRING.$(FASLEXT) \
	strap-1/MATRIX.$(FASLEXT)
strap-1/PI.$(FASLEXT): strap-1/NNI.$(FASLEXT)
strap-1/NNI.$(FASLEXT): strap-1/INT.$(FASLEXT)
strap-1/MATRIX.$(FASLEXT): strap-1/MATCAT.$(FASLEXT)
strap-1/MATCAT.$(FASLEXT): strap-1/ARR2CAT.$(FASLEXT)
strap-1/SINT.$(FASLEXT): strap-1/INT.$(FASLEXT) strap-1/ORDFIN.$(FASLEXT) \
	strap-1/BOOLE.$(FASLEXT)
strap-1/ALIST.$(FASLEXT): strap-1/INT.$(FASLEXT)
strap-1/LIST.$(FASLEXT): strap-1/STRING.$(FASLEXT)
strap-1/VECTOR.$(FASLEXT): strap-1/LIST.$(FASLEXT)
strap-1/DFLOAT.$(FASLEXT): strap-1/SEX.$(FASLEXT)


## Bootstrap stage 2 dependencies.
## At this stage we recompile everything from stage 1, including
## a few more domains.
## We compile integers domains first so that they can be properly
## inlined.
strap-2/SINT.$(FASLEXT): strap-2/INT.$(FASLEXT)
strap-2/NNI.$(FASLEXT): strap-2/INT.$(FASLEXT)
strap-2/PI.$(FASLEXT): strap-2/NNI.$(FASLEXT)
strap-2/BOOLEAN.$(FASLEXT): strap-2/SINT.$(FASLEXT)
strap-2/MAYBE.$(FASLEXT): strap-2/BOOLEAN.$(FASLEXT)
strap-2/CHAR.$(FASLEXT): strap-2/PI.$(FASLEXT)
strap-2/STRING.$(FASLEXT): strap-2/CHAR.$(FASLEXT) strap-2/INT.$(FASLEXT)
strap-2/LIST.$(FASLEXT): strap-2/STRING.$(FASLEXT)
strap-2/PRIMARR.$(FASLEXT): strap-2/INT.$(FASLEXT)
strap-2/IARRAY1.$(FASLEXT): strap-2/PRIMARR.$(FASLEXT)
strap-2/IVECTOR.$(FASLEXT): strap-2/IARRAY1.$(FASLEXT)
strap-2/VECTOR.$(FASLEXT): strap-2/IVECTOR.$(FASLEXT) strap-2/LIST.$(FASLEXT)
strap-2/SYMBOL.$(FASLEXT): strap-2/STRING.$(FASLEXT)
strap-2/DFLOAT.$(FASLEXT): strap-2/INT.$(FASLEXT)

strap-2/BASTYPE.$(FASLEXT): strap-2/BOOLEAN.$(FASLEXT)
strap-2/SETCAT.$(FASLEXT): strap-2/BASTYPE.$(FASLEXT) strap-2/KOERCE.$(FASLEXT)
strap-2/KOERCE.$(FASLEXT): strap-2/TYPE.$(FASLEXT)
strap-2/KONVERT.$(FASLEXT): strap-2/TYPE.$(FASLEXT)
strap-2/RETRACT.$(FASLEXT): strap-2/KRCFROM.$(FASLEXT)
strap-2/FRETRCT.$(FASLEXT): strap-2/RETRACT.$(FASLEXT)
strap-2/FINITE.$(FASLEXT): strap-2/SETCAT.$(FASLEXT)
strap-2/ORDTYPE.$(FASLEXT): strap-2/BASTYPE.$(FASLEXT)
strap-2/ORDSET.$(FASLEXT): strap-2/SETCAT.$(FASLEXT) strap-2/ORDTYPE.$(FASLEXT)
strap-2/ORDFIN.$(FASLEXT): strap-2/ORDSET.$(FASLEXT) strap-2/FINITE.$(FASLEXT)
strap-2/LOGIC.$(FASLEXT): strap-2/TYPE.$(FASLEXT)
strap-2/BOOLE.$(FASLEXT): strap-2/LOGIC.$(FASLEXT)
strap-2/MONOID.$(FASLEXT): strap-2/MAYBE.$(FASLEXT)
strap-2/PROPLOG.$(FASLEXT): strap-2/SETCAT.$(FASLEXT) strap-2/BOOLE.$(FASLEXT)
strap-2/PID.$(FASLEXT): strap-2/GCDDOM.$(FASLEXT)
strap-2/EUCDOM.$(FASLEXT): strap-2/PID.$(FASLEXT)
strap-2/PDSPC.$(FASLEXT): strap-2/PDDOM.$(FASLEXT)
strap-2/DSEXT.$(FASLEXT): strap-2/PDSPC.$(FASLEXT)
strap-2/DIFEXT.$(FASLEXT): strap-2/RING.$(FASLEXT) strap-2/DSEXT.$(FASLEXT) \
	strap-2/PDRING.$(FASLEXT)
strap-2/FLINEXP.$(FASLEXT): strap-2/LINEXP.$(FASLEXT)
strap-2/PATAB.$(FASLEXT): strap-2/KONVERT.$(FASLEXT)
strap-2/FPATMAB.$(FASLEXT): strap-2/PATAB.$(FASLEXT)
strap-2/CHARNZ.$(FASLEXT): strap-2/RING.$(FASLEXT)
strap-2/FPS.$(FASLEXT): strap-2/FIELD.$(FASLEXT) strap-2/ORDRING.$(FASLEXT) \
	strap-2/REAL.$(FASLEXT) strap-2/RETRACT.$(FASLEXT) \
	strap-2/CHARZ.$(FASLEXT)
strap-2/FPS.$(FASLEXT): strap-2/RNS.$(FASLEXT)
strap-2/HYPCAT.$(FASLEXT): strap-2/ELEMFUN.$(FASLEXT)
strap-2/TRANFUN.$(FASLEXT): strap-2/TRIGCAT.$(FASLEXT) \
	strap-2/ATRIG.$(FASLEXT) strap-2/HYPCAT.$(FASLEXT) \
	strap-2/AHYP.$(FASLEXT)
strap-2/PFECAT.$(FASLEXT): strap-2/IVECTOR.$(FASLEXT)
strap-2/SEXCAT.$(FASLEXT): strap-2/KVTFROM.$(FASLEXT)
strap-2/POLYCAT.$(FASLEXT): strap-2/SEXCAT.$(FASLEXT)
strap-2/QFCAT.$(FASLEXT): strap-2/FEVALAB.$(FASLEXT) \
	 strap-2/EUCDOM.$(FASLEXT) strap-2/DIFEXT.$(FASLEXT) \
	strap-2/FLINEXP.$(FASLEXT) strap-2/FPATMAB.$(FASLEXT) \
	strap-2/CHARNZ.$(FASLEXT) strap-2/PFECAT.$(FASLEXT) \
	strap-2/DFLOAT.$(FASLEXT)
strap-2/DIVRING.$(FASLEXT): strap-2/QFCAT.$(FASLEXT)
strap-2/FIELD.$(FASLEXT): strap-2/EUCDOM.$(FASLEXT) \
	strap-2/EUCDOM.$(FASLEXT) strap-2/DIVRING.$(FASLEXT)
strap-2/INTDOM.$(FASLEXT): strap-2/FIELD.$(FASLEXT)
strap-2/A1AGG.$(FASLEXT): strap-2/BOOLE.$(FASLEXT)
strap-2/DIOPS.$(FASLEXT): strap-2/BGAGG.$(FASLEXT) \
	strap-2/CLAGG.$(FASLEXT) strap-2/CHAR.$(FASLEXT)
strap-2/DIAGG.$(FASLEXT): strap-2/DIOPS.$(FASLEXT)
strap-2/FSAGG.$(FASLEXT): strap-2/DIAGG.$(FASLEXT)


strap-%:
	$(mkdir_p) $@

strap-0: initdb.daase
strap-0-stamp: $(oa_strap_0_fasls)
	rm -f $@
	rm -rf $(addsuffix .NRLIB,$(oa_strap_0_sources))
	$(TOUCH) $@

strap-1: strap-0-stamp


strap-1-stamp: $(oa_strap_1_fasls)
	rm -f $@
	rm -rf $(addsuffix .NRLIB,$(oa_strap_1_sources)) \
		 $(addsuffix -.NRLIB,$(oa_strap_1_sources))
	$(TOUCH) $@

strap-2: $(oa_strap_1_fasls)

strap-2-stamp: $(oa_strap_2_fasls)
	rm -f $@
	rm -rf $(addsuffix .NRLIB,$(oa_strap_2_sources)) \
		 $(addsuffix -.NRLIB,$(oa_strap_2_sources))
	$(TOUCH) $@

strap-0/%.$(FASLEXT): %.spad | strap-0
	$(BOOTSTRAP) --sysalg=strap-0 --bootstrap $< \
		&& cp $*.NRLIB/code.$(FASLEXT) $@ && \
		if test x@oa_keep_files@ = xyes; then \
			cp $*.NRLIB/code.lsp strap-0/$*.lsp; fi

strap-1/%.$(FASLEXT): %.spad | strap-1
	$(BOOTSTRAP) --strap=strap-0 --sysalg=strap-1 --optimize=3 $< && \
		cp $*.NRLIB/code.$(FASLEXT) $@ && \
		if test -d $*-.NRLIB; then cp $*-.NRLIB/code.$(FASLEXT) \
			strap-1/$*-.$(FASLEXT); else : ; fi && \
		if test x@oa_keep_files@ = xyes; then \
			cp $*.NRLIB/code.lsp strap-1/$*.lsp; fi

strap-2/%.$(FASLEXT): %.spad | strap-2
	$(BOOTSTRAP) --strap=strap-1 --sysalg=strap-2 --optimize=3 $< && \
		cp $*.NRLIB/code.$(FASLEXT) $@ && \
		if test -d $*-.NRLIB; then cp $*-.NRLIB/code.$(FASLEXT) \
			strap-2/$*-.$(FASLEXT); else : ; fi && \
		if test x@oa_keep_files@ = xyes; then \
			cp $*.NRLIB/code.lsp strap-1/$*.lsp; fi


SPADFILES= \
 ${OUTSRC}/acplot.spad ${OUTSRC}/aggcat2.spad ${OUTSRC}/aggcat.spad \
 ${OUTSRC}/algcat.spad ${OUTSRC}/algext.spad ${OUTSRC}/algfact.spad \
 ${OUTSRC}/algfunc.spad ${OUTSRC}/allfact.spad ${OUTSRC}/alql.spad \
 ${OUTSRC}/annacat.spad ${OUTSRC}/any.spad ${OUTSRC}/array1.spad \
 ${OUTSRC}/array2.spad ${OUTSRC}/asp.spad ${OUTSRC}/attreg.spad \
 ${OUTSRC}/bags.spad ${OUTSRC}/bezout.spad ${OUTSRC}/boolean.spad \
 ${OUTSRC}/brill.spad ${OUTSRC}/domain.spad \
 ${OUTSRC}/c02.spad ${OUTSRC}/c05.spad ${OUTSRC}/c06.spad \
 ${OUTSRC}/card.spad ${OUTSRC}/carten.spad ${OUTSRC}/catdef.spad \
 ${OUTSRC}/cden.spad ${OUTSRC}/clifford.spad ${OUTSRC}/clip.spad \
 ${OUTSRC}/cmplxrt.spad ${OUTSRC}/coerce.spad ${OUTSRC}/color.spad \
 ${OUTSRC}/combfunc.spad ${OUTSRC}/combinat.spad ${OUTSRC}/complet.spad \
 ${OUTSRC}/constant.spad ${OUTSRC}/contfrac.spad ${OUTSRC}/cont.spad \
 ${OUTSRC}/coordsys.spad ${OUTSRC}/cra.spad ${OUTSRC}/crfp.spad \
 ${OUTSRC}/curve.spad ${OUTSRC}/cycles.spad ${OUTSRC}/cyclotom.spad \
 ${OUTSRC}/d01agents.spad ${OUTSRC}/d01Package.spad \
 ${OUTSRC}/d01routine.spad ${OUTSRC}/d01.spad ${OUTSRC}/d01transform.spad \
 ${OUTSRC}/d01weights.spad ${OUTSRC}/d02agents.spad \
 ${OUTSRC}/d02Package.spad ${OUTSRC}/d02routine.spad ${OUTSRC}/d02.spad \
 ${OUTSRC}/d03agents.spad ${OUTSRC}/d03Package.spad \
 ${OUTSRC}/d03routine.spad ${OUTSRC}/d03.spad ${OUTSRC}/ddfact.spad \
 ${OUTSRC}/defaults.spad ${OUTSRC}/defintef.spad ${OUTSRC}/defintrf.spad \
 ${OUTSRC}/degred.spad ${OUTSRC}/derham.spad ${OUTSRC}/dhmatrix.spad \
 ${OUTSRC}/divisor.spad ${OUTSRC}/dpolcat.spad ${OUTSRC}/drawopt.spad \
 ${OUTSRC}/drawpak.spad ${OUTSRC}/draw.spad \
 ${OUTSRC}/e01.spad ${OUTSRC}/e02.spad ${OUTSRC}/e04agents.spad \
 ${OUTSRC}/e04Package.spad ${OUTSRC}/e04routine.spad ${OUTSRC}/e04.spad \
 ${OUTSRC}/efstruc.spad ${OUTSRC}/efuls.spad ${OUTSRC}/efupxs.spad \
 ${OUTSRC}/eigen.spad ${OUTSRC}/elemntry.spad ${OUTSRC}/elfuts.spad \
 ${OUTSRC}/equation1.spad ${OUTSRC}/equation2.spad ${OUTSRC}/error.spad \
 ${OUTSRC}/expexpan.spad ${OUTSRC}/expr2ups.spad \
 ${OUTSRC}/exprode.spad ${OUTSRC}/expr.spad \
 ${OUTSRC}/f01.spad ${OUTSRC}/f02.spad ${OUTSRC}/f04.spad \
 ${OUTSRC}/f07.spad ${OUTSRC}/facutil.spad ${OUTSRC}/ffcat.spad \
 ${OUTSRC}/ffcg.spad ${OUTSRC}/fff.spad ${OUTSRC}/ffhom.spad \
 ${OUTSRC}/ffnb.spad ${OUTSRC}/ffpoly2.spad ${OUTSRC}/ffpoly.spad \
 ${OUTSRC}/ffp.spad ${OUTSRC}/ffx.spad \
 ${OUTSRC}/files.spad ${OUTSRC}/float.spad ${OUTSRC}/fmod.spad \
 ${OUTSRC}/fname.spad ${OUTSRC}/fnla.spad \
 ${OUTSRC}/fortcat.spad ${OUTSRC}/fortmac.spad ${OUTSRC}/fortpak.spad \
 ${OUTSRC}/fortran.spad ${OUTSRC}/forttyp.spad ${OUTSRC}/fourier.spad \
 ${OUTSRC}/fparfrac.spad ${OUTSRC}/fraction.spad ${OUTSRC}/free.spad \
 ${OUTSRC}/fr.spad ${OUTSRC}/fs2expxp.spad ${OUTSRC}/fs2ups.spad \
 ${OUTSRC}/fspace.spad ${OUTSRC}/funcpkgs.spad ${OUTSRC}/functions.spad \
 ${OUTSRC}/galfact.spad ${OUTSRC}/galfactu.spad ${OUTSRC}/galpolyu.spad \
 ${OUTSRC}/galutil.spad ${OUTSRC}/gaussfac.spad ${OUTSRC}/gaussian.spad \
 ${OUTSRC}/gbeuclid.spad ${OUTSRC}/gbintern.spad ${OUTSRC}/gb.spad \
 ${OUTSRC}/gdirprod.spad ${OUTSRC}/gdpoly.spad ${OUTSRC}/geneez.spad \
 ${OUTSRC}/generic.spad ${OUTSRC}/genufact.spad ${OUTSRC}/genups.spad \
 ${OUTSRC}/ghensel.spad ${OUTSRC}/gpgcd.spad ${OUTSRC}/gpol.spad \
 ${OUTSRC}/grdef.spad ${OUTSRC}/groebf.spad ${OUTSRC}/groebsol.spad \
 ${OUTSRC}/gseries.spad \
 ${OUTSRC}/ideal.spad ${OUTSRC}/idecomp.spad ${OUTSRC}/indexedp.spad \
 ${OUTSRC}/infprod.spad ${OUTSRC}/intaf.spad ${OUTSRC}/intalg.spad \
 ${OUTSRC}/intaux.spad ${OUTSRC}/intclos.spad ${OUTSRC}/intef.spad \
 ${OUTSRC}/integer.spad ${OUTSRC}/integrat.spad \
 ${OUTSRC}/interval.spad \
 ${OUTSRC}/intfact.spad ${OUTSRC}/intpm.spad \
 ${OUTSRC}/intrf.spad \
 ${OUTSRC}/irexpand.spad \
 ${OUTSRC}/irsn.spad ${OUTSRC}/ituple.spad \
 ${OUTSRC}/kl.spad ${OUTSRC}/kovacic.spad \
 ${OUTSRC}/laplace.spad ${OUTSRC}/laurent.spad ${OUTSRC}/leadcdet.spad \
 ${OUTSRC}/lie.spad ${OUTSRC}/limitps.spad ${OUTSRC}/lindep.spad \
 ${OUTSRC}/lingrob.spad ${OUTSRC}/liouv.spad ${OUTSRC}/listgcd.spad \
 ${OUTSRC}/list.spad ${OUTSRC}/lmdict.spad ${OUTSRC}/lodof.spad \
 ${OUTSRC}/lodop.spad ${OUTSRC}/lodo.spad \
 ${OUTSRC}/manip.spad ${OUTSRC}/mappkg.spad ${OUTSRC}/matcat.spad \
 ${OUTSRC}/matfuns.spad ${OUTSRC}/mathml.spad \
 ${OUTSRC}/matrix.spad ${OUTSRC}/matstor.spad \
 ${OUTSRC}/mesh.spad ${OUTSRC}/mfinfact.spad ${OUTSRC}/misc.spad \
 ${OUTSRC}/mkfunc.spad ${OUTSRC}/mkrecord.spad \
 ${OUTSRC}/mlift.spad ${OUTSRC}/moddfact.spad ${OUTSRC}/modgcd.spad \
 ${OUTSRC}/modmonom.spad ${OUTSRC}/modmon.spad ${OUTSRC}/modring.spad \
 ${OUTSRC}/moebius.spad ${OUTSRC}/mring.spad ${OUTSRC}/mset.spad \
 ${OUTSRC}/mts.spad ${OUTSRC}/multfact.spad ${OUTSRC}/multpoly.spad \
 ${OUTSRC}/multsqfr.spad \
 ${OUTSRC}/naalgc.spad ${OUTSRC}/naalg.spad \
 ${OUTSRC}/newdata.spad ${OUTSRC}/newpoint.spad \
 ${OUTSRC}/newpoly.spad ${OUTSRC}/nlinsol.spad ${OUTSRC}/nlode.spad \
 ${OUTSRC}/npcoef.spad \
 ${OUTSRC}/nregset.spad \
 ${OUTSRC}/nsregset.spad ${OUTSRC}/numeigen.spad ${OUTSRC}/numeric.spad \
 ${OUTSRC}/numode.spad ${OUTSRC}/numquad.spad ${OUTSRC}/numsolve.spad \
 ${OUTSRC}/numtheor.spad \
 ${OUTSRC}/oct.spad ${OUTSRC}/odealg.spad ${OUTSRC}/odeef.spad \
 ${OUTSRC}/oderf.spad ${OUTSRC}/opalg.spad \
 ${OUTSRC}/op.spad ${OUTSRC}/ore.spad \
 ${OUTSRC}/outform.spad ${OUTSRC}/out.spad \
 ${OUTSRC}/pade.spad ${OUTSRC}/padiclib.spad ${OUTSRC}/padic.spad \
 ${OUTSRC}/paramete.spad ${OUTSRC}/partperm.spad ${OUTSRC}/patmatch1.spad \
 ${OUTSRC}/patmatch2.spad ${OUTSRC}/pattern.spad ${OUTSRC}/pcurve.spad \
 ${OUTSRC}/pdecomp.spad ${OUTSRC}/perman.spad ${OUTSRC}/permgrps.spad \
 ${OUTSRC}/perm.spad ${OUTSRC}/pfbr.spad ${OUTSRC}/pfo.spad \
 ${OUTSRC}/pfr.spad ${OUTSRC}/pf.spad ${OUTSRC}/pgcd.spad \
 ${OUTSRC}/pgrobner.spad ${OUTSRC}/pinterp.spad ${OUTSRC}/pleqn.spad \
 ${OUTSRC}/plot3d.spad ${OUTSRC}/plot.spad ${OUTSRC}/plottool.spad \
 ${OUTSRC}/polset.spad ${OUTSRC}/poltopol.spad ${OUTSRC}/polycat.spad \
 ${OUTSRC}/poly.spad ${OUTSRC}/primelt.spad ${OUTSRC}/print.spad \
 ${OUTSRC}/product.spad ${OUTSRC}/prs.spad ${OUTSRC}/prtition.spad \
 ${OUTSRC}/pscat.spad ${OUTSRC}/pseudolin.spad ${OUTSRC}/ptranfn.spad \
 ${OUTSRC}/puiseux.spad \
 ${OUTSRC}/qalgset.spad ${OUTSRC}/quat.spad \
 ${OUTSRC}/radeigen.spad ${OUTSRC}/radix.spad ${OUTSRC}/random.spad \
 ${OUTSRC}/ratfact.spad ${OUTSRC}/rdeef.spad ${OUTSRC}/rderf.spad \
 ${OUTSRC}/rdesys.spad ${OUTSRC}/real0q.spad ${OUTSRC}/realzero.spad \
 ${OUTSRC}/reclos.spad ${OUTSRC}/regset.spad ${OUTSRC}/rep1.spad \
 ${OUTSRC}/rep2.spad ${OUTSRC}/resring.spad ${OUTSRC}/retract.spad \
 ${OUTSRC}/rf.spad ${OUTSRC}/riccati.spad ${OUTSRC}/rinterp.spad \
 ${OUTSRC}/routines.spad \
 ${OUTSRC}/rule.spad \
 ${OUTSRC}/seg.spad ${OUTSRC}/setorder.spad ${OUTSRC}/sets.spad \
 ${OUTSRC}/sex.spad ${OUTSRC}/sf.spad ${OUTSRC}/sgcf.spad \
 ${OUTSRC}/sign.spad ${OUTSRC}/si.spad ${OUTSRC}/smith.spad \
 ${OUTSRC}/solvedio.spad ${OUTSRC}/solvefor.spad ${OUTSRC}/solvelin.spad \
 ${OUTSRC}/solverad.spad ${OUTSRC}/sortpak.spad ${OUTSRC}/space.spad \
 ${OUTSRC}/special.spad ${OUTSRC}/sregset.spad ${OUTSRC}/s.spad \
 ${OUTSRC}/stream.spad ${OUTSRC}/string.spad ${OUTSRC}/sttaylor.spad \
 ${OUTSRC}/sttf.spad ${OUTSRC}/sturm.spad ${OUTSRC}/suchthat.spad \
 ${OUTSRC}/suls.spad ${OUTSRC}/sum.spad ${OUTSRC}/sups.spad \
 ${OUTSRC}/supxs.spad ${OUTSRC}/suts.spad ${OUTSRC}/symbol.spad \
 ${OUTSRC}/syssolp.spad ${OUTSRC}/system.spad \
 ${OUTSRC}/tableau.spad ${OUTSRC}/table.spad ${OUTSRC}/taylor.spad \
 ${OUTSRC}/tex.spad ${OUTSRC}/tools.spad ${OUTSRC}/transsolve.spad \
 ${OUTSRC}/tree.spad ${OUTSRC}/trigcat.spad ${OUTSRC}/triset.spad \
 ${OUTSRC}/tube.spad ${OUTSRC}/twofact.spad \
 ${OUTSRC}/unifact.spad ${OUTSRC}/updecomp.spad ${OUTSRC}/updivp.spad \
 ${OUTSRC}/utsode.spad \
 ${OUTSRC}/variable.spad ${OUTSRC}/vector.spad ${OUTSRC}/view2D.spad \
 ${OUTSRC}/view3D.spad ${OUTSRC}/viewDef.spad ${OUTSRC}/viewpack.spad \
 ${OUTSRC}/void.spad \
 ${OUTSRC}/weier.spad ${OUTSRC}/wtpol.spad \
 ${OUTSRC}/xlpoly.spad ${OUTSRC}/xpoly.spad \
 ${OUTSRC}/ystream.spad \
 ${OUTSRC}/zerodim.spad


TESTS=${INPUT}/INTHEORY.input ${INPUT}/VIEW2D.input ${INPUT}/TESTFR.input


subdir = src/algebra/

$(OUT)/SINT.$(FASLEXT): $(OUT)/INT.$(FASLEXT)
$(OUT)/NNI.$(FASLEXT): $(OUT)/INT.$(FASLEXT)
$(OUT)/PI.$(FASLEXT): $(OUT)/NNI.$(FASLEXT)

$(OUT)/TYPE.$(FASLEXT): $(OUT)/SINT.$(FASLEXT)
$(OUT)/IEVALAB.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/EVALAB.$(FASLEXT): $(OUT)/IEVALAB.$(FASLEXT)
$(OUT)/ELTAB.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)

$(OUT)/UTYPE.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/AHYP.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/PRIMCAT.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/ATTREG.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/CONDUIT.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/CFCAT.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)



$(OUT)/AGG.$(FASLEXT) $(OUT)/AGG-.$(FASLEXT): $(OUT)/BOOLE.$(FASLEXT)
$(OUT)/ELTAGG.$(FASLEXT): $(OUT)/AGG.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/IXAGG.$(FASLEXT): $(OUT)/ELTAGG.$(FASLEXT) $(OUT)/EVALAB.$(FASLEXT)
$(OUT)/RCAGG.$(FASLEXT): $(OUT)/EVALAB.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT) \
	$(OUT)/AGG.$(FASLEXT)
$(OUT)/QUAGG.$(FASLEXT): $(OUT)/BGAGG.$(FASLEXT)
$(OUT)/SKAGG.$(FASLEXT): $(OUT)/BGAGG.$(FASLEXT)
$(OUT)/DQAGG.$(FASLEXT): $(OUT)/QUAGG.$(FASLEXT) $(OUT)/SKAGG.$(FASLEXT)
$(OUT)/PRQAGG.$(FASLEXT): $(OUT)/BGAGG.$(FASLEXT)
#$(OUT)/DLAGG.$(FASLEXT): $(OUT)/RCAGG.$(FASLEXT)
#$(OUT)/URAGG.$(FASLEXT): $(OUT)/RCAGG.$(FASLEXT)
#$(OUT)/BRAGG.$(FASLEXT): $(OUT)/RCAGG.$(FASLEXT)
$(OUT)/FLAGG.$(FASLEXT): $(OUT)/BMODULE.$(FASLEXT) $(OUT)/PID.$(FASLEXT) \
	$(OUT)/OAGROUP.$(FASLEXT) $(OUT)/RETRACT.$(FASLEXT) \
	$(OUT)/LINEXP.$(FASLEXT) $(OUT)/PATMAB.$(FASLEXT) \
	$(OUT)/REAL.$(FASLEXT) $(OUT)/CHARZ.$(FASLEXT) \
	$(OUT)/DIFFSPC.$(FASLEXT)
$(OUT)/A1AGG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/BOOLE-.$(FASLEXT) \
	$(OUT)/FLAGG.$(FASLEXT) $(OUT)/LOGIC-.$(FASLEXT) \
	$(OUT)/ORDTYPE-.$(FASLEXT)
$(OUT)/SRAGG.$(FASLEXT): $(OUT)/A1AGG.$(FASLEXT)
$(OUT)/STAGG.$(FASLEXT): $(OUT)/URAGG.$(FASLEXT) $(OUT)/LNAGG.$(FASLEXT)
$(OUT)/LNAGG.$(FASLEXT): $(OUT)/SEGCAT.$(FASLEXT)
$(OUT)/SEGCAT.$(FASLEXT): $(OUT)/KRCFROM.$(FASLEXT)
$(OUT)/SETAGG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/CLAGG.$(FASLEXT)
$(OUT)/STRING.$(FASLEXT): $(OUT)/SRAGG.$(FASLEXT) $(OUT)/ORDFIN.$(FASLEXT)
$(OUT)/DIOPS.$(FASLEXT): $(OUT)/STRING.$(FASLEXT)
$(OUT)/DIAGG.$(FASLEXT): $(OUT)/DIOPS.$(FASLEXT)
$(OUT)/KDAGG.$(FASLEXT): $(OUT)/DIAGG.$(FASLEXT)
$(OUT)/TBAGG.$(FASLEXT): $(OUT)/KDAGG.$(FASLEXT)
$(OUT)/ALAGG.$(FASLEXT): $(OUT)/TBAGG.$(FASLEXT)
$(OUT)/LIST.$(FASLEXT): $(OUT)/LSAGG.$(FASLEXT) $(OUT)/REF.$(FASLEXT) \
	$(OUT)/ALIST.$(FASLEXT) $(OUT)/PRIMARR.$(FASLEXT)

$(OUT)/MSYSCMD.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)

$(OUT)/KOERCE.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/KRCFROM.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)

$(OUT)/KONVERT.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/KVTFROM.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)

$(OUT)/RETRACT.$(FASLEXT): $(OUT)/KRCFROM.$(FASLEXT)

$(OUT)/BASTYPE.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/SETCAT.$(FASLEXT) $(OUT)/SETCAT-.$(FASLEXT): $(OUT)/BASTYPE.$(FASLEXT)

$(OUT)/FINITE.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/ORDSET.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) \
	$(OUT)/ORDTYPE.$(FASLEXT)
$(OUT)/FILECAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/SEXCAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/PID.$(FASLEXT) \
	$(OUT)/OAGROUP.$(FASLEXT) $(OUT)/LINEXP.$(FASLEXT) \
	$(OUT)/PATMAB.$(FASLEXT) $(OUT)/REAL.$(FASLEXT) \
	$(OUT)/CHARZ.$(FASLEXT) $(OUT)/AGG.$(FASLEXT) \
	$(OUT)/IXAGG.$(FASLEXT) $(OUT)/FLAGG.$(FASLEXT) \
	$(OUT)/ELAGG.$(FASLEXT)
$(OUT)/STEP.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/PATMAB.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/REAL.$(FASLEXT): $(OUT)/KONVERT.$(FASLEXT)

$(OUT)/LOGIC.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/BOOLE.$(FASLEXT): $(OUT)/LOGIC.$(FASLEXT)

$(OUT)/SGROUP.$(FASLEXT) $(OUT)/SGROUP-.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) \
	$(OUT)/PI.$(FASLEXT)
$(OUT)/ABELSG.$(FASLEXT) $(OUT)/ABELSG-.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/LMODULE.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) \
	$(OUT)/LLINSET.$(FASLEXT) $(OUT)/SGROUP.$(FASLEXT)
$(OUT)/RMODULE.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/RLINSET.$(FASLEXT)
$(OUT)/BMODULE.$(FASLEXT): $(OUT)/LMODULE.$(FASLEXT) \
	$(OUT)/RMODULE.$(FASLEXT) $(OUT)/SGROUP.$(FASLEXT)
$(OUT)/MODULE.$(FASLEXT): $(OUT)/BMODULE.$(FASLEXT) $(OUT)/LINSET.$(FASLEXT)
$(OUT)/ALGEBRA.$(FASLEXT): $(OUT)/MODULE.$(FASLEXT)
$(OUT)/OAGROUP.$(FASLEXT): $(OUT)/OCAMON.$(FASLEXT)
$(OUT)/OCAMON.$(FASLEXT): $(OUT)/OAMON.$(FASLEXT)
$(OUT)/OAMON.$(FASLEXT): $(OUT)/OASGP.$(FASLEXT)
$(OUT)/OAMONS.$(FASLEXT): $(OUT)/OAMON.$(FASLEXT)
$(OUT)/OASGP.$(FASLEXT): $(OUT)/ORDSET.$(FASLEXT) $(OUT)/ABELSG.$(FASLEXT)
$(OUT)/RNG.$(FASLEXT): $(OUT)/SGROUP.$(FASLEXT)

$(OUT)/LLINSET.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/RLINSET.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/LINSET.$(FASLEXT): $(OUT)/LLINSET.$(FASLEXT) $(OUT)/RLINSET.$(FASLEXT)

$(OUT)/CTORKIND.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/IOMODE.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)

$(OUT)/PRINT.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/RTVALUE.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/SYSPTR.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)

$(OUT)/VOID.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT)
$(OUT)/OUT.$(FASLEXT): $(OUT)/VOID.$(FASLEXT)

$(OUT)/DIFFDOM.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/DIFFSPC.$(FASLEXT): $(OUT)/DIFFDOM.$(FASLEXT)
$(OUT)/DIFFMOD.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT)
$(OUT)/PDDOM.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/PDSPC.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/DSEXT.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT) $(OUT)/PDSPC.$(FASLEXT)
$(OUT)/ORDTYPE.$(FASLEXT): $(OUT)/BASTYPE.$(FASLEXT)
$(OUT)/ORDSTRCT.$(FASLEXT): $(OUT)/ORDTYPE.$(FASLEXT) $(OUT)/HOMOTOP.$(FASLEXT)

axiom_algebra_layer_0 = \
  AHYP     ATTREG   CFCAT    ELTAB    KOERCE   KONVERT  \
  KRCFROM  KVTFROM  IEVALAB  IEVALAB- EVALAB   EVALAB-  \
  RETRACT  RETRACT- SETCAT   SETCAT-  VOID     SEGCAT   \
  MSYSCMD  FINITE                              OUT      \
  PRIMCAT  PRINT    PTRANFN  SPFCAT   TYPE     UTYPE    \
  BMODULE           BASTYPE  BASTYPE- STEP     LMODULE  \
  RMODULE  ALGEBRA  ALGEBRA- SGROUP   SGROUP-  ABELSG   \
  ABELSG-  ORDSET            OASGP    FILECAT  SEXCAT   \
  MODULE   MODULE-  PID      OAGROUP  OAGROUP- OCAMON   \
  OAMON    OAMON- \
  RNG      ORDFIN   LLINSET  RLINSET  LINSET   OAMONS   \
  MKBCFUNC MKRECORD MKUCFUNC DROPT1   PLOT1    ITFUN2   \
  ITFUN3   STREAM1  STREAM2  STREAM3  ANY1     SEGBIND2 \
  COMBOPC  EQ2      NONE1    CONDUIT  IOMODE   CTORKIND \
  AGG      AGG-     ELTAGG   ELTAGG-  IXAGG    IXAGG-   \
  BGAGG    BGAGG-   BRAGG    BRAGG-   ELAGG    ELAGG-   \
  DLAGG    DQAGG    QUAGG    SKAGG    PRQAGG   ALAGG    \
  FLAGG    FLAGG-   URAGG    URAGG-   LNAGG    LNAGG-   \
  A1AGG    A1AGG-   LSAGG    LSAGG-   SRAGG    SRAGG-   \
  FSAGG    FSAGG-   STAGG    STAGG-   CLAGG    CLAGG-   \
  RCAGG    RCAGG-   SETAGG   SETAGG-  HOAGG    HOAGG-   \
  TBAGG    TBAGG-   KDAGG    KDAGG-   DIAGG    DIAGG-   \
  DIOPS    DIOPS-   STRING                              \
  LIST     DIFFDOM  DIFFDOM- DIFFSPC  DIFFSPC- DIFFMOD  \
  LINEXP   PATMAB   REAL     CHARZ    LOGIC    LOGIC-   \
  RTVALUE  SYSPTR   PDDOM    PDDOM-   PDSPC    PDSPC-   \
  DSEXT    DSEXT-   ORDTYPE  ORDTYPE- ORDSTRCT          \
  BOOLE    BOOLE-   REF      ALIST    PRIMARR  SRING    \
  INS      INS-     DIVRING  DIVRING- EUCDOM   EUCDOM-  \
                    FPS      FPS-     RNS      RNS-     \
  POLYCAT  POLYCAT- QFCAT    QFCAT-                     \
  INT      NNI      PI       SINT     SYMBOL   DFLOAT

axiom_algebra_layer_0_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_0))

axiom_algebra_layer_0_objects = \
	$(addprefix $(OUT)/, \
           $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_0))) 

$(OUT)/HOMOTOP.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/KRCFROM.$(FASLEXT)
$(OUT)/ITUPLE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/STREAM.$(FASLEXT)
$(OUT)/PATAB.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT)
$(OUT)/PPCURVE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT)
$(OUT)/PSCURVE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT)

$(OUT)/IEVALAB.$(FASLEXT) $(OUT)/IEVALAB-.$(FASLEXT): \
	$(OUT)/SETCAT.$(FASLEXT)
$(OUT)/EVALAB.$(FASLEXT) $(OUT)/EVALAB-.$(FASLEXT): \
	$(OUT)/IEVALAB.$(FASLEXT)

$(OUT)/PROPLOG.$(FASLEXT): $(OUT)/BOOLE.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT)

$(OUT)/MAYBE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/RETRACT.$(FASLEXT)

$(OUT)/BYTEORD.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)

$(OUT)/SRING.$(FASLEXT): $(OUT)/ABELMON.$(FASLEXT) $(OUT)/MONOID.$(FASLEXT)
$(OUT)/RING.$(FASLEXT): $(OUT)/RNG.$(FASLEXT) $(OUT)/MONOID.$(FASLEXT) \
	$(OUT)/LMODULE.$(FASLEXT) $(OUT)/KOERCE.$(FASLEXT)
$(OUT)/MONOID.$(FASLEXT): $(OUT)/SGROUP.$(FASLEXT)
$(OUT)/ABELGRP.$(FASLEXT): $(OUT)/CABMON.$(FASLEXT) $(OUT)/LLINSET.$(FASLEXT)
$(OUT)/ABELMON.$(FASLEXT): $(OUT)/ABELSG.$(FASLEXT)
$(OUT)/ORDRING.$(FASLEXT): $(OUT)/OAGROUP.$(FASLEXT) $(OUT)/RING.$(FASLEXT) \
	$(OUT)/MONOID.$(FASLEXT)
$(OUT)/COMRING.$(FASLEXT): $(OUT)/RING.$(FASLEXT) $(OUT)/BMODULE.$(FASLEXT)
$(OUT)/DIFRING.$(FASLEXT): $(OUT)/RING.$(FASLEXT)
$(OUT)/ENTIRER.$(FASLEXT): $(OUT)/RING.$(FASLEXT) $(OUT)/BMODULE.$(FASLEXT)
$(OUT)/INTDOM.$(FASLEXT): $(OUT)/COMRING.$(FASLEXT) $(OUT)/ALGEBRA.$(FASLEXT) \
	$(OUT)/ENTIRER.$(FASLEXT) $(OUT)/FIELD.$(FASLEXT)
$(OUT)/OINTDOM.$(FASLEXT): $(OUT)/INTDOM.$(FASLEXT) $(OUT)/ORDRING.$(FASLEXT)
$(OUT)/GCDDOM.$(FASLEXT): $(OUT)/INTDOM.$(FASLEXT)
$(OUT)/UFD.$(FASLEXT): $(OUT)/GCDDOM.$(FASLEXT) $(OUT)/ES.$(FASLEXT)
$(OUT)/ES.$(FASLEXT): $(OUT)/RING.$(FASLEXT) $(OUT)/CACHSET.$(FASLEXT) \
	$(OUT)/REF.$(FASLEXT) $(OUT)/ALIST.$(FASLEXT) \
	$(OUT)/PATAB.$(FASLEXT) $(OUT)/PRIMARR.$(FASLEXT) \
	$(OUT)/MAYBE.$(FASLEXT)
$(OUT)/CACHSET.$(FASLEXT): $(OUT)/ORDSET.$(FASLEXT)
$(OUT)/ALIST.$(FASLEXT): $(OUT)/ALAGG.$(FASLEXT)
$(OUT)/PATAB.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/BOOLEAN.$(FASLEXT): $(OUT)/PROPLOG.$(FASLEXT)
$(OUT)/VECTCAT.$(FASLEXT): $(OUT)/RADCAT.$(FASLEXT)
$(OUT)/IARRAY1.$(FASLEXT): $(OUT)/PRIMARR.$(FASLEXT)
$(OUT)/PROPERTY.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT) $(OUT)/PAIR.$(FASLEXT)
$(OUT)/BINDING.$(FASLEXT): $(OUT)/PROPERTY.$(FASLEXT)
$(OUT)/OPERCAT.$(FASLEXT): $(OUT)/ARITY.$(FASLEXT)
$(OUT)/REF.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/IDENT.$(FASLEXT)
$(OUT)/DIFRING.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT)
$(OUT)/PDMOD.$(FASLEXT): $(OUT)/RING.$(FASLEXT) $(OUT)/PDSPC.$(FASLEXT) \
	$(OUT)/COMRING.$(FASLEXT) $(OUT)/MODULE.$(FASLEXT)
$(OUT)/DMEXT.$(FASLEXT): $(OUT)/DSEXT.$(FASLEXT) $(OUT)/DIFFMOD.$(FASLEXT) \
	$(OUT)/PDMOD.$(FASLEXT)
$(OUT)/STREAM.$(FASLEXT): $(OUT)/LZSTAGG.$(FASLEXT)

axiom_algebra_layer_1 = \
  ABELGRP  ABELGRP- ABELMON  ABELMON- ITUPLE   \
  CABMON   MONOID   MONOID-  RING     RING-     COMRING  \
  DIFRING           ENTIRER  INTDOM   INTDOM-   OINTDOM  \
  GCDDOM   GCDDOM-  UFD      UFD-     ES        ES-      \
  PATAB    PPCURVE  PSCURVE  CACHSET  RESLATC            \
  IDENT    OUTFORM  BINDING           BOOLEAN            \
  ORDRING                    FEVALAB  FEVALAB-  IARRAY1  \
  OSGROUP  MAYBE    DATAARY  PROPLOG  HOMOTOP   BYTEORD  \
  FIELD    FIELD-   VECTCAT  VECTCAT- \
  PROPERTY ARITY    OPERCAT  OPERCAT- PAIR      STREAM   \
  RADCAT   RADCAT-  PDMOD    DMEXT    LZSTAGG   LZSTAGG-

axiom_algebra_layer_1_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_1))

axiom_algebra_layer_1_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_1)))
axiom_algebra_layer_2 = \
  SYNTAX   INTRET   SEGXCAT CONTOUR  LIST3   MKFUNC   \
  COMMONOP          FNCAT   SCACHE   BOP     BOP1     \
  DOMTMPLT FCTRDATA

$(OUT)/FNCAT.$(FASLEXT): $(OUT)/HOMOTOP.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/SYNTAX.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT)
$(OUT)/COMMONOP.$(FASLEXT): $(OUT)/BOP.$(FASLEXT)
$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) $(OUT)/OAMONS.$(FASLEXT)
$(OUT)/FCTRDATA.$(FASLEXT): $(OUT)/DOMTMPLT.$(FASLEXT)

axiom_algebra_layer_2_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_2))

axiom_algebra_layer_2_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_2)))
axiom_algebra_layer_3 = \
   GRDEF     SCOPE    MAPHACK1 MAPHACK2 MAPHACK3 MAPPKG1  \
   MAPPKG2   MAPPKG3  INTBIT   MONAD    MONAD-   


$(OUT)/MONAD.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/SCOPE.$(FASLEXT): $(OUT)/BINDING.$(FASLEXT)

axiom_algebra_layer_3_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_3))

axiom_algebra_layer_3_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_3)))

$(OUT)/ENV.$(FASLEXT): $(OUT)/SCOPE.$(FASLEXT)
$(OUT)/COMM.$(FASLEXT): $(OUT)/OSI.$(FASLEXT)
$(OUT)/PALETTE.$(FASLEXT): $(OUT)/COLOR.$(FASLEXT)


axiom_algebra_layer_4 = \
  ANON     OSI      COMM     COMPPROP EXIT     \
  FAMONC   FORMULA1 IDPC              NONE     \
  COLOR             ONECOMP2          \
  PALETTE  PARPCURV PARPC2   PARSCURV PARSC2   PARSURF  \
  PARSU2            PATRES2  PATTERN1 PDECAT            \
  REPSQ    REPDB    RFDIST   RIDIST   SPACEC   SPLNODE  \
  SUCH     TEX1     UDVO     YSTREAM           ENV      \
  ATRIG    ATRIG-   GROUP    GROUP-   LALG     LALG- 


axiom_algebra_layer_4_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_4))

axiom_algebra_layer_4_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_4)))

$(OUT)/KERNEL.$(FASLEXT): $(OUT)/KERNEL2.$(FASLEXT)
$(OUT)/DVARCAT.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT)
$(OUT)/PDRING.$(FASLEXT): $(OUT)/PDSPC.$(FASLEXT)

axiom_algebra_layer_5 = \
           CHARNZ            DVARCAT  DVARCAT- ELEMFUN  \
  ELEMFUN- FCOMP    FPATMAB  IDPAM    IDPO     \
  INCRMAPS KERNEL2           MODMONOM MONADWU  MONADWU- \
  MRF2     NARNG    NARNG-   NSUP2    ODVAR    OPQUERY  \
           ORDMON   PATMATCH PERMCAT  PDRING            \
  SDVAR    SUP2     TRIGCAT  TRIGCAT- ULS2     UP2      \
  ELABEXPR KERNEL

axiom_algebra_layer_5_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_5))

axiom_algebra_layer_5_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_5)))

$(OUT)/CHARPOL.$(FASLEXT): $(OUT)/SETCAT-.$(FASLEXT)
$(OUT)/PROPFRML.$(FASLEXT): $(OUT)/KERNEL.$(FASLEXT)
$(OUT)/KTVLOGIC.$(FASLEXT): $(OUT)/PROPLOG.$(FASLEXT) $(OUT)/BYTE.$(FASLEXT)
$(OUT)/PROPFUN1.$(FASLEXT): $(OUT)/PROPFRML.$(FASLEXT)
$(OUT)/PROPFUN2.$(FASLEXT): $(OUT)/PROPFRML.$(FASLEXT)
$(OUT)/DIFEXT.$(FASLEXT): $(OUT)/DSEXT.$(FASLEXT)
$(OUT)/BYTE.$(FASLEXT): $(OUT)/LOGIC.$(FASLEXT)
$(OUT)/SYSNNI.$(FASLEXT): $(OUT)/LOGIC.$(FASLEXT) $(OUT)/ORDFIN.$(FASLEXT)

axiom_algebra_layer_6 = \
  PROPFRML PROPFUN1 AUTOMOR  CARTEN2 CHARPOL  COMPLEX2 \
  DIFEXT            ES1      ES2     GRMOD    GRMOD-   \
  HYPCAT   HYPCAT-           MODRING NASRING  NASRING- \
  SORTPAK  ZMOD     PROPFUN2                           \
  KTVLOGIC                   BYTE    SYSINT   SYSNNI

axiom_algebra_layer_6_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_6))
axiom_algebra_layer_6_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_6)))
$(OUT)/IFAMON.$(FASLEXT): $(OUT)/LMOPS.$(FASLEXT)
axiom_algebra_layer_7 = \
  BTCAT   BTCAT-  LMOPS             FMCAT   IDPOAM   \
  IFAMON  GRALG   GRALG-                             \
  INT8    INT16   INT32    INT64    UINT8   UINT16   \
  UINT32  UINT64

axiom_algebra_layer_7_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_7))

axiom_algebra_layer_7_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_7)))

$(OUT)/BSTREE.$(FASLEXT): $(OUT)/BTREE.$(FASLEXT)
$(OUT)/ITAYLOR.$(FASLEXT): $(OUT)/STREAM.$(FASLEXT)

axiom_algebra_layer_8 = \
  BSTREE  BTOURN   CARD     DRAWHACK  FACTFUNC \
  FR2     FRAC2    FRUTIL   ITAYLOR   MLO      NAALG \
  NAALG-  OP       ORDCOMP2 RANDSRC   UNISEG2  XALG  \
  BTREE                               ARR2CAT  ARR2CAT-

axiom_algebra_layer_8_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_8))

axiom_algebra_layer_8_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_8)))
$(OUT)/FT.$(FASLEXT): $(OUT)/FST.$(FASLEXT)

axiom_algebra_layer_9 = \
  AMR      AMR-     DEGRED   DLP      EAB      \
  FAGROUP  FAMONOID FLINEXP  FLINEXP- FRETRCT  FRETRCT- \
  FSERIES  FT       IDPAG    IDPOAMS  INFINITY LA       \
  OMLO     ORTHPOL  PRODUCT  PADICCT  PMPRED   PMASS    \
  PTFUNC2                    RATRET   RADUTIL  UPXS2    \
  XFALG    ZLINDEP  BBTREE   TABLE    INTABL            \
  SIG      FMONCAT  FST


axiom_algebra_layer_9_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_9))

axiom_algebra_layer_9_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_9)))
$(OUT)/ANY.$(FASLEXT): $(OUT)/SEX.$(FASLEXT)

$(OUT)/SEX.$(FASLEXT): $(OUT)/SEXOF.$(FASLEXT)
$(OUT)/LEXP.$(FASLEXT): $(OUT)/XPBWPOLY.$(FASLEXT)
$(OUT)/XPBWPOLY.$(FASLEXT): $(OUT)/XPOLYC.$(FASLEXT)
$(OUT)/PENDTREE.$(FASLEXT): $(OUT)/TREE.$(FASLEXT)
$(OUT)/QFORM.$(FASLEXT): $(OUT)/SQMATRIX.$(FASLEXT)
$(OUT)/SQMATRIX.$(FASLEXT): $(OUT)/SMATCAT.$(FASLEXT) \
	$(OUT)/MATRIX.$(FASLEXT) $(OUT)/IIARRAY2.$(FASLEXT)
$(OUT)/SMATCAT.$(FASLEXT): $(OUT)/RMATCAT.$(FASLEXT)
$(OUT)/RMATCAT.$(FASLEXT): $(OUT)/DIRPROD.$(FASLEXT)
$(OUT)/DIRPROD.$(FASLEXT): $(OUT)/DIRPCAT.$(FASLEXT)
$(OUT)/DIRPCAT.$(FASLEXT): $(OUT)/VSPACE.$(FASLEXT) $(OUT)/IVECTOR.$(FASLEXT)
$(OUT)/MATRIX.$(FASLEXT): $(OUT)/MATCAT.$(FASLEXT)
$(OUT)/BTAGG.$(FASLEXT): $(OUT)/BOOLE.$(FASLEXT)
$(OUT)/PATLRES.$(FASLEXT): $(OUT)/PATRES.$(FASLEXT)

axiom_algebra_layer_10 = \
  BPADIC   ANY      \
  SEXOF    CRAPACK  DEQUEUE  DLIST    \
  DRAWCX   \
  DRAWPT   FAMR     FAMR-    FLASORT  \
  FLAGG2   FGROUP   FM       FM1      \
  FPC      FPC-     FMONOID  INDE     \
  IPADIC   IROOT    IR2      LEXP     \
  LIECAT   LIECAT-  LIST2    LIST2MAP \
  SEX      HASHTBL  TREE     MAGMA    \
  MESH     MOEBIUS  MODFIELD MODOP    \
  MRING    MTHING   NCNTFRAC NCODIV   \
  NUMTUBE  ODR      OFMONOID ONECOMP  \
  ORDCOMP  OREPCAT  OREPCAT- OWP      \
  PADIC    PATTERN2 PATLRES  PARTPERM \
  PBWLB    PENDTREE PGE      PGROEB   \
  PINTERP  PLOTTOOL PFR      PMDOWN   \
  PRTITION PMINS    PMLSAGG  PMTOOLS  \
  PSCAT    PSCAT-   QFORM    QUEUE    \
  SQMATRIX SEG      SEG2     MTSCAT   \
  STACK    STTAYLOR TABLBUMP TABLEAU  \
  TOPSP    TRANFUN  TRANFUN- TUBE     \
  UDPO     UNISEG   VIEW     VSPACE   \
  VSPACE-  XPOLYC   XPR      BTAGG    BTAGG-  \
  FUNDESC  XPBWPOLY SMATCAT  SMATCAT- \
  RMATRIX  RMATCAT  RMATCAT- DIRPROD \
  DIRPCAT  DIRPCAT- IVECTOR  MATRIX  \
  MATCAT   MATCAT-  IIARRAY2 FFIELDC  FFIELDC-


axiom_algebra_layer_10_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_10))

axiom_algebra_layer_10_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_10)))
$(OUT)/ARRAY2.$(FASLEXT): $(OUT)/IFARRAY.$(FASLEXT)

axiom_algebra_layer_11 = \
  APPLYORE ARRAY1   ARRAY12  ARRAY2   \
  ASTACK   COMBINAT \
  CSTTOOLS FARRAY   \
  FLALG    GALUTIL  HEAP              \
  IARRAY2  IFARRAY  INTCAT   INTHEORY \
  IRREDFFX LFCAT    LODOCAT  LODOCAT- \
  LWORD                      MATSTOR  \
  ORESUP   OREPCTO  OREUP    PLOT3D   \
  PR       PREASSOC PRIMARR2 REDORDER \
           SYMPOLY  \
  TS       TUPLE    UPSCAT   UPSCAT-  \
                    XDPOLY   XEXPPKG  \
  XF       XF-               XPOLY    \
  XRPOLY   FFIELDC  FFIELDC- MTSCAT

axiom_algebra_layer_11_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_11))

axiom_algebra_layer_11_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_11)))
axiom_algebra_layer_12 = \
  ULSCAT                           BITS     DIRPROD2 IMATRIX \
           LPOLY   LSMP    LSMP1   MATCAT2  PTCAT    TRIMAT  \
                   SYSTEM  HOSTNAME PORTNUM

axiom_algebra_layer_12_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_12))

axiom_algebra_layer_12_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_12)))

$(OUT)/UPOLYC.$(FASLEXT): $(OUT)/PFECAT.$(FASLEXT)
$(OUT)/SETMN.$(FASLEXT): $(OUT)/IBITS.$(FASLEXT)

axiom_algebra_layer_13 = \
  ASSOCEQ  CARTEN   CLIF     CLIP     \
  UPOLYC   UPOLYC-                    \
  COORDSYS DBASE    DHMATRIX DIOSP    \
                    FAXF     FAXF-    FFPOLY2  \
  FNLA     GRAY     HB       IRSN     \
  MHROWRED NUMODE   NUMQUAD  \
  ODESYS   ODETOOLS ORDFUNS  PERMAN   \
  PFECAT   PFECAT-  POINT    PSEUDLIN \
  PTPACK   REP2     SETMN             \
  SYMFUNC  VECTOR2  VECTOR   CHAR  \
  INBCON   INBCON-  OUTBCON  OUTBCON-

axiom_algebra_layer_13_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_13))

axiom_algebra_layer_13_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_13)))
$(OUT)/FS.$(FASLEXT): $(OUT)/UPOLYC.$(FASLEXT)
$(OUT)/FILE.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT)

axiom_algebra_layer_14 = \
  FS       FS-      ACF      ACF-     \
  ACFS    ACFS-    BALFACT  BEZOUT   BINARY   BINFILE  BOUNDZRO \
  BPADICRT BRILL    CDEN     CHVAR    \
  COMMUPC  CONTFRAC CVMP     CYCLOTOM \
  CYCLES   DDFACT   DECIMAL           DISPLAY  DMP      \
  DPMO     DPOLCAT  DPOLCAT- EMR      EQ       ERROR    \
  EVALCYC  FACUTIL  FF       FFCG     \
  FFCGX    FFHOM    FFNB     FFNBX    \
  FFPOLY   FFX      FFSLPE   FGLMICPK \
  FILE     FINAALG  FINAALG- FINRALG  \
  FINRALG-          FLOATRP  FNAME    \
  FORMULA  FRAC     \
  GENEEZ   GENMFACT GENPGCD  \
  GALFACTU GALPOLYU GB       GBEUCLID \
  GBF      GBINTERN GHENSEL  GMODPOL  \
  GOSPER   GRIMAGE  GROEBSOL HDMP     \
  HDP      HEXADEC  HEUGCD   IBPTOOLS \
  IFF               ICARD    ICDEN    \
  IDECOMP           IMATLIN  IMATQF   \
  INMODGCD INNMFACT INPSIGN  INTHERTR \
  INTRAT   INTRF    INTSLPE  INTTR    \
  ISUMP    LAUPOL   LEADCDET LGROBP   \
  LIMITRF  LINDEP   LO       LPEFRAC  \
  LSPP     MATLIN   MCDEN    MDDFACT  \
  MFINFACT MLIFT    \
  MMAP     MODMON   MONOTOOL MPCPF    \
  MPC2     MPC3     MPOLY    MPRFF    \
  MRATFAC  MULTSQFR NORMRETR NPCOEF   \
  NSUP     NTPOLFN  ODP      ODEPRIM  \
  ODEPRRIC                   PADEPAC  \
  PADICRAT PADICRC  PCOMP    PDECOMP  \
  PF       PFBR     PFBRU    PFOTOOLS \
  PFRPAC   PGCD     PINTERPA PLEQN    \
  PMPLCAT  PMQFCAT  PNTHEORY POLUTIL  \
  POLTOPOL POLYCATQ POLYLIFT POLYROOT \
  POLY2    POLY2UP  PRS      PSQFR    \
  PUSHVAR  QALGSET  QFCAT2   RADIX    \
  RATFACT  RCFIELD  RCFIELD- RDETR    \
  RDETRS   REAL0    REAL0Q   REALSOLV \
  RESRING  RETSOL   RF       RFFACTOR \
                    RRCC     RRCC-    \
  SCPKG    SHDP     SHP      SIGNRF   \
  SMITH    SMP      SMTS     SOLVEFOR \
  SPLTREE  STINPROD STTFNC   SUBRESP  \
  SUMRF    SUP      SUPFRACF TANEXP   \
  TEX      TEXTFILE          \
  TWOFACT  UNIFACT  UP       UPCDEN   \
  UPDECOMP UPDIVP   UPMP     UPOLYC2  \
  UPXSCAT  UPSQFREE VIEWDEF  VIEW2D   \
           WEIER    WP       \
  EQTBL    GSTBL            \
           STBL     STRTBL\
                    SYMS     SYMTAB \
  IOBCON   


axiom_algebra_layer_14_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_14))

axiom_algebra_layer_14_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_14)))
$(OUT)/EXPUPXS.$(FASLEXT): $(OUT)/UPXS.$(FASLEXT)
$(OUT)/UPXS.$(FASLEXT): $(OUT)/UPXSCAT.$(FASLEXT) $(OUT)/UPXSCONS.$(FASLEXT) \
	$(OUT)/ULS.$(FASLEXT) $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/UPXSCONS.$(FASLEXT): $(OUT)/UPXSCCA.$(FASLEXT)
$(OUT)/ULS.$(FASLEXT): $(OUT)/ULSCONS.$(FASLEXT) $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/ULSCONS.$(FASLEXT): $(OUT)/ULSCCAT.$(FASLEXT)
$(OUT)/ULSCCAT.$(FASLEXT): $(OUT)/UTS.$(FASLEXT)
$(OUT)/UTS.$(FASLEXT): $(OUT)/UTSCAT.$(FASLEXT) $(OUT)/PDDOM.$(FASLEXT)

axiom_algebra_layer_15 = \
  DSMP     EXPUPXS  UPXS     UPXSCONS \
  FRAMALG  FRAMALG- MDAGG    ODPOL   \
  PLOT     RMCAT2   ROIRC    SDPOL   \
  ULS      ULSCONS  TUBETOOL UPXSCCA \
  UPXSCCA- JVMBCODE POLY       BYTEBUF    OVERSET \
  ULSCCAT  ULSCCAT- UTS      UTSCAT  UTSCAT-

axiom_algebra_layer_15_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_15))

axiom_algebra_layer_15_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_15)))
$(OUT)/SPACE3.$(FASLEXT): $(OUT)/SUBSPACE.$(FASLEXT)

axiom_algebra_layer_16 = \
  DPMM     EFUPXS  FFINTBAS FRIDEAL                    \
  FRIDEAL2 FRMOD   \
  IBATOOL  INTFACT \
  MSETAGG  MONOGEN MONOGEN- NFINTBAS \
  SPACE3   FFF     SUBSPACE

axiom_algebra_layer_16_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_16))

axiom_algebra_layer_16_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_16)))
axiom_algebra_layer_17 = \
  CCLASS  FSAGG2  GALFACT IALGFACT CTORCAT  CTORCAT- \
  IBACHIN MMLFORM NORMMA  ODERED  OMSAGG    OPSIG    \
  PERM    PERMGRP PRIMES  PWFFINTB \
  RDIST   SAE     SAEFACT SAERFFC  \
  SGCF VIEW3D 

axiom_algebra_layer_17_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_17))

axiom_algebra_layer_17_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_17)))
$(OUT)/PSETCAT.$(FASLEXT): $(OUT)/RPOLCAT.$(FASLEXT)

axiom_algebra_layer_18 = \
	IPF     CATCTOR DOMCTOR   CTORCALL \
  KAFILE  PATRES TBCMPPK PSETCAT    PSETCAT-  \
  RPOLCAT  RPOLCAT-

axiom_algebra_layer_18_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_18))

axiom_algebra_layer_18_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_18)))
$(OUT)/TSETCAT.$(FASLEXT): $(OUT)/PSETCAT.$(FASLEXT) $(OUT)/RPOLCAT.$(FASLEXT)
$(OUT)/FPARFRAC.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT)

axiom_algebra_layer_19 = \
  ACPLOT   ANTISYM           \
                             COMPCAT \
  COMPCAT- DRAW     DRAWCFUN DROPT   \
  DROPT0   EP       \
  FFCAT    FFCAT-   FFCGP    FFNBP   \
  FFP      FLOAT    FPARFRAC FR      \
  FRNAALG  FRNAALG- EXPR             \
           FUNCTION GDMP     HACKPI  \
  IDEAL    INFORM   INFORM1  IPRNTPK \
  IR       ISUPS             LIB     \
  LMDICT   LODOOPS           MKFLCFN \
  MSET                         \
  NREP     NUMFMT   OC       OC-     \
           ODERAT                    \
                    PATTERN  OVAR    \
  PMKERNEL PMSYM             PRIMELT \
  QALGSET2 QEQUAT   RECLOS   REP1    \
           QUATCAT  QUATCAT- RFFACT  \
           ROMAN    RNGBIND \
           RULECOLD SAOS     SEGBIND \
  SET      SPECOUT           \
                    SYSSOLP          \
           VARIABLE WFFINTBS SPADPRSR \
  PARSER            TSETCAT  TSETCAT-

axiom_algebra_layer_19_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_19))

axiom_algebra_layer_19_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_19)))
$(OUT)/AN.$(FASLEXT): $(OUT)/IAN.$(FASLEXT)
$(OUT)/IAN.$(FASLEXT): $(OUT)/EXPR.$(FASLEXT)
$(OUT)/SUTS.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/OCT.$(FASLEXT): $(OUT)/QUAT.$(FASLEXT)

axiom_algebra_layer_20 = \
  AF       ALGFACT  ALGFF    ALGMANIP ALGMFACT ALGPKG   \
  ALGSC    AN       APPRULE  CINTSLPE COMPFACT COMPLEX  \
  COMPLPAT CMPLXRT  CPMATCH  CRFP     \
  CTRIGMNP \
  DBLRESP  DERHAM   DFSFUN   DRAWCURV \
  EF       EFSTRUC  \
  ELFUTS   EXPEXPAN EXPRODE  \
  EXPRTUBE EXPR2    FDIVCAT  \
  FDIVCAT- FDIV2    FFCAT2   FLOATCP  \
  FORDER   FSRED    FSUPFACT \
  FRNAAF2  FSPECF   FS2      FS2UPS   \
  GAUSSFAC GCNAALG  GENUFACT GENUPS   \
  GTSET    GPOLSET  IAN      INEP     \
  INFPROD0 INFSP    INPRODFF INPRODPF \
  INTAF    INTALG   INTEF    INTG0    \
  INTHERAL INTPAF   INTPM    INTTOOLS \
  ITRIGMNP JORDAN   KOVACIC  LF       \
  LIE      LODOF    LSQM              \
  MULTFACT NCEP     \
  NLINSOL  NSMP     NUMERIC  OCT      \
  OCTCT2   ODEPAL   ODERTRIC PADE     \
  PAN2EXPR          PFO      PFOQ     \
  PICOERCE PMASSFS  PMFS     PMPREDFS \
  PSETPK   QUAT     QUATCT2  RADFF    \
  RDEEF    RDEEFS   RDIV     RSETCAT  \
  RSETCAT- RULE     RULESET  SIMPAN   \
  SOLVESER SUMFS    SUTS     \
  TOOLSIGN TRIGMNIP TRMANIP  ULSCCAT  \
  ULSCCAT- UPXSSING UTSODE   UTSODETL \
  UTS2     WUTSET   

axiom_algebra_layer_20_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_20))

axiom_algebra_layer_20_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_20)))
$(OUT)/FDIV.$(FASLEXT): $(OUT)/HELLFDIV.$(FASLEXT)
$(OUT)/GSERIES.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/SULS.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/SUPXS.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)

axiom_algebra_layer_21 = \
  DEFINTEF DFINTTLS DEFINTRF \
  EFULS             EXPR2UPS \
  FDIV     FSCINT   FSINT    FS2EXPXP \
  GSERIES  HELLFDIV INVLAPLA IR2F     \
  IRRF2F   LAPLACE  LIMITPS  LODEEF   \
  NODE1    ODECONST ODEINT   REP      \
  SOLVERAD SULS     SUPXS             \
                    UPXSCONS 

axiom_algebra_layer_21_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_21))

axiom_algebra_layer_21_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_21)))
axiom_algebra_layer_22 = \
           COMBF    FSPRMELT \
  INBFF    LODO     LODO1    LODO2    \
  NTSCAT   REGSET   RGCHAIN  RSETGCD  \
  RSDCMPK  SFRTCAT  SIGNEF   SNTSCAT  \
  SOLVETRA SRDCMPK  SREGSET  STTF     \
           ZDSOLVE

axiom_algebra_layer_22_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_22))

axiom_algebra_layer_22_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_22)))
axiom_algebra_layer_23 = \
  CPIMA    IRURPK   LAZM3PK  LEXTRIPK \
  NORMPK   QCMPACK  RURPK    SFRGCD   \
  SFQCMPK  INTRVL   ODEEF    DOMAIN   CATEGORY

axiom_algebra_layer_23_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_23))

axiom_algebra_layer_23_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_23)))
axiom_algebra_layer_user =  \
	RINTERP	 ASTCAT   ASTCAT-  SASTCAT  SASTCAT- HEADAST  \
	LITERAL           TYPEAST  IMPTAST  MAPPAST  ATTRAST  \
	JOINAST  IFAST    RPTAST   WHILEAST INAST    CLLCAST  \
	LSTAST   EXITAST  RETAST   SEGAST   PRTDAST  CRCAST   \
	LETAST   SUCHAST  RDUCEAST COLONAST ADDAST   CAPSLAST \
	CASEAST  HASAST   ISAST    CATAST   WHEREAST COMMAAST \
	QQUTAST  DEFAST   MACROAST SPADXPT  SPADAST  PARAMAST \
	INBFILE  OUTBFILE IOBFILE  RGBCMDL  RGBCSPC  STEPAST  \
        CTOR     IP4ADDR  NETCLT   INETCLTS                   \
	IRFORM   COMPILER \
	ITFORM   ELABOR   TALGOP   YDIAGRAM LINELT   DBASIS   \
	LINFORM  LINBASIS JVMOP    JVMCFACC JVMFDACC JVMMDACC \
	JVMCSTTG

axiom_algebra_layer_user_nrlibs = \
	$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user))

axiom_algebra_layer_user_objects = \
	$(addprefix $(OUT)/, \
	   $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_user)))

$(OUT)/SASTCAT.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT)
$(OUT)/LITERAL.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT)
$(OUT)/PARAMAST.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT) $(OUT)/STRING.$(FASLEXT)
$(OUT)/HEADAST.$(FASLEXT): $(OUT)/PARAMAST.$(FASLEXT)
$(OUT)/SPADXPT.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT)
$(OUT)/ATTRAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/TYPEAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/IMPTAST.$(FASLEXT): $(OUT)/TYPEAST.$(FASLEXT)
$(OUT)/MAPPAST.$(FASLEXT): $(OUT)/TYPEAST.$(FASLEXT)
$(OUT)/SIGAST.$(FASLEXT): $(OUT)/SIG.$(FASLEXT) $(OUT)/IDENT.$(FASLEXT)
$(OUT)/JOINAST.$(FASLEXT): $(OUT)/TYPEAST.$(FASLEXT)
$(OUT)/IFAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/RPTAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/WHILEAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/INAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/STEPAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT) \
		$(OUT)/IDENT.$(FASLEXT) $(OUT)/MAYBE.$(FASLEXT)
$(OUT)/CLLCTAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/LSTAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/EXITAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/RETAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/SEGAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/SEQAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/PRTDAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/CRCEAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/RSTRCAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/LETAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/RDUCEAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/SUCHTAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/COLONAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/ADDAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/CAPSLAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/CASEAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/HASAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/ISAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/CATAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/WHEREAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/COMMAAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/QQUTAST.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT)
$(OUT)/DEFAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/MACROAST.$(FASLEXT): $(OUT)/SPADXPT.$(FASLEXT)
$(OUT)/SPADAST.$(FASLEXT): \
  $(addprefix $(OUT)/,$(addsuffix .$(FASLEXT), \
     IMPTAST DEFAST MACROAST WHEREAST  CATAST CAPSLAST \
     SIGAST ATTRAST MAPPAST IFAST RPTAST WHILEAST INAST \
     CLLCTAST LSTAST EXITAST RETAST CRCEAST PRTDAST RSTRCAST \
     SEGAST SEQAST LETAST SUCHTAST COLONAST CASEAST HASAST \
     ISAST))

$(OUT)/INBFILE.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT) \
	$(OUT)/INBCON.$(FASLEXT) $(OUT)/STRING.$(FASLEXT)
$(OUT)/OUTBFILE.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT) \
	$(OUT)/OUTBCON.$(FASLEXT) $(OUT)/STRING.$(FASLEXT)
$(OUT)/IOBFILE.$(FASLEXT): $(OUT)/INBFILE.$(FASLEXT) \
	$(OUT)/OUTBFILE.$(FASLEXT)

$(OUT)/CTOR.$(FASLEXT): $(OUT)/CTORKIND.$(FASLEXT) \
	$(OUT)/IDENT.$(FASLEXT)

$(OUT)/NETCLT.$(FASLEXT): $(OUT)/IOBCON.$(FASLEXT)
$(OUT)/INETCLTS.$(FASLEXT): $(OUT)/NETCLT.$(FASLEXT)


$(OUT)/IRFORM.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT)
$(OUT)/COMPILER.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) $(OUT)/ENV.$(FASLEXT)
$(OUT)/ITFORM.$(FASLEXT): $(OUT)/IRFORM.$(FASLEXT)
$(OUT)/ELABOR.$(FASLEXT): $(OUT)/ITFORM.$(FASLEXT) $(OUT)/ENV.$(FASLEXT) \
	$(OUT)/IRFORM.$(FASLEXT)


$(OUT)/LINBASIS.$(FASLEXT): $(OUT)/ORDFIN.$(FASLEXT) $(OUT)/OVAR.$(FASLEXT)
$(OUT)/LINELT.$(FASLEXT): $(OUT)/VSPACE.$(FASLEXT) $(OUT)/FM.$(FASLEXT)
$(OUT)/DBASIS.$(FASLEXT): $(OUT)/ORDFIN.$(FASLEXT) $(OUT)/KVTFROM.$(FASLEXT)
$(OUT)/LINFORM.$(FASLEXT): $(OUT)/DBASIS.$(FASLEXT) \
	$(OUT)/VSPACE.$(FASLEXT) $(OUT)/LINELT.$(FASLEXT)

$(OUT)/JVMOP.$(FASLEXT): $(OUT)/JVMBCODE.$(FASLEXT)
$(OUT)/JVMCFACC.$(FASLEXT): $(OUT)/LOGIC.$(FASLEXT)
$(OUT)/JVMFDACC.$(FASLEXT): $(OUT)/LOGIC.$(FASLEXT)
$(OUT)/JVMMDACC.$(FASLEXT): $(OUT)/LOGIC.$(FASLEXT)


.PHONY: all all-algebra
all: all-ax

all-ax all-algebra: stamp
	@ echo finished $(builddir)

stamp: ${SPADFILES} user-stamp ${TESTS}
	-rm -f stamp
	$(STAMP) stamp

.PRECIOUS: $(OUT)/%.$(FASLEXT)
${OUT}/%.$(FASLEXT): %.NRLIB/code.$(FASLEXT)
	cp $< $@

.PRECIOUS: %.spad
.PRECIOUS: %.NRLIB/code.$(FASLEXT)
%.NRLIB/code.$(FASLEXT): %.spad
	$(COMPILE_SPAD)

.PRECIOUS: $(OUTSRC)/%.spad
${OUTSRC}/%.spad: $(srcdir)/%.spad.pamphlet
	$(oa_hammer) --tangle --output=$@ $<

.PRECIOUS: $(builddir)/%.tex
.PRECIOUS: $(builddir)/%.dvi

$(DOC)/%.dvi:  | $(DOC)

$(DOC):
	@ $(mkdir_p) $(DOC)

$(DOC)/%.dvi: $(builddir)/%.dvi
	@cp -p $< $@

$(builddir)/%.dvi: $(axiom_build_texdir)/diagrams.tex \
		   $(axiom_build_texdir)/axiom.sty

$(builddir)/%.dvi: $(builddir)/%.tex
	$(oa_hammer) --latex $<

$(builddir)/%.tex: $(srcdir)/%.pamphlet
	$(oa_hammer) --weave --output=$@ $<

$(axiom_build_texdir)/diagrams.tex: $(axiom_src_docdir)/diagrams.tex
	@cp -p $< $@

SPADPRSR.NRLIB/code.$(FASLEXT): spad-parser.spad
	$(COMPILE_SPAD)

PARSER.NRLIB/code.$(FASLEXT): script-parser.spad
	$(COMPILE_SPAD)


${INPUT}/TESTFR.input: $(srcdir)/fr.spad.pamphlet
	$(oa_hammer) --tangle='TEST FR' --output=$@ $<

${INPUT}/INTHEORY.input: $(srcdir)/numtheor.spad.pamphlet
	$(oa_hammer) --tangle='TEST INTHEORY' --output=$@ $<

${INPUT}/VIEW2D.input: $(srcdir)/view2D.spad.pamphlet
	$(oa_hammer) --tangle='TEST VIEW2D' --output=$@ $<


${DOC}/diagrams.tex: $(axiom_src_docdir)/diagrams.tex
	@cp -p $< $@
 
$(axiom_algebra_layer_0_objects): strap-stamp
$(axiom_algebra_layer_1_objects): 0-stamp
$(axiom_algebra_layer_2_objects): 1-stamp
$(axiom_algebra_layer_3_objects): 2-stamp
$(axiom_algebra_layer_4_objects): 3-stamp
$(axiom_algebra_layer_5_objects): 4-stamp
$(axiom_algebra_layer_6_objects): 5-stamp
$(axiom_algebra_layer_7_objects): 6-stamp
$(axiom_algebra_layer_8_objects): 7-stamp
$(axiom_algebra_layer_9_objects): 8-stamp
$(axiom_algebra_layer_10_objects): 9-stamp
$(axiom_algebra_layer_11_objects): 10-stamp
$(axiom_algebra_layer_12_objects): 11-stamp
$(axiom_algebra_layer_13_objects): 12-stamp
$(axiom_algebra_layer_14_objects): 13-stamp
$(axiom_algebra_layer_15_objects): 14-stamp
$(axiom_algebra_layer_16_objects): 15-stamp
$(axiom_algebra_layer_17_objects): 16-stamp
$(axiom_algebra_layer_18_objects): 17-stamp
$(axiom_algebra_layer_19_objects): 18-stamp
$(axiom_algebra_layer_20_objects): 19-stamp
$(axiom_algebra_layer_21_objects): 20-stamp
$(axiom_algebra_layer_22_objects): 21-stamp
$(axiom_algebra_layer_23_objects): 22-stamp
$(axiom_algebra_layer_user_objects): bootstrap-stamp

.PHONY: all-algstrap
all-algstrap: strap-stamp

strap-stamp: strap-2-stamp
	@ rm -f strap-stamp
	@ $(STAMP) strap-stamp
	@ echo =====================================
	@ echo === algebra bootstrap complete ======
	@ echo =====================================

$(axiom_algebra_layer_0_objects): | $(OUT)
$(OUT):
	$(mkdir_p) $@

0-stamp: strap-stamp $(axiom_algebra_layer_0_objects)
	@ rm -f 0-stamp
	@ $(STAMP) 0-stamp
	@ echo ==================================
	@ echo === layer 0 of 23 complete ======
	@ echo ==================================

1-stamp: 0-stamp $(axiom_algebra_layer_1_objects)
	@ rm -f 1-stamp
	@ $(STAMP) 1-stamp
	@ echo ==================================
	@ echo === layer 1 of 23 complete ======
	@ echo ==================================

2-stamp: 1-stamp $(axiom_algebra_layer_2_objects)
	@ rm -f 2-stamp
	@ $(STAMP) 2-stamp
	@ echo ==================================
	@ echo === layer 2 of 23 complete ======
	@ echo ==================================

3-stamp: 2-stamp $(axiom_algebra_layer_3_objects)
	@ rm -f 3-stamp
	@ $(STAMP) 3-stamp
	@ echo ==================================
	@ echo === layer 3 of 23 complete ======
	@ echo ==================================

4-stamp: 3-stamp $(axiom_algebra_layer_4_objects)
	@ rm -f 4-stamp
	@ $(STAMP) 4-stamp
	@ echo ==================================
	@ echo === layer 4 of 23 complete ======
	@ echo ==================================

5-stamp: 4-stamp $(axiom_algebra_layer_5_objects)
	@ rm -f 5-stamp
	@ $(STAMP) 5-stamp
	@ echo ==================================
	@ echo === layer 5 of 23 complete ======
	@ echo ==================================

6-stamp: 5-stamp $(axiom_algebra_layer_6_objects)
	@ rm -f 6-stamp
	@ $(STAMP) 6-stamp
	@ echo ==================================
	@ echo === layer 6 of 23 complete ======
	@ echo ==================================

7-stamp: 6-stamp $(axiom_algebra_layer_7_objects)
	@ rm -f 7-stamp
	@ $(STAMP) 7-stamp
	@ echo ==================================
	@ echo === layer 7 of 23 complete ======
	@ echo ==================================

8-stamp: 7-stamp $(axiom_algebra_layer_8_objects)
	@ rm -f 8-stamp
	@ $(STAMP) 8-stamp
	@ echo ==================================
	@ echo === layer 8 of 23 complete ======
	@ echo ==================================

9-stamp: 8-stamp $(axiom_algebra_layer_9_objects)
	@ rm -f 9-stamp
	@ $(STAMP) 9-stamp
	@ echo ==================================
	@ echo === layer 9 of 23 complete ======
	@ echo ==================================

10-stamp: 9-stamp $(axiom_algebra_layer_10_objects)
	@ rm -f 10-stamp
	@ $(STAMP) 10-stamp
	@ echo ==================================
	@ echo === layer 10 of 23 complete ======
	@ echo ==================================

11-stamp: 10-stamp $(axiom_algebra_layer_11_objects)
	@ rm -f 11-stamp
	@ $(STAMP) 11-stamp
	@ echo ==================================
	@ echo === layer 11 of 23 complete ======
	@ echo ==================================

12-stamp: 11-stamp $(axiom_algebra_layer_12_objects)
	@ rm -f 12-stamp
	@ $(STAMP) 12-stamp
	@ echo ==================================
	@ echo === layer 12 of 23 complete ======
	@ echo ==================================

13-stamp: 12-stamp $(axiom_algebra_layer_13_objects)
	@ rm -f 13-stamp
	@ $(STAMP) 13-stamp
	@ echo ==================================
	@ echo === layer 13 of 23 complete ======
	@ echo ==================================

14-stamp: 13-stamp $(axiom_algebra_layer_14_objects)
	@ rm -f 14-stamp
	@ $(STAMP) 14-stamp
	@ echo ==================================
	@ echo === layer 14 of 23 complete ======
	@ echo ==================================

15-stamp: 14-stamp $(axiom_algebra_layer_15_objects)
	@ rm -f 15-stamp
	@ $(STAMP) 15-stamp
	@ echo ==================================
	@ echo === layer 15 of 23 complete ======
	@ echo ==================================

16-stamp: 15-stamp $(axiom_algebra_layer_16_objects)
	@ rm -f 16-stamp
	@ $(STAMP) 16-stamp
	@ echo ==================================
	@ echo === layer 16 of 23 complete ======
	@ echo ==================================

17-stamp: 16-stamp $(axiom_algebra_layer_17_objects)
	@ rm -f 17-stamp
	@ $(STAMP) 17-stamp
	@ echo ==================================
	@ echo === layer 17 of 23 complete ======
	@ echo ==================================

18-stamp: 17-stamp $(axiom_algebra_layer_18_objects)
	@ rm -f 18-stamp
	@ $(STAMP) 18-stamp
	@ echo ==================================
	@ echo === layer 18 of 23 complete ======
	@ echo ==================================

19-stamp: 18-stamp $(axiom_algebra_layer_19_objects)
	@ rm -f 19-stamp
	@ $(STAMP) 19-stamp
	@ echo ==================================
	@ echo === layer 19 of 23 complete ======
	@ echo ==================================

20-stamp: 19-stamp $(axiom_algebra_layer_20_objects)
	@ rm -f 20-stamp
	@ $(STAMP) 20-stamp
	@ echo ==================================
	@ echo === layer 20 of 23 complete ======
	@ echo ==================================

21-stamp: 20-stamp $(axiom_algebra_layer_21_objects)
	@ rm -f 21-stamp
	@ $(STAMP) 21-stamp
	@ echo ==================================
	@ echo === layer 21 of 23 complete ======
	@ echo ==================================

22-stamp: 21-stamp $(axiom_algebra_layer_22_objects)
	@ rm -f 22-stamp
	@ $(STAMP) 22-stamp
	@ echo ==================================
	@ echo === layer 22 of 23 complete ======
	@ echo ==================================

23-stamp: 22-stamp $(axiom_algebra_layer_23_objects)
	@ rm -f 23-stamp
	@ $(STAMP) 23-stamp
	@ echo ==================================
	@ echo === layer 23 of 23 complete ======
	@ echo ==================================

bootstrap-stamp: 23-stamp
	@ rm -f bootstrap-stamp
	@ $(STAMP) bootstrap-stamp
	@ echo ==================================
	@ echo ===    algebra complete     ======
	@ echo ==================================

user-stamp: $(axiom_algebra_layer_user_objects)
	@ rm -f user-stamp
	@ $(STAMP) user-stamp


.PRECIOUS: $(SPADFILES)
$(SPADFILES): | $(OUTSRC)

.PHONY: all-initdb
all-initdb: initdb.daase

.PRECIOUS: initdb.daase
initdb.daase: $(SPADFILES)
	$(DRIVER) --execpath=$(INTERPSYS) --system="$(AXIOM)" \
		--spad-srcdir=$(OUTSRC) \
		--output=initdb.$$$$ --build-initdb && \
		$(top_confdir)/move-if-change initdb.$$$$ $@


mostlyclean-local:
	@rm -f $(OUT)/*.$(FASLEXT) $(OUT)/*.daase
	@rm -rf *.NRLIB
	@rm -rf *.DAASE *.daase libdb.text initdb.*
	@rm -rf strap*
	@rm -f *stamp

clean-local: mostlyclean-local

distclean-local: clean-local

include extract-spad.mk