2007-11-07 13:02:37 +00:00
|
|
|
#
|
|
|
|
# default base directory for YAP installation
|
|
|
|
# (EROOT for architecture-dependent files)
|
|
|
|
#
|
|
|
|
prefix = @prefix@
|
|
|
|
ROOTDIR = $(prefix)
|
|
|
|
EROOTDIR = @exec_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
|
|
|
|
#
|
|
|
|
#
|
|
|
|
CC=@CC@
|
2007-12-05 10:47:19 +00:00
|
|
|
CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I$(srcdir)/../include
|
2007-11-07 13:02:37 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# You shouldn't need to change what follows.
|
|
|
|
#
|
|
|
|
INSTALL=@INSTALL@
|
|
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
|
|
SHELL=/bin/sh
|
|
|
|
RANLIB=@RANLIB@
|
|
|
|
srcdir=@srcdir@
|
|
|
|
SHLIB_CFLAGS=@SHLIB_CFLAGS@
|
|
|
|
SHLIB_SUFFIX=@SHLIB_SUFFIX@
|
|
|
|
CPLINT_CFLAGS=@CPLINT_CFLAGS@
|
|
|
|
CPLINT_LDFLAGS=@CPLINT_LDFLAGS@
|
|
|
|
CPLINT_LIBS=@CPLINT_LIBS@
|
|
|
|
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
|
|
|
CWD=$(PWD)
|
|
|
|
#
|
2007-11-15 12:34:31 +00:00
|
|
|
OBJS=cplint_yap.o cplint_Prob.o
|
2007-11-07 13:02:37 +00:00
|
|
|
SOBJS=cplint@SHLIB_SUFFIX@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CPLINT_SRCDIR = $(srcdir)
|
|
|
|
|
|
|
|
CPLINT_EXDIR = $(srcdir)/examples
|
|
|
|
|
|
|
|
CPLINT_DOCDIR = $(srcdir)/doc
|
|
|
|
|
|
|
|
|
|
|
|
CPLINT_PROGRAMS= \
|
2008-03-08 15:41:01 +00:00
|
|
|
$(CPLINT_SRCDIR)/lpadvel.pl \
|
2008-02-18 16:58:51 +00:00
|
|
|
$(CPLINT_SRCDIR)/lpadclpbn.pl \
|
2007-11-15 12:34:31 +00:00
|
|
|
$(CPLINT_SRCDIR)/lpadsld.pl \
|
|
|
|
$(CPLINT_SRCDIR)/lpad.pl \
|
|
|
|
$(CPLINT_SRCDIR)/cpl.pl
|
|
|
|
|
|
|
|
CPLINT_SEMANTICS_PROGRAMS= \
|
|
|
|
$(CPLINT_SRCDIR)/semlpadsld.pl \
|
|
|
|
$(CPLINT_SRCDIR)/semlpad.pl \
|
|
|
|
$(CPLINT_SRCDIR)/semcpl.pl \
|
|
|
|
$(CPLINT_SRCDIR)/slg.pl
|
|
|
|
|
|
|
|
CPLINT_TEST_PROGRAMS= \
|
2008-03-08 15:41:01 +00:00
|
|
|
$(CPLINT_SRCDIR)/testlpadvel.pl \
|
|
|
|
$(CPLINT_SRCDIR)/testlpadclpbn.pl \
|
2007-11-15 12:34:31 +00:00
|
|
|
$(CPLINT_SRCDIR)/testlpadsld_gbtrue.pl \
|
|
|
|
$(CPLINT_SRCDIR)/testlpadsld_gbfalse.pl \
|
|
|
|
$(CPLINT_SRCDIR)/testlpad.pl \
|
|
|
|
$(CPLINT_SRCDIR)/testcpl.pl \
|
2007-12-04 18:30:35 +00:00
|
|
|
$(CPLINT_SRCDIR)/testsemlpadsld.pl \
|
|
|
|
$(CPLINT_SRCDIR)/testsemlpad.pl \
|
2007-11-15 12:34:31 +00:00
|
|
|
$(CPLINT_SRCDIR)/testsemcpl.pl
|
|
|
|
|
2007-11-07 13:02:37 +00:00
|
|
|
CPLINT_EXAMPLES= \
|
|
|
|
$(CPLINT_EXDIR)/dice.cpl \
|
|
|
|
$(CPLINT_EXDIR)/dice.uni \
|
|
|
|
$(CPLINT_EXDIR)/mendel.cpl \
|
2007-11-15 12:34:31 +00:00
|
|
|
$(CPLINT_EXDIR)/mendels.cpl \
|
|
|
|
$(CPLINT_EXDIR)/mendels.uni \
|
2007-11-07 13:02:37 +00:00
|
|
|
$(CPLINT_EXDIR)/alarm.cpl \
|
|
|
|
$(CPLINT_EXDIR)/coin.cpl \
|
|
|
|
$(CPLINT_EXDIR)/coin.uni \
|
|
|
|
$(CPLINT_EXDIR)/coin2.cpl \
|
|
|
|
$(CPLINT_EXDIR)/coin2.uni \
|
|
|
|
$(CPLINT_EXDIR)/student.cpl \
|
|
|
|
$(CPLINT_EXDIR)/student.uni \
|
2007-11-15 12:34:31 +00:00
|
|
|
$(CPLINT_EXDIR)/exapprox.cpl \
|
|
|
|
$(CPLINT_EXDIR)/exapprox.uni \
|
|
|
|
$(CPLINT_EXDIR)/exrange.cpl \
|
|
|
|
$(CPLINT_EXDIR)/exrange.uni \
|
|
|
|
$(CPLINT_EXDIR)/ex.cpl \
|
|
|
|
$(CPLINT_EXDIR)/ex.uni \
|
2007-11-07 13:02:37 +00:00
|
|
|
$(CPLINT_EXDIR)/school_simple.cpl \
|
|
|
|
$(CPLINT_EXDIR)/school_simple.uni \
|
|
|
|
$(CPLINT_EXDIR)/school.cpl \
|
|
|
|
$(CPLINT_EXDIR)/paper_ref.cpl \
|
|
|
|
$(CPLINT_EXDIR)/paper_ref_not.cpl \
|
|
|
|
$(CPLINT_EXDIR)/paper_ref_simple.cpl \
|
|
|
|
$(CPLINT_EXDIR)/threesideddice.cpl \
|
|
|
|
$(CPLINT_EXDIR)/threesideddice.uni \
|
|
|
|
$(CPLINT_EXDIR)/twosideddice.cpl \
|
2007-11-15 12:34:31 +00:00
|
|
|
$(CPLINT_EXDIR)/female.cpl \
|
|
|
|
$(CPLINT_EXDIR)/hiv.cpl \
|
|
|
|
$(CPLINT_EXDIR)/hiv.uni \
|
|
|
|
$(CPLINT_EXDIR)/invalid.cpl \
|
|
|
|
$(CPLINT_EXDIR)/invalid.uni \
|
|
|
|
$(CPLINT_EXDIR)/light.cpl \
|
|
|
|
$(CPLINT_EXDIR)/light.uni \
|
|
|
|
$(CPLINT_EXDIR)/throws.cpl \
|
|
|
|
$(CPLINT_EXDIR)/throws.uni \
|
|
|
|
$(CPLINT_EXDIR)/trigger.cpl \
|
|
|
|
$(CPLINT_EXDIR)/trigger.uni \
|
|
|
|
$(CPLINT_EXDIR)/win.cpl \
|
2007-12-05 17:43:32 +00:00
|
|
|
$(CPLINT_EXDIR)/win.uni \
|
|
|
|
$(CPLINT_EXDIR)/exist.cpl \
|
|
|
|
$(CPLINT_EXDIR)/exist.uni \
|
|
|
|
$(CPLINT_EXDIR)/exist1.cpl \
|
|
|
|
$(CPLINT_EXDIR)/exist1.uni
|
2007-11-07 13:02:37 +00:00
|
|
|
|
|
|
|
CPLINT_DOCS=\
|
2007-11-15 16:27:09 +00:00
|
|
|
$(CPLINT_DOCDIR)/manual.bbl \
|
2007-11-08 12:47:24 +00:00
|
|
|
$(CPLINT_DOCDIR)/manual.tex \
|
|
|
|
$(CPLINT_DOCDIR)/manual.pdf \
|
|
|
|
$(CPLINT_DOCDIR)/manual.html \
|
|
|
|
$(CPLINT_DOCDIR)/manual.css \
|
2007-11-15 16:27:09 +00:00
|
|
|
$(CPLINT_DOCDIR)/manual0x.png \
|
|
|
|
$(CPLINT_DOCDIR)/Makefile
|
2007-11-07 13:02:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: $(SOBJS)
|
|
|
|
|
|
|
|
cplint_yap.o: $(srcdir)/cplint_yap.c $(srcdir)/cplint.h
|
|
|
|
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(CPLINT_CFLAGS) $(srcdir)/cplint_yap.c -o cplint_yap.o
|
|
|
|
|
|
|
|
cplint_Prob.o: $(srcdir)/cplint_Prob.c $(srcdir)/cplint.h
|
|
|
|
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(CPLINT_CFLAGS) $(srcdir)/cplint_Prob.c -o cplint_Prob.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@DO_SECOND_LD@cplint@SHLIB_SUFFIX@: cplint_yap.o cplint_Prob.o
|
|
|
|
@DO_SECOND_LD@ @CPLINT_SHLIB_LD@ -o cplint@SHLIB_SUFFIX@ $(CPLINT_LDFLAGS) cplint_yap.o cplint_Prob.o $(CPLINT_LIBS)
|
|
|
|
|
2007-11-15 12:34:31 +00:00
|
|
|
clean:
|
|
|
|
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
2007-11-07 13:02:37 +00:00
|
|
|
|
|
|
|
install: all
|
|
|
|
mkdir -p $(DESTDIR)$(SHAREDIR)/cplint
|
|
|
|
mkdir -p $(DESTDIR)$(SHAREDIR)/cplint/examples
|
2007-11-08 11:30:19 +00:00
|
|
|
mkdir -p $(DESTDIR)$(SHAREDIR)/cplint/doc
|
2007-11-07 13:02:37 +00:00
|
|
|
for h in $(CPLINT_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done
|
|
|
|
for h in $(CPLINT_EXAMPLES); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/cplint/examples; done
|
|
|
|
for h in $(CPLINT_DOCS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/cplint/doc; done
|
2007-11-15 12:34:31 +00:00
|
|
|
for h in $(CPLINT_TEST_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/cplint; done
|
|
|
|
for h in $(CPLINT_SEMANTICS_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done
|
2007-11-07 13:02:37 +00:00
|
|
|
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(LIBDIR)
|
|
|
|
|
|
|
|
installcheck:
|
2007-11-15 12:34:31 +00:00
|
|
|
for h in ${CPLINT_TEST_PROGRAMS}; do echo "t. halt." | yap -l $$h; done
|
2007-12-05 17:43:32 +00:00
|
|
|
|
|
|
|
# use the following target to run individual tests, e.g. make testlpad
|
|
|
|
test%:
|
|
|
|
echo "t. halt." | yap -l $(CPLINT_SRCDIR)/$@.pl
|
|
|
|
|