#
# default base directory for YAP installation
#
ROOTDIR = @prefix@
#
# where the binary should be
#
BINDIR = $(ROOTDIR)/bin
#
# where YAP should look for libraries
#
LIBDIR=$(ROOTDIR)/lib/Yap
#
# where YAP should look for architecture-independent Prolog libraries
#
SHAREDIR=$(ROOTDIR)/share/Yap
#
#
# You shouldn't need to change what follows.
#
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
srcdir=@srcdir@

CLPQR_PROGRAMS= $(srcdir)/clpqr/arith.pl \
	$(srcdir)/clpqr/bb.yap \
	$(srcdir)/clpqr/bv.yap \
	$(srcdir)/clpqr/compenv.pl \
	$(srcdir)/clpqr/dump.pl \
	$(srcdir)/clpqr/fourmotz.pl \
	$(srcdir)/clpqr/ineq.yap \
	$(srcdir)/clpqr/itf3.pl \
	$(srcdir)/clpqr/ordering.yap \
	$(srcdir)/clpqr/project.pl \
	$(srcdir)/clpqr/redund.pl \
	$(srcdir)/clpqr/store.yap

CLPQR_LOCAL= \
	$(srcdir)/clpqr/expand.yap \
	$(srcdir)/clpqr/monash.pl \
	$(srcdir)/clpqr/printf.pl

CLPR_PROGRAMS= $(srcdir)/clpr/arith_r.yap \
	$(srcdir)/clpr/class.yap\
	$(srcdir)/clpr/geler.yap \
	$(srcdir)/clpr/nf.yap \
	$(srcdir)/clpr/nfr.yap

CLPQ_PROGRAMS= $(srcdir)/clpq/arith_q.yap \
	$(srcdir)/clpq/class.yap \
	$(srcdir)/clpq/geler.yap \
	$(srcdir)/clpr/nf.yap \
	$(srcdir)/clpq/nfq.yap

CLPR_TOP= $(srcdir)/clpr.yap

CLPQ_TOP= $(srcdir)/clpq.yap

CLPQR_LICENSE= $(srcdir)/CLPQR.LICENSE

CLPQR_EXAMPLES= $(srcdir)/clpqr/examples/README \
	$(srcdir)/clpqr/examples/caneghem.pl \
	$(srcdir)/clpqr/examples/eliminat.pl \
	$(srcdir)/clpqr/examples/matmul.pl \
	$(srcdir)/clpqr/examples/mg.pl \
	$(srcdir)/clpqr/examples/mip.pl \
	$(srcdir)/clpqr/examples/root.pl \
	$(srcdir)/clpqr/examples/simplex.pl \
	$(srcdir)/clpqr/examples/squares.pl

CLPQR_EXAMPLES_MONASH= $(srcdir)/clpqr/examples/monash/README \
	$(srcdir)/clpqr/examples/monash/air \
	$(srcdir)/clpqr/examples/monash/amplif \
	$(srcdir)/clpqr/examples/monash/complex \
	$(srcdir)/clpqr/examples/monash/critical \
	$(srcdir)/clpqr/examples/monash/dnf \
	$(srcdir)/clpqr/examples/monash/fib \
	$(srcdir)/clpqr/examples/monash/findroot \
	$(srcdir)/clpqr/examples/monash/invert \
	$(srcdir)/clpqr/examples/monash/laplace \
	$(srcdir)/clpqr/examples/monash/mortgage \
	$(srcdir)/clpqr/examples/monash/nrev \
	$(srcdir)/clpqr/examples/monash/option \
	$(srcdir)/clpqr/examples/monash/pictures \
	$(srcdir)/clpqr/examples/monash/rkf45 \
	$(srcdir)/clpqr/examples/monash/rlc \
	$(srcdir)/clpqr/examples/monash/smm \
	$(srcdir)/clpqr/examples/monash/toolpath \
	$(srcdir)/clpqr/examples/monash/zebra

