81 lines
1.9 KiB
Makefile
81 lines
1.9 KiB
Makefile
#
|
|
# default base directory for YAP installation
|
|
# (EROOT for architecture-dependent files)
|
|
#
|
|
#
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
ROOTDIR = $(prefix)
|
|
EROOTDIR = @exec_prefix@
|
|
abs_top_builddir = @abs_top_builddir@
|
|
#
|
|
# where the binary should be
|
|
#
|
|
BINDIR = $(EROOTDIR)/bin
|
|
#
|
|
# where YAP should look for libraries
|
|
#
|
|
LIBDIR=@libdir@
|
|
YAPLIBDIR=@libdir@/Yap
|
|
#
|
|
#
|
|
CC=@CC@
|
|
MPI_CC=@MPI_CC@
|
|
CFLAGS= @SHLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../.. -I$(srcdir)/../../include
|
|
#
|
|
#
|
|
# 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@
|
|
SO=@SO@
|
|
CWD=$(PWD)
|
|
MPILDF=@MPILDF@
|
|
MPICF=@MPICF@
|
|
#
|
|
|
|
OBJS=yap_mpi.o hash.o prologterms2c.o
|
|
SOBJS=yap_mpi.@SO@
|
|
|
|
#in some systems we just create a single object, in others we need to
|
|
# create a libray
|
|
|
|
all: $(SOBJS)
|
|
|
|
yap_mpi.o: $(srcdir)/yap_mpi.c
|
|
$(MPI_CC) $(CFLAGS) $(MPICF) -c $(srcdir)/yap_mpi.c -o yap_mpi.o
|
|
|
|
prologterms2c.o: $(srcdir)/prologterms2c.c $(srcdir)/prologterms2c.h
|
|
$(MPI_CC) -c $(CFLAGS) $(srcdir)/prologterms2c.c -o prologterms2c.o
|
|
|
|
hash.o: $(srcdir)/hash.c $(srcdir)/hash.h
|
|
$(MPI_CC) -c $(CFLAGS) $(srcdir)/hash.c -o hash.o
|
|
|
|
@DO_SECOND_LD@yap_mpi.@SO@: $(OBJS)
|
|
@DO_SECOND_LD@ @SHLIB_LD@ $(LDFLAGS) -o yap_mpi.@SO@ $(OBJS) $(MPILDF) @EXTRA_LIBS_FOR_DLLS@
|
|
|
|
install: all install-examples
|
|
if test x"$(SOBJS)" != "x"; then $(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR); fi
|
|
|
|
clean:
|
|
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
|
|
|
no:
|
|
@echo "YAP LAM/MPI module not compiled."
|
|
|
|
install-examples:
|
|
|
|
distclean: clean
|
|
rm -f Makefile
|
|
|
|
FULL_PATH_C_SOURCES= $(srcdir)/yap_mpi.c $(srcdir)/prologterms2c.c $(srcdir)/hash.c
|
|
FULL_PATH_PL_SOURCES=
|
|
FULL_PATH_HEADERS=$(srcdir)/hash.h $(srcdir)/prologterms2c.h
|
|
|
|
TAGS: $(C_SOURCES) $(PL_SOURCES) $(HEADERS)
|
|
etags --append ../../TAGS $(FULL_PATH_C_SOURCES) $(FULL_PATH_PL_SOURCES) $(FULL_PATH_HEADERS)
|