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/packages/prosqlite/Makefile

86 lines
2.3 KiB
Makefile
Raw Normal View History

2014-09-13 06:26:46 +01:00
################################################################
# Makefile template for SWI-Prolog PROSQLITE interface
#
# This template is used by configure to create Makefile. See
# the file INSTALL for further installation instructions.
#
# License: LGPL
#
# Author: Nicos Angelopoulos & Jan Wielemaker (jan@swi.psy.uva.nl)
################################################################
2014-07-16 00:56:45 +01:00
2014-09-13 06:26:46 +01:00
PACKAGE=prosqlite
DOC=prosqlite
include ../Makefile.defs
2014-07-16 00:56:45 +01:00
2014-09-13 06:26:46 +01:00
CFLAGS+= -I/usr/include -I.
LDSOFLAGS+= -L/usr/lib
LIBS=-lgmp -lreadline -lncurses -lpthread -lresolv -lnss_dns -lnss_files -lcrypt -lstdc++ -lm -L/u/vitor/lib -ldl -lnsl
NETLIBS=@NETLIBS@
LIBPL= prolog/prosqlite.pl
TARGETS= prosqlite.so
PROSQLITEOBJ= prosqlite.o
all: $(TARGETS)
nolib::
@echo "WARNING: Could not find sqlite library; skipped"
prosqlite.o: $(srcdir)/c/prosqlite.c
$(CC) -c $(CFLAGS) $< -o $@
prosqlite.so: $(PROSQLITEOBJ)
$(LD) $(LDSOFLAGS) -o $@ $(AROBJ) -lsqlite3 -lgmp -lreadline -lncurses -lpthread -lresolv -lnss_dns -lnss_files -lcrypt -lstdc++ -lm -L/u/vitor/lib -ldl -lnsl $(LIBPLSO)
install: $(TARGETS) $(addprefix $(srcdir)/, $(LIBPL)) install-examples
mkdir -p $(DESTDIR)$(SOLIBDIR)
for f in $(TARGETS); do \
[ "$$f" = nolib ] || $(INSTALL_PROGRAM) $$f $(DESTDIR)$(SOLIBDIR); \
done
mkdir -p $(DESTDIR)$(PLLIBDIR)
for f in $(LIBPL); do \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(PLLIBDIR); \
done
$(MKINDEX)
ln-install::
@$(MAKE) INSTALL_DATA='../ln-install' INSTALL_PROGRAM='../ln-install' install
rpm-install: install
html-install::
mkdir -p $(DESTDIR)$(PKGDOCDIR)
$(INSTALL) -m 644 $(DOC).html $(DESTDIR)$(PKGDOCDIR)
pdf-install::
mkdir -p $(DESTDIR)$(PKGDOCDIR)
$(INSTALL) -m 644 $(DOC).pdf $(DESTDIR)$(PKGDOCDIR)
nnuninstall::
(cd $(SOLIBDIR) && rm -f $(TARGETS))
(cd $(PLLIBDIR) && rm -f $(LIBPL))
$(PL) -f none -g make -t halt
################################################################
# Check
################################################################
2014-07-16 00:56:45 +01:00
check::
2014-09-13 06:26:46 +01:00
################################################################
# Clean
################################################################
2014-07-16 00:56:45 +01:00
clean:
2014-09-13 06:26:46 +01:00
rm -f $(AROBJ) *~ *.o *% a.out core config.log
distclean: clean
rm -f $(TARGETS) config.cache config.h config.status Makefile
rm -f $(DOC).aux $(DOC).log $(DOC).out $(DOC).toc
rm -rf autom4te.cache