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/clib/Makefile.in

276 lines
7.0 KiB
Makefile
Raw Normal View History

2010-06-17 00:40:25 +01:00
################################################################
# Makefile template for SWI-Prolog CLIB package
#
# This template is used by configure to create Makefile. See
# the file INSTALL for further installation instructions.
#
# License: LGPL
#
# Author: Jan Wielemaker (wielemak@science.uva.nl)
################################################################
.SUFFIXES: .tex .dvi .doc .pl
ifeq (@PROLOG_SYSTEM@,yap)
prefix = @prefix@
exec_prefix = @exec_prefix@
ROOTDIR = $(prefix)
EROOTDIR = @exec_prefix@
abs_top_builddir = @abs_top_builddir@
srcdir=@srcdir@
BINDIR = $(EROOTDIR)/bin
LIBDIR=@libdir@
YAPLIBDIR=@libdir@/Yap
SHAREDIR=$(ROOTDIR)/share/Yap
SHELL=@SHELL@
PL=@INSTALL_ENV@ $(DESTDIR)$(BINDIR)/yap $(DESTDIR)$(YAPLIBDIR)/startup.yss
LN_S=@LN_S@
#
#
2010-10-24 20:28:37 +01:00
DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1
2010-06-17 00:40:25 +01:00
CC=@CC@
2010-10-24 20:28:37 +01:00
CFLAGS= @SHLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../.. -I$(srcdir)/../../include -I. -I$(srcdir)/maildrop/rfc2045 -I$(srcdir)/maildrop/rfc822 @CPPFLAGS@
2010-06-17 00:40:25 +01:00
MKINDEX=true
2010-06-18 10:38:11 +01:00
NETLIBS=@CLIB_NETLIBS@
CRYPTLIBS=@CLIB_CRYPTLIBS@
2010-12-03 12:12:15 +00:00
PTHREADLIBS=@CLIB_PTHREADS@
2010-06-17 00:40:25 +01:00
2010-07-20 22:54:51 +01:00
LD=@DO_SECOND_LD@ @SHLIB_LD@
2010-12-31 04:14:45 +00:00
LDFLAGS=@EXTRA_LIBS_FOR_SWIDLLS@ @LDFLAGS@
2010-06-17 00:40:25 +01:00
BINTARGET=$(DESTDIR)$(YAPLIBDIR)
PLTARGET=$(DESTDIR)$(SHAREDIR)
FINAL_BINTARGET=$(YAPLIBDIR)
FINAL_PLTARGET=$(SHAREDIR)
%.o: $(srcdir)/%.c
$(CC) -c $(CFLAGS) $< -o $@
sha1/%.o: $(srcdir)/sha1/%.c
$(CC) -c $(CFLAGS) $< -o $@
else # SWI
PL=@PL@
PLBASE=@PLBASE@
PLARCH=@PLARCH@
PLINCL=@PLINCL@
PKGDOC=$(PLBASE)/doc/packages
PCEHOME=../xpce
CC=@CC@
COFLAGS=@COFLAGS@
CWFLAGS=@CWFLAGS@
CMFLAGS=@CMFLAGS@
CIFLAGS=-I. -Imaildrop/rfc2045 -Imaildrop/rfc822
CFLAGS=$(COFLAGS) $(CWFLAGS) $(CMFLAGS) $(CIFLAGS) @DEFS@
LIBS=@LIBS@
NETLIBS=@NETLIBS@
CRYPTLIBS=@CRYPTLIBS@
PUBLICPL=swipl
DOCTOTEX=$(PCEHOME)/bin/doc2tex
PLTOTEX=$(PUBLICPL) -q -s pltotex.pl -g pltotex --
DOC=clib
TEX=$(DOC).tex process.tex uri.tex
DVI=$(DOC).dvi
PDF=$(DOC).pdf
RUNTEX=../../man/runtex
LD=@LD@
LDFLAGS=@LDSOFLAGS@
BINTARGET=$(DESTDIR)$(PLBASE)/lib/$(PLARCH)
PLTARGET=$(DESTDIR)$(PLBASE)/library
FINAL_BINTARGET=$(PLBASE)/lib/$(PLARCH)
FINAL_PLTARGET=$(PLBASE)/library
endif #YAP/SWI
MIMELIBS=maildrop/rfc2045/librfc2045.a maildrop/rfc822/librfc822.a
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
2010-06-23 11:52:23 +01:00
LIBPL= @CLIB_PLTARGETS@ $(srcdir)/streaminfo.pl $(srcdir)/process.pl \
2010-06-17 00:40:25 +01:00
$(srcdir)/prolog_server.pl $(srcdir)/sha.pl \
$(srcdir)/socket.pl \
$(srcdir)/uri.pl
2010-06-18 10:38:11 +01:00
TARGETS= @CLIB_TARGETS@ readutil.@SO@ streaminfo.@SO@ process.@SO@ \
sha4pl.@SO@ uri.@SO@
2010-06-17 00:40:25 +01:00
UNXOBJ= error.o unix.o
SOCKOBJ= error.o socket.o nonblockio.o
CGIOBJ= error.o form.o cgi.o
2010-07-20 23:31:15 +01:00
CRYPTOBJ= error.o crypt.o md5.o md5passwd.o @ENABLE_WINCONSOLE@ bsd-crypt.o
2010-06-17 00:40:25 +01:00
MEMOBJ= error.o memfile.o
MIMEOBJ= error.o mime.o
TIMEOBJ= error.o time.o
FILESOBJ= error.o files.o
RLIMITOBJ= error.o rlimit.o
URIOBJ= uri.o
RANDOMOBJ= random.o
READUTILOBJ= readutil.o
PROCESSOBJ= error.o process.o
STREAMINFOOBJ= error.o streaminfo.o
SHAOBJ= error.o sha4pl.o sha1/sha1.o sha1/sha2.o \
sha1/hmac_sha1.o sha1/hmac_sha256.o
all: $(TARGETS)
random.@SO@: $(RANDOMOBJ)
$(LD) $(LDFLAGS) -o $@ $(RANDOMOBJ)
unix.@SO@: $(UNXOBJ)
$(LD) $(LDFLAGS) -o $@ $(UNXOBJ)
socket.@SO@: $(SOCKOBJ)
2010-12-03 12:12:15 +00:00
$(LD) $(LDFLAGS) -o $@ $(SOCKOBJ) $(NETLIBS) $(PTHREADLIBS)
2010-06-17 00:40:25 +01:00
cgi.@SO@: $(CGIOBJ)
2010-12-03 12:12:15 +00:00
$(LD) $(LDFLAGS) -o $@ $(CGIOBJ) $(PTHREADLIBS)
2010-06-17 00:40:25 +01:00
crypt.@SO@: $(CRYPTOBJ)
2010-12-03 12:12:15 +00:00
$(LD) $(LDFLAGS) -o $@ $(CRYPTOBJ) $(CRYPTLIBS) $(PTHREADLIBS)
2010-06-17 00:40:25 +01:00
memfile.@SO@: $(MEMOBJ)
$(LD) $(LDFLAGS) -o $@ $(MEMOBJ) $(LIBS)
mime.@SO@: $(MIMEOBJ) $(MIMELIBS)
$(LD) $(LDFLAGS) -o $@ $(MIMEOBJ) $(MIMELIBS)
time.@SO@: $(TIMEOBJ)
2010-12-03 12:12:15 +00:00
$(LD) $(LDFLAGS) -o $@ $(TIMEOBJ) $(LIBS) $(PTHREADLIBS)
2010-06-17 00:40:25 +01:00
files.@SO@: $(FILESOBJ)
$(LD) $(LDFLAGS) -o $@ $(FILESOBJ) $(LIBS)
rlimit.@SO@: $(RLIMITOBJ)
$(LD) $(LDFLAGS) -o $@ $(RLIMITOBJ) $(LIBS)
readutil.@SO@: $(READUTILOBJ)
$(LD) $(LDFLAGS) -o $@ $(READUTILOBJ)
process.@SO@: $(PROCESSOBJ)
$(LD) $(LDFLAGS) -o $@ $(PROCESSOBJ)
streaminfo.@SO@: $(STREAMINFOOBJ)
$(LD) $(LDFLAGS) -o $@ $(STREAMINFOOBJ)
sha4pl.@SO@: $(SHAOBJ)
$(LD) $(LDFLAGS) -o $@ $(SHAOBJ)
uri.@SO@: $(URIOBJ)
2010-12-03 12:12:15 +00:00
$(LD) $(LDFLAGS) -o $@ $(URIOBJ) $(PTHREADLIBS)
2010-06-17 00:40:25 +01:00
socket.o: $(srcdir)/socket.c $(srcdir)/sockcommon.c
sha1/hmac_sha1.o:
$(CC) -c $(CFLAGS) -DUSE_SHA1 -o $@ $(srcdir)/sha1/hmac.c
sha1/hmac_sha256.o:
$(CC) -c $(CFLAGS) -DUSE_SHA256 -o $@ $(srcdir)/sha1/hmac.c
maildrop/rfc822/librfc822.a:
(cd maildrop/rfc822 && $(MAKE))
maildrop/rfc2045/librfc2045.a:
(cd maildrop/rfc2045 && $(MAKE))
install: $(TARGETS) $(LIBPL)
mkdir -p $(BINTARGET)
for f in $(TARGETS); do \
$(INSTALL_PROGRAM) $$f $(BINTARGET); \
done
mkdir -p $(PLTARGET)
for f in $(LIBPL); do \
$(INSTALL_DATA) $$f $(PLTARGET); \
done
$(PL) -f none -g make -t halt
ln-install::
@$(MAKE) INSTALL_DATA='../ln-install' INSTALL_PROGRAM='../ln-install' install
rpm-install: install
html-install::
mkdir -p $(DESTDIR)$(PKGDOC)
$(INSTALL) -m 644 clib.html $(DESTDIR)$(PKGDOC)
pdf-install::
mkdir -p $(DESTDIR)$(PKGDOC)
$(INSTALL) -m 644 clib.pdf $(DESTDIR)$(PKGDOC)
uninstall::
(cd $(FINAL_BINTARGET) && rm -f $(TARGETS))
(cd $(FINAL_PLTARGET) && rm -f $(LIBPL))
$(PL) -f none -g make -t halt
################################################################
# Testing
################################################################
check: check-socket check-memfile check-unit check-process \
check-read check-uri check-cgi
torture: torture-socket
check-socket::
$(PL) -q -f $(srcdir)/test_socket.pl -F none -g test_socket,halt -t 'halt(1)'
torture-socket::
$(PL) -q -f $(srcdir)/stresssocket.pl -F none -g test,halt -t 'halt(1)'
check-memfile::
$(PL) -q -f $(srcdir)/test_memfile.pl -F none -g test_memfile,halt -t 'halt(1)'
check-unit::
$(PL) -q -f $(srcdir)/test.pl -g run_tests,halt -t 'halt(1)'
check-uri::
$(PL) -q -f $(srcdir)/test_uri.pl -g true -t test_uri
check-cgi::
$(PL) -q -f $(srcdir)/test_cgi.pl -g true -t test_cgi
check-process::
$(PL) -q -f $(srcdir)/test_process.pl -g true -t test_process
check-read::
$(PL) -q -f $(srcdir)/test_readutil.pl -g true -t test_readutil
################################################################
# Documentation
################################################################
pdf: $(PDF)
$(DVI): $(TEX)
$(RUNTEX) $(DOC)
$(PDF): $(TEX)
$(RUNTEX) --pdf $(DOC)
html: $(TEX)
latex2html $(DOC)
mv html/index.html clib.html
rm -r html
$(TEX): $(DOCTOTEX)
uri.tex: uri.pl
$(PLTOTEX) 'library(uri)'
process.tex: process.pl
$(PLTOTEX) 'library(process)'
.doc.tex:
$(DOCTOTEX) $*.doc > $*.tex
################################################################
# Clean
################################################################
clean:
rm -f $(OBJ) *~ *.o *% a.out core config.log sha1/*.o
rm -f $(TEX)
-(cd maildrop/rfc822 && $(MAKE) clean)
-(cd maildrop/rfc2045 && $(MAKE) clean)
distclean: clean
rm -f $(TARGETS) config.cache config.h config.status Makefile
rm -f clib.aux clib.log clib.out clib.toc
rm -rf html
-(cd maildrop/rfc822 && $(MAKE) distclean)
-(cd maildrop/rfc2045 && $(MAKE) distclean)