732 lines
23 KiB
Makefile
Executable File
732 lines
23 KiB
Makefile
Executable File
|
|
# default base directory for YAP installation
|
|
# (EROOT for architecture-dependent files)
|
|
#
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
ROOTDIR = $(prefix)
|
|
EROOTDIR = @exec_prefix@
|
|
#
|
|
# where the binary should be
|
|
#
|
|
BINDIR = $(EROOTDIR)/bin
|
|
#
|
|
# where YAP should look for binary libraries
|
|
#
|
|
LIBDIR=@libdir@
|
|
YAPLIBDIR=@libdir@/Yap
|
|
#
|
|
# where YAP should look for architecture-independent Prolog libraries
|
|
#
|
|
SHAREDIR=$(ROOTDIR)/share
|
|
#
|
|
# where the includes should be stored
|
|
#
|
|
INCLUDEDIR=$(ROOTDIR)/include/Yap
|
|
#
|
|
# where to store info files
|
|
#
|
|
INFODIR=$(SHAREDIR)/info
|
|
#
|
|
# where to store documentation files
|
|
#
|
|
DOCSDIR=$(SHAREDIR)/doc/Yap
|
|
|
|
#
|
|
# Add this flag to YAP_EXTRAS if you need the extension:
|
|
# -DRATIONAL_TREES: allow unification and builtins over rational trees
|
|
# -DCOROUTINING: implement extra control primitives
|
|
# -DANALYST: low level profiler
|
|
# -DDEPTH_LIMIT: support depth-limits in Prolog execution
|
|
# -DLOW_LEVEL_TRACER: low level tracing
|
|
#
|
|
# very experimental stuff, you'll need to contact the developers
|
|
# if you want to use this:
|
|
# -DYAPOR_COPY: or-parallelism with environment copying, in Muse style.
|
|
# -DYAPOR_SBA: or-parallelism with sparse binding arrays.
|
|
# -DYAPOR_COW: or-parallelism with copy-on-write.
|
|
# -DTABLING: support for tabling
|
|
#
|
|
#
|
|
# check also optimisation options in INSTALL file.
|
|
#
|
|
YAP_EXTRAS=@YAP_EXTRAS@
|
|
|
|
YAPSTARTUP=startup.yss
|
|
|
|
#
|
|
# Please do not add YAP_EXTRA flags here: if you do check the flags
|
|
# for c_interface.c
|
|
#
|
|
CC=@CC@
|
|
MPI_CC=@MPI_CC@
|
|
CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/include -I$(srcdir)/os -I$(srcdir)/OPTYap -I$(srcdir)/BEAM
|
|
EXECUTABLE_CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
|
CFLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
|
C_INTERF_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) -I$(srcdir)/include
|
|
C_PARSER_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
|
#
|
|
#
|
|
# You shouldn't need to change what follows.
|
|
#
|
|
ARCH=@ARCH@
|
|
AWK=@AWK@
|
|
CPP=@CPP@
|
|
DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1
|
|
LIBS=@LIBS@
|
|
DLL_LIBS=@LIBS@ @EXTRA_LIBS_FOR_DLLS@
|
|
LDFLAGS=@LDFLAGS@
|
|
LN_S=@LN_S@
|
|
M4=@M4@
|
|
GCC=@GCC@
|
|
INSTALL=@INSTALL@
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
INSTALL_INFO=@INSTALL_INFO@
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
M4GENHDRS=$(srcdir)/@M4GENHDRS@
|
|
M4GENABSMI=$(srcdir)/@M4GENABSMI@
|
|
INDENT=@INDENT@
|
|
SHELL=@SHELL@
|
|
RANLIB=@RANLIB@
|
|
AR=@AR@
|
|
srcdir=@srcdir@
|
|
abs_top_builddir=@abs_top_builddir@
|
|
SO=@SO@
|
|
MAKEINFO=makeinfo
|
|
TEXI2DVI=texi2dvi
|
|
TEXI2HTML=texi2html
|
|
TEXI2PDF=texi2pdf
|
|
YAPLIB=@YAPLIB@
|
|
SONAMEFLAG=@SONAMEFLAG@
|
|
|
|
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
|
CWD=$(PWD)
|
|
#
|
|
VERSION=6.3.4
|
|
MYDDAS_VERSION=MYDDAS-0.9.1
|
|
#
|
|
|
|
INTERFACE_HEADERS = \
|
|
$(IOLIB_HEADERS) \
|
|
$(srcdir)/include/c_interface.h \
|
|
$(srcdir)/include/clause_list.h \
|
|
$(srcdir)/include/dswiatoms.h \
|
|
$(srcdir)/include/udi.h \
|
|
$(srcdir)/include/yap_structs.h \
|
|
$(srcdir)/include/YapInterface.h \
|
|
$(srcdir)/include/SWI-Prolog.h \
|
|
$(srcdir)/include/YapError.h \
|
|
$(srcdir)/H/TermExt.h \
|
|
$(srcdir)/H/YapTags.h \
|
|
$(srcdir)/H/Tags_32bits.h \
|
|
$(srcdir)/H/Tags_32Ops.h \
|
|
$(srcdir)/H/Tags_32LowTag.h \
|
|
$(srcdir)/H/Tags_64bits.h \
|
|
$(srcdir)/H/Tags_24bits.h \
|
|
$(srcdir)/H/YapCompoundTerm.h \
|
|
$(srcdir)/include/YapRegs.h \
|
|
$(srcdir)/H/YapTerm.h \
|
|
$(srcdir)/library/dialect/bprolog/fli/bprolog.h \
|
|
$(srcdir)/os/pl-thread.h \
|
|
$(srcdir)/os/SWI-Stream.h
|
|
|
|
IOLIB_HEADERS=$(srcdir)/os/pl-buffer.h \
|
|
$(srcdir)/os/pl-ctype.h \
|
|
$(srcdir)/H/pl-codelist.h \
|
|
$(srcdir)/os/pl-dtoa.h \
|
|
$(srcdir)/os/dtoa.c \
|
|
$(srcdir)/H/pl-incl.h \
|
|
$(srcdir)/H/pl-global.h \
|
|
$(srcdir)/os/pl-option.h \
|
|
$(srcdir)/os/pl-os.h \
|
|
$(srcdir)/os/pl-privitf.h \
|
|
$(srcdir)/os/pl-table.h \
|
|
$(srcdir)/os/pl-text.h \
|
|
$(srcdir)/os/pl-utf8.h \
|
|
$(srcdir)/H/pl-yap.h @WINDOWS@ $(srcdir)/os/windows/dirent.h $(srcdir)/os/windows/utf8.h $(srcdir)/os/windows/utf8.c $(srcdir)/os/windows/uxnt.h $(srcdir)/os/windows/popen.c
|
|
|
|
HEADERS = \
|
|
$(srcdir)/H/Atoms.h \
|
|
$(srcdir)/H/sshift.h \
|
|
$(srcdir)/H/Yap.h \
|
|
$(srcdir)/H/Yatom.h \
|
|
$(srcdir)/H/YapHeap.h \
|
|
$(srcdir)/H/Regs.h \
|
|
$(srcdir)/H/Yapproto.h \
|
|
$(srcdir)/H/absmi.h \
|
|
$(srcdir)/H/alloc.h \
|
|
$(srcdir)/H/amidefs.h \
|
|
$(srcdir)/H/amiops.h \
|
|
$(srcdir)/H/arrays.h \
|
|
$(srcdir)/H/arith2.h \
|
|
$(srcdir)/H/attvar.h \
|
|
$(srcdir)/H/clause.h \
|
|
$(srcdir)/H/compile.h \
|
|
$(srcdir)/H/corout.h \
|
|
$(srcdir)/H/dlmalloc.h \
|
|
$(srcdir)/H/dglobals.h \
|
|
$(srcdir)/H/dlocals.h \
|
|
$(srcdir)/H/dhstruct.h \
|
|
$(srcdir)/H/eval.h \
|
|
$(srcdir)/H/heapgc.h \
|
|
$(srcdir)/H/hglobals.h \
|
|
$(srcdir)/H/hlocals.h \
|
|
$(srcdir)/H/hstruct.h \
|
|
$(srcdir)/H/iglobals.h \
|
|
$(srcdir)/H/ihstruct.h \
|
|
$(srcdir)/H/ilocals.h \
|
|
$(srcdir)/H/index.h \
|
|
$(srcdir)/H/inline-only.h \
|
|
$(srcdir)/H/iopreds.h \
|
|
$(srcdir)/H/iswiatoms.h \
|
|
$(srcdir)/H/qly.h \
|
|
$(srcdir)/H/rclause.h \
|
|
$(srcdir)/H/rglobals.h \
|
|
$(srcdir)/H/rlocals.h \
|
|
$(srcdir)/H/rheap.h \
|
|
$(srcdir)/H/rhstruct.h \
|
|
$(srcdir)/H/threads.h \
|
|
$(srcdir)/H/tracer.h \
|
|
$(srcdir)/H/trim_trail.h \
|
|
$(srcdir)/H/yapio.h \
|
|
$(srcdir)/H/YapText.h \
|
|
$(srcdir)/BEAM/eam.h $(srcdir)/BEAM/eamamasm.h \
|
|
$(srcdir)/OPTYap/opt.config.h \
|
|
$(srcdir)/OPTYap/opt.proto.h $(srcdir)/OPTYap/opt.structs.h \
|
|
$(srcdir)/OPTYap/opt.macros.h $(srcdir)/OPTYap/or.macros.h \
|
|
$(srcdir)/OPTYap/or.sba_amiops.h $(srcdir)/OPTYap/or.sba_unify.h \
|
|
$(srcdir)/OPTYap/tab.structs.h $(srcdir)/OPTYap/locks_x86.h \
|
|
$(srcdir)/OPTYap/locks_sparc.h $(srcdir)/OPTYap/locks_mips.h \
|
|
$(srcdir)/OPTYap/locks_mips_funcs.h $(srcdir)/OPTYap/locks_alpha.h \
|
|
$(srcdir)/OPTYap/locks_alpha_funcs.h \
|
|
$(srcdir)/OPTYap/locks_pthread.h \
|
|
$(srcdir)/H/cut_c.h \
|
|
$(srcdir)/H/iatoms.h $(srcdir)/H/ratoms.h $(srcdir)/H/tatoms.h \
|
|
$(srcdir)/library/dialect/swi/fli/swi.h
|
|
|
|
IOLIB_SOURCES=$(srcdir)/os/pl-buffer.c $(srcdir)/os/pl-ctype.c \
|
|
$(srcdir)/os/pl-codelist.c \
|
|
$(srcdir)/os/pl-dtoa.c \
|
|
$(srcdir)/os/pl-error.c \
|
|
$(srcdir)/os/pl-file.c \
|
|
$(srcdir)/os/pl-files.c \
|
|
$(srcdir)/os/pl-fmt.c \
|
|
$(srcdir)/os/pl-locale.h \
|
|
$(srcdir)/os/pl-glob.c \
|
|
$(srcdir)/os/pl-option.c \
|
|
$(srcdir)/os/pl-os.c \
|
|
$(srcdir)/os/pl-prologflag.c \
|
|
$(srcdir)/os/pl-privitf.c \
|
|
$(srcdir)/os/pl-read.c \
|
|
$(srcdir)/os/pl-rl.c \
|
|
$(srcdir)/os/pl-stream.c $(srcdir)/os/pl-string.c \
|
|
$(srcdir)/os/pl-table.c \
|
|
$(srcdir)/os/pl-tai.c \
|
|
$(srcdir)/os/pl-text.c \
|
|
$(srcdir)/os/pl-version.c \
|
|
$(srcdir)/os/pl-write.c \
|
|
$(srcdir)/C/pl-yap.c @WINDOWS@$(srcdir)/os/windows/uxnt.c
|
|
|
|
C_SOURCES= \
|
|
$(IOLIB_SOURCES) \
|
|
$(srcdir)/C/absmi.c $(srcdir)/C/adtdefs.c \
|
|
$(srcdir)/C/agc.c $(srcdir)/C/alloc.c \
|
|
$(srcdir)/C/amasm.c $(srcdir)/C/analyst.c \
|
|
$(srcdir)/C/arith0.c $(srcdir)/C/arith1.c $(srcdir)/C/arith2.c \
|
|
$(srcdir)/C/atomic.c \
|
|
$(srcdir)/C/arrays.c \
|
|
$(srcdir)/C/attvar.c $(srcdir)/C/bb.c \
|
|
$(srcdir)/C/bignum.c \
|
|
$(srcdir)/C/c_interface.c $(srcdir)/C/cdmgr.c $(srcdir)/C/cmppreds.c \
|
|
$(srcdir)/C/clause_list.c \
|
|
$(srcdir)/C/compiler.c $(srcdir)/C/computils.c \
|
|
$(srcdir)/C/corout.c $(srcdir)/C/dbase.c $(srcdir)/C/dlmalloc.c \
|
|
$(srcdir)/C/errors.c \
|
|
$(srcdir)/C/eval.c $(srcdir)/C/exec.c \
|
|
$(srcdir)/C/exo.c \
|
|
$(srcdir)/C/exo_udi.c \
|
|
$(srcdir)/C/globals.c $(srcdir)/C/gmp_support.c \
|
|
$(srcdir)/C/gprof.c $(srcdir)/C/grow.c \
|
|
$(srcdir)/C/heapgc.c $(srcdir)/C/index.c \
|
|
$(srcdir)/C/init.c $(srcdir)/C/inlines.c \
|
|
$(srcdir)/C/iopreds.c $(srcdir)/C/depth_bound.c \
|
|
$(srcdir)/C/load_foreign.c \
|
|
$(srcdir)/C/load_dl.c $(srcdir)/C/load_dld.c $(srcdir)/C/load_none.c \
|
|
$(srcdir)/C/load_aout.c $(srcdir)/C/load_aix.c $(srcdir)/C/load_dll.c \
|
|
$(srcdir)/C/load_shl.c $(srcdir)/C/load_dyld.c \
|
|
$(srcdir)/C/mavar.c $(srcdir)/C/modules.c $(srcdir)/C/other.c \
|
|
$(srcdir)/C/parser.c \
|
|
$(srcdir)/C/qlyr.c \
|
|
$(srcdir)/C/qlyw.c \
|
|
$(srcdir)/C/range.c \
|
|
$(srcdir)/C/save.c $(srcdir)/C/scanner.c $(srcdir)/C/signals.c \
|
|
$(srcdir)/C/sort.c $(srcdir)/C/stdpreds.c $(srcdir)/C/sysbits.c \
|
|
$(srcdir)/C/text.c \
|
|
$(srcdir)/C/threads.c \
|
|
$(srcdir)/C/tracer.c $(srcdir)/C/unify.c $(srcdir)/C/userpreds.c \
|
|
$(srcdir)/C/udi.c \
|
|
$(srcdir)/C/utilpreds.c $(srcdir)/C/write.c $(srcdir)/console/yap.c \
|
|
$(srcdir)/C/yap-args.c \
|
|
$(srcdir)/C/ypstdio.c \
|
|
$(srcdir)/BEAM/eam_am.c $(srcdir)/BEAM/eam_showcode.c \
|
|
$(srcdir)/BEAM/eamindex.c $(srcdir)/BEAM/eamamasm.c \
|
|
$(srcdir)/BEAM/eam_gc.c $(srcdir)/BEAM/eam_split.c \
|
|
$(srcdir)/OPTYap/or.memory.c $(srcdir)/OPTYap/opt.init.c \
|
|
$(srcdir)/OPTYap/opt.preds.c $(srcdir)/OPTYap/or.copy_engine.c \
|
|
$(srcdir)/OPTYap/or.cow_engine.c $(srcdir)/OPTYap/or.sba_engine.c \
|
|
$(srcdir)/OPTYap/or.thread_engine.c \
|
|
$(srcdir)/OPTYap/or.scheduler.c $(srcdir)/OPTYap/or.cut.c \
|
|
$(srcdir)/OPTYap/tab.tries.c $(srcdir)/OPTYap/tab.completion.c \
|
|
# $(srcdir)/library/mpi/mpi.c $(srcdir)/library/mpi/mpe.c \
|
|
# $(srcdir)/library/lammpi/yap_mpi.c $(srcdir)/library/lammpi/hash.c $(srcdir)/library/lammpi/prologterms2c.c \
|
|
$(srcdir)/C/cut_c.c \
|
|
$(srcdir)/library/dialect/swi/fli/swi.c \
|
|
$(srcdir)/library/dialect/swi/fli/blobs.c
|
|
|
|
PLCONS_SOURCES = \
|
|
$(srcdir)/console/LGPL/pl-nt.c \
|
|
$(srcdir)/console/LGPL/pl-ntcon.c \
|
|
$(srcdir)/console/LGPL/pl-ntconsole.c \
|
|
$(srcdir)/console/LGPL/pl-ntmain.c
|
|
|
|
PL_SOURCES= \
|
|
$(srcdir)/pl/arith.yap \
|
|
$(srcdir)/pl/arrays.yap \
|
|
$(srcdir)/pl/attributes.yap \
|
|
$(srcdir)/pl/boot.yap \
|
|
$(srcdir)/pl/callcount.yap\
|
|
$(srcdir)/pl/checker.yap $(srcdir)/pl/chtypes.yap \
|
|
$(srcdir)/pl/consult.yap \
|
|
$(srcdir)/pl/control.yap \
|
|
$(srcdir)/pl/corout.yap $(srcdir)/pl/debug.yap \
|
|
$(srcdir)/pl/dbload.yap \
|
|
$(srcdir)/pl/depth_bound.yap \
|
|
$(srcdir)/pl/dialect.yap \
|
|
$(srcdir)/pl/directives.yap \
|
|
$(srcdir)/pl/eam.yap \
|
|
$(srcdir)/pl/eval.yap \
|
|
$(srcdir)/pl/errors.yap \
|
|
$(srcdir)/pl/flags.yap \
|
|
$(srcdir)/pl/grammar.yap \
|
|
$(srcdir)/pl/ground.yap \
|
|
$(srcdir)/pl/hacks.yap \
|
|
$(srcdir)/pl/init.yap \
|
|
$(srcdir)/pl/listing.yap \
|
|
$(srcdir)/pl/lists.yap \
|
|
$(srcdir)/pl/messages.yap \
|
|
$(srcdir)/pl/load_foreign.yap \
|
|
$(srcdir)/pl/modules.yap $(srcdir)/pl/preds.yap \
|
|
$(srcdir)/pl/profile.yap \
|
|
$(srcdir)/pl/protect.yap \
|
|
$(srcdir)/pl/qly.yap \
|
|
$(srcdir)/pl/save.yap \
|
|
$(srcdir)/pl/setof.yap \
|
|
$(srcdir)/pl/signals.yap \
|
|
$(srcdir)/pl/sort.yap \
|
|
$(srcdir)/pl/statistics.yap \
|
|
$(srcdir)/pl/strict_iso.yap \
|
|
$(srcdir)/pl/tabling.yap $(srcdir)/pl/threads.yap \
|
|
$(srcdir)/pl/udi.yap \
|
|
$(srcdir)/pl/utils.yap \
|
|
$(srcdir)/pl/history.pl \
|
|
$(srcdir)/pl/swi.yap \
|
|
$(srcdir)/pl/yapor.yap $(srcdir)/pl/yio.yap
|
|
|
|
YAPDOCS=$(srcdir)/docs/yap.tex $(srcdir)/docs/chr.tex \
|
|
$(srcdir)/docs/clpr.tex $(srcdir)/docs/swi.tex
|
|
|
|
IOLIB_OBJECTS=pl-buffer.o pl-codelist.o pl-ctype.o pl-dtoa.o pl-error.o \
|
|
pl-file.o pl-files.o pl-fmt.o \
|
|
pl-glob.o pl-locale.o pl-option.o \
|
|
pl-nt.o \
|
|
pl-os.o pl-privitf.o \
|
|
pl-prologflag.o \
|
|
pl-read.o \
|
|
pl-rl.o \
|
|
pl-stream.o pl-string.o pl-table.o \
|
|
pl-tai.o pl-text.o pl-utf8.o \
|
|
pl-version.o pl-write.o \
|
|
pl-yap.o @WINDOWS@ uxnt.o
|
|
|
|
ENGINE_OBJECTS = \
|
|
agc.o absmi.o adtdefs.o alloc.o amasm.o analyst.o arrays.o \
|
|
arith0.o arith1.o arith2.o atomic.o attvar.o \
|
|
bignum.o bb.o \
|
|
cdmgr.o cmppreds.o compiler.o computils.o \
|
|
corout.o cut_c.o dbase.o dlmalloc.o errors.o eval.o \
|
|
exec.o exo.o exo_udi.o globals.o gmp_support.o gprof.o grow.o \
|
|
heapgc.o index.o init.o inlines.o \
|
|
iopreds.o depth_bound.o mavar.o \
|
|
modules.o other.o \
|
|
parser.o qlyr.o qlyw.o range.o \
|
|
save.o scanner.o signals.o text.o sort.o stdpreds.o \
|
|
sysbits.o threads.o tracer.o \
|
|
udi.o\
|
|
unify.o userpreds.o utilpreds.o \
|
|
yap-args.o write.o \
|
|
blobs.o swi.o ypstdio.o $(IOLIB_OBJECTS)
|
|
|
|
LIBTAI_OBJECTS = \
|
|
tai_add.o tai_now.o tai_pack.o \
|
|
tai_sub.o tai_unpack.o taia_add.o taia_approx.o \
|
|
taia_fmtfrac.o taia_frac.o taia_half.o taia_less.o \
|
|
taia_now.o taia_pack.o taia_sub.o taia_tai.o taia_unpack.o \
|
|
caldate_fmt.o caldate_scan.o caldate_fmjd.o caldate_mjd.o \
|
|
caldate_norm.o caldate_ster.o leapsecs_read.o \
|
|
leapsecs_init.o leapsecs_add.o leapsecs_sub.o caltime_fmt.o \
|
|
caltime_scan.o caltime_tai.o caltime_utc.o
|
|
|
|
C_INTERFACE_OBJECTS = \
|
|
load_foreign.o load_dl.o load_dld.o load_dyld.o \
|
|
load_none.o load_aout.o load_aix.o load_dll.o load_shl.o \
|
|
c_interface.o clause_list.o
|
|
|
|
OR_OBJECTS = \
|
|
or.memory.o opt.init.o opt.preds.o \
|
|
or.copy_engine.o or.cow_engine.o or.sba_engine.o or.thread_engine.o \
|
|
or.scheduler.o or.cut.o \
|
|
tab.tries.o tab.completion.o
|
|
|
|
BEAM_OBJECTS = \
|
|
eamamasm.o eam_showcode.o eamindex.o eam_am.o
|
|
|
|
STATIC_OBJECTS = \
|
|
@STATIC_MODE@sys.o yap_random.o regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regerror.o regfree.o regexec.o
|
|
|
|
LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJECTS) $(STATIC_OBJECTS) $(LIBTAI_OBJECTS)
|
|
|
|
OBJECTS = yap.o $(LIB_OBJECTS)
|
|
|
|
PLCONS_OBJECTS = \
|
|
pl-ntcon.o \
|
|
pl-ntconsole.o \
|
|
pl-ntmain.o
|
|
|
|
all: parms.h startup.yss @WINDOWS@ yap-win@EXEC_SUFFIX@
|
|
|
|
Makefile: $(srcdir)/Makefile.in
|
|
|
|
$(srcdir)/H/Yap.h: config.h YapTermConfig.h \
|
|
$(srcdir)/H/YapTags.h \
|
|
$(srcdir)/H/YapCompoundTerm.h
|
|
|
|
config.h: parms.h
|
|
|
|
parms.h: Makefile
|
|
@echo "#define YAP_ROOTDIR \"$(prefix)\"" > $@%
|
|
@echo "#define YAP_BINDIR \"$(BINDIR)\"" >> $@%
|
|
@echo "#define YAP_LIBDIR \"$(YAPLIBDIR)\"" >> $@%
|
|
@echo "#define YAP_SHAREDIR \"$(SHAREDIR)\"" >> $@%
|
|
@echo "#define YAP_PL_SRCDIR \"$(SHAREDIR)/Yap/pl\"" >> $@%
|
|
@echo "#define YAP_STARTUP \"$(YAPSTARTUP)\"" >> $@%
|
|
@echo $(VERSION) | $(AWK) -F. '{ printf("#define YAP_VERSION %d\n", $$1 * 10000 + $$2 * 100 + $$3); }' >> $@%
|
|
@echo "#define MYDDAS_VERSION \"$(MYDDAS_VERSION)\"" >> $@%
|
|
@echo "#define YAP_ARCH \"$(ARCH)\"" >> $@%
|
|
@echo "#define C_LIBS \"$(LIBS)\"" >> $@%
|
|
@echo "#define C_LIBPLSO \"$(DLL_LIBS)\"" >> $@%
|
|
@echo "#define YAP_YAPLIB \"$(YAPLIB)\"" >> $@%
|
|
@echo "#define C_CC \"$(CC)\"" >> $@%
|
|
@echo "#define C_CFLAGS \"$(CFLAGS)\"" >> $@%
|
|
@echo "#define C_LDFLAGS \"$(LDFLAGS)\"" >> $@%
|
|
@echo "#define SO_EXT \"$(SO)\"" >> $@%
|
|
@echo "#define SO_PATH \"$(YAPLIBDIR)\"" >> $@%
|
|
@echo "#define YAP_TIMESTAMP \"`date +%s`\"" >> $@%
|
|
@echo "#define YAP_SVERSION \"YAP $(VERSION) ($(ARCH)): `date`\"" >> $@%
|
|
@if cmp -s $@% $@; then rm $@%; else mv $@% $@; fi
|
|
|
|
|
|
$(OBJECTS): config.h
|
|
|
|
yap.o: $(srcdir)/console/yap.c config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/console/yap.c -o $@
|
|
|
|
#special rule for this one: we cannot use -fomit-frame-pointer because this will
|
|
# interface with the outside world.
|
|
c_interface.o: $(srcdir)/C/c_interface.c $(srcdir)/include/c_interface.h config.h
|
|
$(CC) $(C_INTERF_FLAGS) -c $(srcdir)/C/c_interface.c -o c_interface.o
|
|
|
|
yap-argss.o: $(srcdir)/C/yap-args.c $(srcdir)/include/c_interface.h config.h
|
|
$(CC) $(C_INTERF_FLAGS) -c $(srcdir)/C/yap-args.c -o yap-args.o
|
|
|
|
clause_list.o: $(srcdir)/C/clause_list.c $(srcdir)/include/clause_list.h config.h
|
|
$(CC) $(C_INTERF_FLAGS) -c $(srcdir)/C/clause_list.c -o clause_list.o
|
|
|
|
udi.o: $(srcdir)/C/udi.c config.h
|
|
$(CC) -c $(C_INTERF_FLAGS) $(srcdir)/C/udi.c -o $@
|
|
|
|
%.o: $(srcdir)/C/%.c config.h
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
%.o: $(srcdir)/OPTYap/%.c config.h
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
%.o: $(srcdir)/BEAM/%.c config.h
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
sys.o: $(srcdir)/library/system/sys.c config.h
|
|
$(CC) -c $(CFPLAGS) -I$(srcdir)/include $(srcdir)/library/system/sys.c -o $@
|
|
|
|
yap_random.o: $(srcdir)/library/random/yap_random.c config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/random/yap_random.c -o $@
|
|
|
|
%.o: $(srcdir)/library/regex/%.c @NO_BUILTIN_REGEXP@ $(srcdir)/library/regex/regex2.h $(srcdir)/library/regex/engine.c config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/regex $< -o $@
|
|
|
|
swi.o: $(srcdir)/library/dialect/swi/fli/swi.c $(srcdir)/library/dialect/swi/fli/swi.h $(srcdir)/include/SWI-Prolog.h $(srcdir)/os/SWI-Stream.h config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/dialect/swi/fli $(srcdir)/library/dialect/swi/fli/swi.c -o $@
|
|
|
|
blobs.o: $(srcdir)/library/dialect/swi/fli/blobs.c $(srcdir)/library/dialect/swi/fli/swi.h $(srcdir)/include/SWI-Prolog.h config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/dialect/swi/fli $(srcdir)/library/dialect/swi/fli/blobs.c -o $@
|
|
|
|
%.o: $(srcdir)/os/%.c config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
|
|
|
pl-ntcon.o: $(srcdir)/console/LGPL/pl-ntcon.c config.h
|
|
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include $(srcdir)/console/LGPL/pl-ntcon.c -o $@
|
|
|
|
pl-ntconsole.o: $(srcdir)/console/LGPL/pl-ntconsole.c config.h
|
|
$(CC) -municode -DUNICODE -D_UNICODE -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir) -I$(srcdir)/include -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/console/LGPL/pl-ntconsole.c -o $@
|
|
|
|
pl-ntmain.o: $(srcdir)/console/LGPL/pl-ntmain.c config.h
|
|
$(CC) -municode -DUNICODE -D_UNICODE -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/console/LGPL/pl-ntmain.c -o $@
|
|
|
|
uxnt.o: $(srcdir)/os/windows/uxnt.c config.h
|
|
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $(srcdir)/os/windows/uxnt.c -o $@
|
|
|
|
# libtai rule
|
|
%.o : $(srcdir)/os/libtai/%.c config.h
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
|
|
## CPP'ed files (for macro debugging)
|
|
|
|
%.i : $(srcdir)/C/%.c
|
|
$(CC) -E $< $(CFLAGS) > $@
|
|
|
|
absmi.i: $(srcdir)/C/absmi.c
|
|
$(CC) -E $(CFLAGS) $(ABSMI_FLAGS) $(srcdir)/C/absmi.c > $@
|
|
|
|
c_interface.i: $(srcdir)/C/c_interface.c $(srcdir)/include/c_interface.h
|
|
$(CC) -E $(C_INTERF_FLAGS) $(srcdir)/C/c_interface.c > $@
|
|
#
|
|
|
|
mycb: $(srcdir)/mycb.c
|
|
$(CC) $(CFLAGS) $(srcdir)/mycb.c -o mycb
|
|
|
|
INSTALLED_PACKAGES= \
|
|
library/matrix \
|
|
library/random \
|
|
library/regex \
|
|
library/rltree \
|
|
library/system \
|
|
library/tries \
|
|
packages/meld \
|
|
packages/ProbLog \
|
|
packages/xml \
|
|
packages/yap-lbfgs \
|
|
@PKG_BDDLIB@ \
|
|
@PKG_CLPBN@ \
|
|
@PKG_CUDA@ \
|
|
@PKG_CPLINT@ \
|
|
@PKG_GECODE@ \
|
|
@PKG_MATLAB@ \
|
|
@PKG_MINISAT@ \
|
|
@PKG_MPI@ \
|
|
@PKG_MYDDAS@ \
|
|
@PKG_PRISM@ \
|
|
@PKG_PYTHON@ \
|
|
@PKG_RAPTOR@ \
|
|
@PKG_CHR@ \
|
|
@PKG_CLIB@ \
|
|
@PKG_JPL@ \
|
|
@PKG_LIBARCHIVE@ \
|
|
@PKG_LTX2HTM@ \
|
|
@PKG_ODBC@ \
|
|
@PKG_PLDOC@ \
|
|
@PKG_PLUNIT@ \
|
|
@PKG_REAL@ \
|
|
@PKG_RDF@ \
|
|
@PKG_SEMWEB@ \
|
|
@PKG_SGML@ \
|
|
@PKG_WINCONSOLE@ \
|
|
@PKG_ZLIB@
|
|
|
|
PACKAGES= \
|
|
library \
|
|
swi/library \
|
|
swi/library/clp \
|
|
$(INSTALLED_PACKAGES)
|
|
|
|
all: startup.yss
|
|
for f in $(PACKAGES); do ( cd $$f ; $(MAKE) ); done
|
|
|
|
startup.yss: yap@EXEC_SUFFIX@ $(PL_SOURCES)
|
|
-rm -f startup.yss
|
|
echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). qsave_program('startup.yss')." | @PRE_INSTALL_ENV@ ./yap@EXEC_SUFFIX@ -b $(srcdir)/pl/boot.yap
|
|
|
|
yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@
|
|
$(MPI_CC) $(EXECUTABLE_CFLAGS) $(LDFLAGS) -o yap@EXEC_SUFFIX@ yap.o @YAPLIB@ $(LIBS)
|
|
|
|
yap-win: yap-win@EXEC_SUFFIX@
|
|
|
|
yapwin: yap-win@EXEC_SUFFIX@
|
|
|
|
yap-win@EXEC_SUFFIX@: $(PLCONS_OBJECTS) $(HEADERS) @YAPLIB@
|
|
(cd swi/console; $(MAKE))
|
|
$(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win@EXEC_SUFFIX@ $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) @MPILDF@
|
|
|
|
libYap.a: $(LIB_OBJECTS)
|
|
-rm -f libYap.a
|
|
$(AR) rc libYap.a $(LIB_OBJECTS)
|
|
$(RANLIB) libYap.a
|
|
|
|
@DYNYAPLIB@: $(LIB_OBJECTS)
|
|
@YAPLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLAGS) $(SONAMEFLAG)
|
|
|
|
install: @INSTALL_COMMAND@
|
|
|
|
install_unix: startup.yss @YAPLIB@
|
|
mkdir -p $(DESTDIR)$(BINDIR)
|
|
mkdir -p $(DESTDIR)$(YAPLIBDIR)
|
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
|
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl
|
|
mkdir -p $(DESTDIR)$(DOCSDIR)
|
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)/src
|
|
$(INSTALL_PROGRAM) -m 755 yap@EXEC_SUFFIX@ $(DESTDIR)$(BINDIR)/yap
|
|
$(INSTALL_DATA) startup.yss $(DESTDIR)$(YAPLIBDIR)/startup.yss
|
|
$(INSTALL_DATA) -m 755 @YAPLIB@ $(DESTDIR)$(LIBDIR)
|
|
$(INSTALL) $(srcdir)/Artistic $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL) $(srcdir)/README $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL) $(srcdir)/COPYING $(DESTDIR)$(DOCSDIR)
|
|
for f in $(PL_SOURCES); do $(INSTALL) $$f $(DESTDIR)$(SHAREDIR)/Yap/pl; done
|
|
$(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDEDIR)/src
|
|
for h in $(INTERFACE_HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
|
|
$(INSTALL) config.h $(DESTDIR)$(INCLUDEDIR)/src/config.h
|
|
$(INSTALL) parms.h $(DESTDIR)$(INCLUDEDIR)/src/parms.h
|
|
$(INSTALL) YapTermConfig.h $(DESTDIR)$(INCLUDEDIR)
|
|
for f in $(PACKAGES); do ( echo "**** INSTALLING **** " $$f; cd $$f ; $(MAKE) install ); done
|
|
|
|
install_win32: startup.yss @WINDOWS@ yap-win@EXEC_SUFFIX@ install_unix
|
|
$(INSTALL_PROGRAM) -m 755 yap.dll $(DESTDIR)$(BINDIR)/yap.dll
|
|
@WINDOWS@ $(INSTALL_PROGRAM) -m 755 yap-win.exe $(DESTDIR)$(BINDIR)/yap-win.exe
|
|
@WINDOWS@ $(INSTALL_PROGRAM) -m 755 plterm.dll $(DESTDIR)$(BINDIR)/plterm.dll
|
|
|
|
install_library: @YAPLIB@
|
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
|
for h in $(HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
|
|
|
|
##########
|
|
TAGS: $(C_SOURCES) $(PL_SOURCES) $(HEADERS)
|
|
etags $(C_SOURCES) $(PL_SOURCES) $(HEADERS)
|
|
|
|
depend: $(HEADERS) $(C_SOURCES)
|
|
-@if test "$(GCC)" = yes; then\
|
|
$(CC) -MM $(CFLAGS) -D__YAP_NOT_INSTALLED__=1 -I$(srcdir) -I$(srcdir)/include -I$(srcdir)/os $(C_SOURCES) >> Makefile;\
|
|
else\
|
|
makedepend -f - -- $(CFLAGS) -I$(srcdir)/include -- $(C_SOURCES) |\
|
|
sed 's|.*/\([^:]*\):|\1:|' >> Makefile ;\
|
|
fi
|
|
|
|
clean: clean_docs clean_local
|
|
for f in $(PACKAGES); do ( cd $$f ; $(MAKE) clean ); done
|
|
|
|
clean_local:
|
|
rm -f *.o *~ *.BAK *.a
|
|
|
|
distclean: distclean_docs clean_local
|
|
for f in $(PACKAGES); do ( ECHO "**** CLEANING ****" $$f; cd $$f ; $(MAKE) distclean ); done
|
|
rm -f yap@EXEC_SUFFIX@ startup.yss libYap.* Makefile packages/Makefile.defs packages/Dialect.defs
|
|
|
|
dist:
|
|
|
|
.c.s:
|
|
$(CC) $(CFLAGS) -S $<
|
|
|
|
# use my own .def file.
|
|
libWYap.a: yap.dll
|
|
dlltool --def $(srcdir)/misc/yap.def \
|
|
--dllname yap.dll \
|
|
--output-lib libWYap.a
|
|
|
|
# yap.dll: libYap.a
|
|
# $(CC) $(CFLAGS) -shared -o yap.dll \
|
|
# -Wl,--export-all-symbols \
|
|
# -Wl,--enable-auto-import \
|
|
# -Wl,--whole-archive libYap.a \
|
|
# -Wl,--no-whole-archive $(LIBS) $(LDFLAGS)
|
|
|
|
install_info:
|
|
$(MAKE) info; \
|
|
$(INSTALL) yap.info* $(DESTDIR)$(INFODIR); \
|
|
if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \
|
|
bzip2 --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \
|
|
else \
|
|
if test -e $(DESTDIR)$(INFODIR)/emacs.gz; then \
|
|
gzip --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \
|
|
fi \
|
|
fi; \
|
|
$(INSTALL_INFO) --quiet --section "Programming Languages" yap.info $(DESTDIR)$(INFODIR)/dir; \
|
|
cd $(srcdir)/LGPL/pillow/doc ; \
|
|
$(INSTALL) pillow_doc.info $(DESTDIR)$(INFODIR); \
|
|
if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \
|
|
bzip2 --quiet --force $(DESTDIR)$(INFODIR)/pillow_doc.info; \
|
|
else \
|
|
if test -e $(DESTDIR)$(INFODIR)/emacs.gz; then \
|
|
gzip --quiet --force $(DESTDIR)$(INFODIR)/pillow_doc.info; \
|
|
fi \
|
|
fi; \
|
|
$(INSTALL_INFO) --quiet --section "Programming Languages" --entry="`cat pillow_doc.infoindex`" --info-dir=$(DESTDIR)$(INFODIR) pillow_doc.info
|
|
|
|
install_docs:
|
|
$(MAKE) pdf
|
|
$(MAKE) html
|
|
$(INSTALL_DATA) yap.html* $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) yap.pdf $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/Artistic $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/COPYING $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/changes4.3.html $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/changes-5.0.html $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/changes-5.1.html $(DESTDIR)$(DOCSDIR)
|
|
$(INSTALL_DATA) $(srcdir)/changes-6.0.html $(DESTDIR)$(DOCSDIR)
|
|
|
|
|
|
info: yap.info
|
|
|
|
yap.info: $(YAPDOCS)
|
|
$(MAKEINFO) $(srcdir)/docs/yap.tex
|
|
|
|
html: yap.html
|
|
|
|
yap.html: $(srcdir)/docs/yap.tex
|
|
$(TEXI2HTML) $(srcdir)/docs/yap.tex
|
|
|
|
dvi: yap.dvi
|
|
|
|
yap.dvi: $(YAPDOCS)
|
|
$(TEXI2DVI) $(srcdir)/docs/yap.tex
|
|
|
|
ps: yap.ps
|
|
|
|
yap.ps: $(YAPDOCS)
|
|
dvips -o yap.ps $(srcdir)/docs/yap
|
|
|
|
pdf: yap.pdf
|
|
|
|
yap.pdf: $(YAPDOCS)
|
|
$(TEXI2PDF) $(srcdir)/docs/yap.tex
|
|
|
|
clean_docs:
|
|
rm -f *.aux *.ca *.cas *.cn *.cns *.cp *.cps *.cy *.cys *.dvi *.fn *.fns *.ky *.log *.sa *.sas *.sn *.sns *.sy *.sys *~ *.tp *.vr *.toc *.pg
|
|
|
|
distclean_docs: clean_docs
|
|
rm -f yap.ps yap.html yap_toc.html yap.pdf yap.info*
|
|
|
|
installcheck:
|
|
@ENABLE_CPLINT@ (cd packages/cplint; $(MAKE) installcheck)
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
|