CLPQR_EXAMPLES_SESSION= $(srcdir)/clpqr/examples/SESSION/010 \
	$(srcdir)/clpqr/examples/SESSION/011 \
	$(srcdir)/clpqr/examples/SESSION/012 \
	$(srcdir)/clpqr/examples/SESSION/013 \
	$(srcdir)/clpqr/examples/SESSION/014 \
	$(srcdir)/clpqr/examples/SESSION/015 \
	$(srcdir)/clpqr/examples/SESSION/016 \
	$(srcdir)/clpqr/examples/SESSION/017 \
	$(srcdir)/clpqr/examples/SESSION/018 \
	$(srcdir)/clpqr/examples/SESSION/019 \
	$(srcdir)/clpqr/examples/SESSION/020 \
	$(srcdir)/clpqr/examples/SESSION/021 \
	$(srcdir)/clpqr/examples/SESSION/022 \
	$(srcdir)/clpqr/examples/SESSION/023 \
	$(srcdir)/clpqr/examples/SESSION/024 \
	$(srcdir)/clpqr/examples/SESSION/030 \
	$(srcdir)/clpqr/examples/SESSION/031 \
	$(srcdir)/clpqr/examples/SESSION/032 \
	$(srcdir)/clpqr/examples/SESSION/033 \
	$(srcdir)/clpqr/examples/SESSION/034 \
	$(srcdir)/clpqr/examples/SESSION/035 \
	$(srcdir)/clpqr/examples/SESSION/110 \
	$(srcdir)/clpqr/examples/SESSION/111 \
	$(srcdir)/clpqr/examples/SESSION/112 \
	$(srcdir)/clpqr/examples/SESSION/113 \
	$(srcdir)/clpqr/examples/SESSION/114 \
	$(srcdir)/clpqr/examples/SESSION/115 \
	$(srcdir)/clpqr/examples/SESSION/116 \
	$(srcdir)/clpqr/examples/SESSION/117 \
	$(srcdir)/clpqr/examples/SESSION/118 \
	$(srcdir)/clpqr/examples/SESSION/119 \
	$(srcdir)/clpqr/examples/SESSION/120 \
	$(srcdir)/clpqr/examples/SESSION/122 \
	$(srcdir)/clpqr/examples/SESSION/123 \
	$(srcdir)/clpqr/examples/SESSION/124 \
	$(srcdir)/clpqr/examples/SESSION/130 \
	$(srcdir)/clpqr/examples/SESSION/131 \
	$(srcdir)/clpqr/examples/SESSION/132 \
	$(srcdir)/clpqr/examples/SESSION/133 \
	$(srcdir)/clpqr/examples/SESSION/134 \
	$(srcdir)/clpqr/examples/SESSION/135

install: $(CLPR_TOP) $(CLPQ_TOP) $(CLPQR_LICENSE) $(CLPQR_PROGRAMS) $(CLPQR_LOCAL)\
	$(CLPQR_EXAMPLES) $(CLPQR_EXAMPLES_MONASH) $(CLPQR_EXAMPLES_SESSION)
	mkdir -p $(DESTDIR)$(SHAREDIR)/clpq
	mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr
	mkdir -p $(DESTDIR)$(SHAREDIR)/clpr
	mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples
	mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples/SESSION
	mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples/monash
	for h in $(CLPQ_TOP); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done
	for h in $(CLPR_TOP); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done
	for h in $(CLPQR_LICENSE); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done
	for h in $(CLPQR_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr; done
	for h in $(CLPQ_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpq; done
	for h in $(CLPR_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpr; done
	for h in $(CLPQR_LOCAL); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr; done
	for h in $(CLPQR_EXAMPLES); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr/examples; done
	for h in $(CLPQR_EXAMPLES_MONASH); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr/examples/monash; done
	for h in $(CLPQR_EXAMPLES_SESSION); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr/examples/SESSION; done


