This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Makefile.in

789 lines
21 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=@SAVED_STATE_PREFIX@startup.yss
#
# Please do not add YAP_EXTRA flags here: if you do check the flags
# for c_interface.c
#
CC=@CC@
CXX=@CXX@
MPI_CC=@MPI_CC@
CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/include -I$(srcdir)/os -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/CXX
EXECUTABLE_CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
CFLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
CXXFLAGS= @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
C_INTERF_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) -Iinclude
C_PARSER_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
#
#
# You shouldn't need to change what follows.
#
ARCH=@ARCH@
AWK=@AWK@
CPP=@CPP@
RC=@RC@
RCFLAGS=@RCFLAGS@
DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"$(DESTDIR)\"
LIBS=@LIBS@
DLL_LIBS=@LIBS@ @EXTRA_LIBS_FOR_DLLS@
LDFLAGS=@LDFLAGS@
EXTRAYAPLIBS=@EXTRAYAPLIBS@
LN_S=@LN_S@
M4=@M4@
GCC=@GCC@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_INFO=@INSTALL_INFO@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
M4GENHDRS=@M4GENHDRS@
M4GENABSMI=@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@
VPATH=@srcdir@
CWD=$(PWD)
#
VERSION=@YAP_VERSION@
Y=@YAP_MAJOR_VERSION@
DOC_VERSION=@DOC_VERSION@
MYDDAS_VERSION=@MYDDAS_VERSION@
#
INTERFACE_HEADERS = \
$(IOLIB_HEADERS) \
include/c_interface.h \
include/clause_list.h \
include/dswiatoms.h \
include/udi.h \
include/yap_structs.h \
include/YapInterface.h \
include/SWI-Prolog.h \
include/YapError.h \
H/TermExt.h \
H/YapTags.h \
H/Tags_32bits.h \
H/Tags_32Ops.h \
H/Tags_32LowTag.h \
H/Tags_64bits.h \
H/Tags_24bits.h \
H/YapCompoundTerm.h \
include/YapRegs.h \
H/YapTerm.h \
library/dialect/bprolog/fli/bprolog.h \
os/pl-thread.h \
os/SWI-Stream.h
IOLIB_HEADERS=os/pl-buffer.h \
os/pl-ctype.h \
H/pl-codelist.h \
os/pl-dtoa.h \
os/dtoa.c \
H/pl-incl.h \
H/pl-global.h \
os/pl-option.h \
os/pl-os.h \
os/pl-privitf.h \
os/pl-table.h \
os/pl-text.h \
os/pl-utf8.h \
H/pl-yap.h @WINDOWS@ os/windows/dirent.h os/windows/utf8.h os/windows/utf8.c os/windows/uxnt.h os/windows/popen.c
HEADERS = \
H/Atoms.h \
H/sshift.h \
H/Yap.h \
H/Yatom.h \
H/YapHeap.h \
H/Regs.h \
H/Yapproto.h \
H/absmi.h \
H/alloc.h \
H/amidefs.h \
H/amiops.h \
H/arrays.h \
H/arith2.h \
H/attvar.h \
H/clause.h \
H/compile.h \
H/corout.h \
H/dlmalloc.h \
H/dglobals.h \
H/dlocals.h \
H/dhstruct.h \
H/eval.h \
H/heapgc.h \
H/hglobals.h \
H/hlocals.h \
H/hstruct.h \
H/iglobals.h \
H/ihstruct.h \
H/ilocals.h \
H/index.h \
H/inline-only.h \
H/iopreds.h \
H/iswiatoms.h \
H/qly.h \
H/rclause.h \
H/rglobals.h \
H/rlocals.h \
H/rheap.h \
H/rhstruct.h \
H/threads.h \
H/tracer.h \
H/trim_trail.h \
H/yapio.h \
H/YapSignals.h \
H/YapText.h \
H/cut_c.h \
H/iatoms.h H/ratoms.h H/tatoms.h \
CXX/yapi.hh \
BEAM/eam.h BEAM/eamamasm.h \
OPTYap/opt.config.h \
OPTYap/opt.proto.h OPTYap/opt.structs.h \
OPTYap/opt.macros.h OPTYap/or.macros.h \
OPTYap/or.sba_amiops.h OPTYap/or.sba_unify.h \
OPTYap/tab.structs.h OPTYap/locks_x86.h \
OPTYap/locks_sparc.h OPTYap/locks_mips.h \
OPTYap/locks_mips_funcs.h OPTYap/locks_alpha.h \
OPTYap/locks_alpha_funcs.h \
OPTYap/locks_pthread.h \
library/dialect/swi/fli/swi.h
IOLIB_SOURCES=os/pl-buffer.c os/pl-ctype.c \
os/pl-codelist.c \
os/pl-dtoa.c \
os/pl-error.c \
os/pl-file.c \
os/pl-files.c \
os/pl-fmt.c \
os/pl-locale.h \
os/pl-glob.c \
os/pl-option.c \
os/pl-os.c \
os/pl-prologflag.c \
os/pl-privitf.c \
os/pl-read.c \
os/pl-rl.c \
os/pl-stream.c os/pl-string.c \
os/pl-table.c \
os/pl-tai.c \
os/pl-text.c \
os/pl-version.c \
os/pl-write.c \
C/pl-yap.c @WINDOWS@os/windows/uxnt.c
C_SOURCES= \
$(IOLIB_SOURCES) \
C/absmi.c C/adtdefs.c \
C/agc.c C/alloc.c \
C/amasm.c C/analyst.c \
C/arith0.c C/arith1.c C/arith2.c \
C/atomic.c \
C/arrays.c \
C/attvar.c C/bb.c \
C/bignum.c \
C/c_interface.c C/cdmgr.c C/cmppreds.c \
C/clause_list.c \
C/compiler.c C/computils.c \
C/corout.c C/dbase.c C/dlmalloc.c \
C/errors.c \
C/eval.c C/exec.c \
C/exo.c \
C/exo_udi.c \
C/globals.c C/gmp_support.c \
C/gprof.c C/grow.c \
C/heapgc.c C/index.c \
C/init.c C/inlines.c \
C/iopreds.c C/depth_bound.c \
C/load_foreign.c \
C/load_dl.c C/load_dld.c C/load_none.c \
C/load_aout.c C/load_aix.c C/load_dll.c \
C/load_shl.c C/load_dyld.c \
C/mavar.c C/modules.c C/other.c \
C/parser.c \
C/qlyr.c \
C/qlyw.c \
C/range.c \
C/save.c C/scanner.c C/signals.c \
C/sort.c C/stdpreds.c C/sysbits.c \
C/text.c \
C/threads.c \
C/tracer.c C/unify.c C/userpreds.c \
C/udi.c \
C/utilpreds.c C/write.c console/yap.c \
C/yap-args.c \
C/ypstdio.c \
CXX/yapi.cpp \
BEAM/eam_am.c BEAM/eam_showcode.c \
BEAM/eamindex.c BEAM/eamamasm.c \
BEAM/eam_gc.c BEAM/eam_split.c \
OPTYap/or.memory.c OPTYap/opt.init.c \
OPTYap/opt.preds.c OPTYap/or.copy_engine.c \
OPTYap/or.cow_engine.c OPTYap/or.sba_engine.c \
OPTYap/or.thread_engine.c \
OPTYap/or.scheduler.c OPTYap/or.cut.c \
OPTYap/tab.tries.c OPTYap/tab.completion.c \
C/cut_c.c \
library/dialect/swi/fli/swi.c \
library/dialect/swi/fli/blobs.c \
# library/mpi/mpi.c library/mpi/mpe.c \
# library/lammpi/yap_mpi.c library/lamm1pi/hash.c library/lammpi/prologterms2c.c
PLCONS_SOURCES = \
console/LGPL/pl-nt.c \
console/LGPL/pl-ntcon.c \
console/LGPL/pl-ntconsole.c \
console/LGPL/pl-ntmain.c \
console/LGPL/yap.rc \
console/LGPL/manifest.xml
PL_SOURCES= \
pl/arith.yap \
pl/arithpreds.yap \
pl/arrays.yap \
pl/attributes.yap \
pl/atoms.yap \
pl/boot.yap \
pl/callcount.yap\
pl/checker.yap pl/chtypes.yap \
pl/consult.yap \
pl/control.yap \
pl/corout.yap pl/debug.yap \
pl/dbload.yap \
pl/depth_bound.yap \
pl/dialect.yap \
pl/directives.yap \
pl/eam.yap \
pl/eval.yap \
pl/errors.yap \
pl/flags.yap \
pl/grammar.yap \
pl/ground.yap \
pl/hacks.yap \
pl/init.yap \
pl/listing.yap \
pl/lists.yap \
pl/messages.yap \
pl/load_foreign.yap \
pl/modules.yap \
pl/os.yap \
pl/preddecls.yap \
pl/preds.yap \
pl/profile.yap \
pl/protect.yap \
pl/qly.yap \
pl/save.yap \
pl/setof.yap \
pl/signals.yap \
pl/sort.yap \
pl/statistics.yap \
pl/strict_iso.yap \
pl/tabling.yap pl/threads.yap \
pl/udi.yap \
pl/utils.yap \
pl/history.pl \
pl/swi.yap \
pl/yapor.yap pl/yio.yap
# need these files to construct the initial saved state.
SWI_LIB_SOURCES= \
swi/library/menu.pl \
swi/library/predopts.pl
YAPDOCS=docs/yap.tex docs/chr.tex \
docs/clpr.tex 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 yapi.o $(LIB_OBJECTS)
PLCONS_OBJECTS = \
pl-ntcon.o \
pl-ntconsole.o \
pl-ntmain.o \
yapres.o
all: startup.yss @WINDOWS@ yap-win@EXEC_SUFFIX@
Makefile: Makefile.in
H/Yap.h: config.h YapTermConfig.h \
H/YapTags.h \
H/YapCompoundTerm.h
$(OBJECTS): config.h
yap.o: console/yap.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include $< -o $@
#special rule for this one: we cannot use -fomit-frame-pointer because this will
# interface with the outside world.
c_interface.o: C/c_interface.c include/c_interface.h config.h
$(CC) $(C_INTERF_FLAGS) -c $< -o c_interface.o
yap-args.o: C/yap-args.c include/c_interface.h config.h
$(CC) $(C_INTERF_FLAGS) -c $< -o yap-args.o
clause_list.o: C/clause_list.c include/clause_list.h config.h
$(CC) $(C_INTERF_FLAGS) -c $< -o clause_list.o
udi.o: C/udi.c config.h
$(CC) -c $(C_INTERF_FLAGS) $< -o $@
save.o: C/save.c
$(CC) -c $(C_INTERF_FLAGS) -DYAPSTARTUP=\"$(YAPSTARTUP)\" $< -o $@
%.o: C/%.c config.h
$(CC) -c $(CFLAGS) $< -o $@
%.o: OPTYap/%.c config.h
$(CC) -c $(CFLAGS) $< -o $@
%.o: BEAM/%.c config.h
$(CC) -c $(CFLAGS) $< -o $@
yapi.o: CXX/yapi.cpp CXX/yapi.hh config.h
$(CXX) -c $(CXXFLAGS) $< -o $@
sys.o: library/system/sys.c config.h
$(CC) -c $(CFPLAGS) -I$(srcdir)/include -I. $< -o $@
yap_random.o: library/random/yap_random.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include $< -o $@
%.o: library/regex/%.c @NO_BUILTIN_REGEXP@ library/regex/regex2.h library/regex/engine.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include -Ilibrary/regex $< -o $@
%.o: library/dialect/swi/fli/%.c library/dialect/swi/fli/swi.h include/SWI-Prolog.h os/SWI-Stream.h config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include -Ilibrary/dialect/swi/fli $< -o $@
%.o: os/%.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -Ios @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
pl-ntcon.o: console/LGPL/pl-ntcon.c config.h
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include $< -o $@
pl-ntconsole.o: console/LGPL/pl-ntconsole.c config.h
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir) -I$(srcdir)/include -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
pl-ntmain.o: console/LGPL/pl-ntmain.c config.h
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
yapres.o: console/LGPL/yap.rc console/LGPL/manifest.xml config.h
$(RC) $(RCFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I. -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os -I$(srcdir)/console/LGPL @EXTRA_INCLUDES_FOR_WIN32@ -i $< -o $@
uxnt.o: os/windows/uxnt.c config.h
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -Ios @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
# libtai rule
%.o : os/libtai/%.c config.h
$(CC) -c $(CFLAGS) $< -o $@
## CPP'ed files (for macro debugging)
%.i : C/%.c
$(CC) -E $< $(CFLAGS) > $@
absmi.i: C/absmi.c
$(CC) -E $(CFLAGS) $(ABSMI_FLAGS) C/absmi.c > $@
c_interface.i: C/c_interface.c include/c_interface.h
$(CC) -E $(C_INTERF_FLAGS) C/c_interface.c > $@
#
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_CLIB@ \
@PKG_CHR@ \
@PKG_JPL@ \
@PKG_LIBARCHIVE@ \
@PKG_ODBC@ \
@PKG_PLUNIT@ \
@PKG_REAL@ \
@PKG_RDF@ \
@PKG_SEMWEB@ \
@PKG_SGML@ \
@PKG_SWIG@ \
@PKG_WINCONSOLE@ \
@PKG_ZLIB@
PACKAGES= \
library \
swi/library \
swi/library/clp \
$(INSTALLED_PACKAGES)
all: startup.yss
for p in $(PACKAGES); do \
echo " ============== " $$p; \
if [ -r $$p/Makefile ]; then $(MAKE) -C $$p || exit 1; fi; \
done
@STARTUP_DEFAULT@startup.yss: yap@EXEC_SUFFIX@ $(PL_SOURCES) $(SWI_LIB_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@ libYap.a
$(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@
$(MAKE) -C swi/console
$(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win@EXEC_SUFFIX@ $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) -lgdi32 @MPILDF@
libYap.a: $(LIB_OBJECTS) yapi.o
-rm -f libYap.a
$(AR) rc libYap.a $(LIB_OBJECTS) yapi.o
$(RANLIB) libYap.a
@DYNYAPLIB@: $(LIB_OBJECTS)
@SHLIB_LD@ -o $@ $(LIB_OBJECTS) $(LIBS) $(LDFLAGS) $(SONAMEFLAG)
for p in $(EXTRAYAPLIBS); do \
$(LN_S) -f @DYNYAPLIB@ $$p; \
done
@STARTUP_ANDROID@startup.yss: yap@EXEC_SUFFIX@ @DYNYAPLIB@ $(PL_SOURCES) $(SWI_LIB_SOURCES)
adb shell rm -rf /data/yap
adb shell mkdir -p /data/yap
adb shell mkdir -p /data/yap/pl
adb shell mkdir -p /data/yap/swi/library
adb push yap /data/yap/
adb push @DYNYAPLIB@ /data/yap/
for p in $(EXTRAYAPLIBS); do \
adb shell $(LN_S) /data/yap/@DYNYAPLIB@ /data/yap/$$p; \
done
adb push $(GMPDIR)/lib/libgmp.so /data/yap
adb push $(srcdir)/swi/library /data/yap/swi/library
adb push $(srcdir)/pl /data/yap/pl/
adb shell "echo \"bootstrap('/data/yap/pl/init.yap'). module(user). qsave_program('/data/yap/startup.yss').\" | LD_LIBRARY_PATH=/data/yap /data/yap/yap@EXEC_SUFFIX@ -b /data/yap/pl/boot.yap"
adb pull /data/yap/startup.yss
adb shell rm -rf /data/yap
install: @INSTALL_COMMAND@ install_startup install_common
install_unix: @YAPLIB@ yap@EXEC_SUFFIX@
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(YAPLIBDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/icons
$(INSTALL_PROGRAM) -m 755 yap@EXEC_SUFFIX@ $(DESTDIR)$(BINDIR)/yap
$(INSTALL_DATA) -m 755 @YAPLIB@ $(DESTDIR)$(LIBDIR)
install_startup: startup.yss
$(INSTALL_DATA) startup.yss $(DESTDIR)$(YAPLIBDIR)/startup.yss
install_win32: startup.yss @WINDOWS@ yap-win@EXEC_SUFFIX@
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(YAPLIBDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/icons
$(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 yap.exe $(DESTDIR)$(BINDIR)/yap.exe
@WINDOWS@ for i in *.dll; do $(INSTALL_PROGRAM) -m 755 $$i $(DESTDIR)$(BINDIR)/; done
$(INSTALL_DATA) $(srcdir)/misc/icons/yap.ico $(DESTDIR)$(SHAREDIR)/Yap/icons/yap.ico
install_common: install_startup
mkdir -p $(DESTDIR)$(YAPLIBDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
mkdir -p $(DESTDIR)$(SHAREDIR)/PrologCommons
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl
mkdir -p $(DESTDIR)$(DOCSDIR)
mkdir -p $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(INCLUDEDIR)/src
for p in $(EXTRAYAPLIBS); do \
$(LN_S) -f $(DESTDIR)$(LIBDIR)/@YAPLIB@ $(DESTDIR)$(LIBDIR)/$$p; \
done
$(INSTALL) $(srcdir)/Artistic $(DESTDIR)$(DOCSDIR)
$(INSTALL) $(srcdir)/README.TXT $(DESTDIR)$(DOCSDIR)
$(INSTALL) $(srcdir)/COPYING $(DESTDIR)$(DOCSDIR)
for f in $(PL_SOURCES); do $(INSTALL) $(srcdir)/$$f $(DESTDIR)$(SHAREDIR)/Yap/pl; done
for h in $(INTERFACE_HEADERS); do $(INSTALL) $(srcdir)/$$h $(DESTDIR)$(INCLUDEDIR); done
for h in $(HEADERS); do $(INSTALL) $(srcdir)/$$h $(DESTDIR)$(INCLUDEDIR)/src; done
$(INSTALL) config.h $(DESTDIR)$(INCLUDEDIR)/src/config.h
$(INSTALL) YapTermConfig.h $(DESTDIR)$(INCLUDEDIR)
for p in $(PACKAGES); do \
echo " ============== INSTALLING" $$p; \
if [ -r $$p/Makefile ]; then $(MAKE) -C $$p install || exit 1; fi; \
done
install_library: @YAPLIB@
mkdir -p $(DESTDIR)$(INCLUDEDIR)
for h in $(HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
##########
FULL_PATH_C_SOURCES=$(addprefix $(srcdir)/, $(C_SOURCES) )
FULL_PATH_PL_SOURCES=$(addprefix $(srcdir)/, $(PL_SOURCES) )
FULL_PATH_HEADERS=$(addprefix $(srcdir)/, $(HEADERS) )
TAGS: $(C_SOURCES) $(PL_SOURCES) $(HEADERS)
etags $(FULL_PATH_C_SOURCES) $(FULL_PATH_PL_SOURCES) $(FULL_PATH_HEADERS)
for p in $(PACKAGES); do \
echo " ============== INSTALLING" $$p; \
if [ -r $$p/Makefile ]; then $(MAKE) -C $$p TAGS || exit 1; fi; \
done
depend: $(HEADERS) $(C_SOURCES)
-@if test "$(GCC)" = yes; then\
$(CC) -MM $(CFLAGS) -D__YAP_NOT_INSTALLED__=1 -I$(srcdir)/H -I$(srcdir)/include -I$(srcdir)/os -I$(srcdir)/library/dialect/swi/fli -I. $(FULL_PATH_C_SOURCES) >> Makefile;\
else\
makedepend -f - -- $(CFLAGS) -Iinclude -- $(C_SOURCES) |\
sed 's|.*/\([^:]*\):|\1:|' >> Makefile ;\
fi
clean: clean_docs clean_local
for f in $(PACKAGES); do ( $(MAKE) -C $$f clean ); done
clean_local:
rm -f *.o *~ *.BAK *.a
distclean: distclean_docs clean_local
for p in $(PACKAGES); do \
echo " ============== DISTCLEAN " $$p; \
if [ -r $$p/Makefile ]; then $(MAKE) -C $$p distclean || exit 1; fi; \
done
rm -f yap* 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 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 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: doxygen
$(MAKE) pdf
$(MAKE) html
$(INSTALL_DATA) html $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) pdf $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) README.TXT $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) Artistic $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) COPYING $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) changes4.3.html $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) changes-5.0.html $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) changes-5.1.html $(DESTDIR)$(DOCSDIR)
$(INSTALL_DATA) changes-6.0.html $(DESTDIR)$(DOCSDIR)
doxygen:
doxygen $(srcdir)/docs/doxygen.rc
info: yap.info
yap.info: docs/yap.tex
$(MAKEINFO) $<
html: yap.html
yap.html: docs/yap.tex
$(TEXI2HTML) $<
dvi: yap.dvi
yap.dvi: docs/yap.tex
$(TEXI2DVI) $<
ps: yap.ps
yap.ps: docs/yap.tex
dvips -o yap.ps $<
pdf: yap.pdf
yap.pdf: docs/yap.tex
$(TEXI2PDF) $<
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:
$(MAKE) -C packages/cplint installcheck
# DO NOT DELETE THIS LINE -- make depend depends on it.