X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=Makefile;h=11a3c94f2577cc7be8abc77193314db7206767ec;hb=7b58e36bc4c5a57dec46408bbfb3707638dd967a;hp=8be66b3abd5c460a5b4e9c945ee4ff1dad9b59f7;hpb=8703dee945d6a3920f52b9d4b85a69b192679fab;p=egate.git diff --git a/Makefile b/Makefile index 8be66b3..11a3c94 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,97 @@ -# Top level Makefile for Email gateway. -# Europagate, 1994-1995. +# Top level Makefile for the Z39.50 gateway (Web and email) +# Europagate, 1995-1996. # -# $Id: Makefile,v 1.14 1995/02/22 21:25:08 adam Exp $ +# $Id: Makefile,v 1.34 1996/06/06 11:10:04 adam Exp $ # SHELL=/bin/sh MAKE=make -SUBDIR=res+log util fml ccl zlayer kernel -CFLAGS=-Wall -g -pedantic -ansi -#CC=gcc +#CC=checkergcc CPP=$(CC) -E -ZPRE=/usr/local/emailgw/src/zdist102b1-1/libz3950 -NETLIB=-lnsl -lsocket + +# Email gateway settings -------------------------------------- + +# Directory for the email gateway files +EMAILLIBDIR=/usr/local/lib/emailgw + +# GNU regex package location +#REGEXOBJ=../../../pd-src/regex-0.12/regex.o +#REGEXINC=-I../../../pd-src/regex-0.12 + +# WWW gateway settings ---------------------------------------- + +# Install directories +HTTPDDIR=/usr/local/etc/httpd +CGIDIR=$(HTTPDDIR)/cgi-bin +HTDOCS=$(HTTPDDIR)/htdocs +EGWDIR=$(HTTPDDIR)/egw +GIFDIR=$(HTDOCS)/egwgif + +# Location of Tcl +TCLLIB=/usr/local/lib/libtcl7.5.a -lm +TCLINC=-I/usr/local/include + +# Location of IrTcl +IRTCLDIR=../ir-tcl +IRTCLLIB=$(IRTCLDIR)/libirtcl.a +IRTCLINC=-I$(IRTCLDIR) + +# Common settings --------------------------------------------- + +# Other libraries libraries needed on some systems +#ELIB=-lnsl -lsocket + +# If you are using YAZ uncomment these lines +ZACC=zlayer-yaz +ZINC=-I../yaz/include +ZLIB=../yaz/lib/libyaz.a +ZDEFS= + +# If you are using Zdist uncomment these lines +#ZACC=zlayer-zdist +#ZINC=-I/home/proj/zdist/zdist102b1-1/libz3950 +#ZLIB=/home/proj/zdist/zdist102b1-1/libz3950/libz3950.a +#ZDEFS=-DLOW_TO_HIGH -Dfar= + +# End of settings --------------------------------------------- +# You probably don't have to edit the things below. + +SUBDIR=res+log util ccl fml $(ZACC) kernel www + +SUBDIREMAIL=res+log util ccl fml $(ZACC) kernel +SUBDIRWWW=res+log util www all: - for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZPRE="$(ZPRE)" CPP="$(CPP)" NETLIB="$(NETLIB)"; then cd ..; else exit 1; fi; done + @echo "Type 'make email' to make email gateway" + @echo "Type 'make web' to make web gateway" + +alll: + for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZINC="$(ZINC)" ZLIB="$(ZLIB)" CPP="$(CPP)" ELIB="$(ELIB)" REGEXOBJ="$(REGEXOBJ)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)" TCLLIB="$(TCLLIB)" TCLINC="$(TCLINC)" IRTCLLIB="$(IRTCLLIB)" IRTCLINC="$(IRTCLINC)" EGWDIR="$(EGWDIR)"; then cd ..; else exit 1; fi; done + +email: + for i in $(SUBDIREMAIL); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZINC="$(ZINC)" ZLIB="$(ZLIB)" CPP="$(CPP)" ELIB="$(ELIB)" REGEXOBJ="$(REGEXOBJ)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)"; then cd ..; else exit 1; fi; done + +web: + for i in $(SUBDIRWWW); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZINC="$(ZINC)" ZLIB="$(ZLIB)" CPP="$(CPP)" ELIB="$(ELIB)" ZDEFS="$(ZDEFS)" TCLLIB="$(TCLLIB)" TCLINC="$(TCLINC)" IRTCLLIB="$(IRTCLLIB)" IRTCLINC="$(IRTCLINC)" EGWDIR="$(EGWDIR)"; then cd ..; else exit 1; fi; done dep depend: - for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZPRE="$(ZPRE)" CPP="$(CPP)" depend; then cd ..; else exit 1; fi; done + for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZINC="$(ZINC)" CPP="$(CPP)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)" TCLINC="$(TCLINC)" IRTCLINC="$(IRTCLINC)" depend; then cd ..; else exit 1; fi; done + +install.email: + @if [ ! -d $(EMAILLIBDIR) ]; then \ + echo "Making directory $(EMAILLIBDIR)"; \ + mkdir $(EMAILLIBDIR); \ + fi + @cd kernel; for i in eti monitor kernel; do \ + echo "Installing $$i"; \ + cp $$i $(EMAILLIBDIR); chmod +x $(EMAILLIBDIR)/$$i; \ + done + @cd kernel; for i in *.res *.bib *.fml; do \ + echo "Installing $$i"; \ + cp $$i $(EMAILLIBDIR);\ + done + +install.web: + cd www; $(MAKE) HTTPDDIR="$(HTTPDDIR)" CGIDIR="$(CGIDIR)" HTDOCS="$(HTDOCS)" EGWDIR="$(EGWDIR)" GIFDIR="$(GIFDIR)" install clean: -rm -f lib/*.a @@ -26,27 +101,24 @@ distclean: clean cleandepend cleandepend: for i in $(SUBDIR); do (cd $$i; \ - mv Makefile Makefile.old; \ - sed '/^#Depend/q' Makefile; \ - rm Makefile.old); done + if sed '/^#Depend/q' Makefile.tmp; then \ + mv -f Makefile.tmp Makefile; fi; rm -f .depend); done -usedepend1: +taildepend: for i in $(SUBDIR); do (cd $$i; \ - mv Makefile Makefile.tmp; \ - sed 's/^if/#if/' Makefile; \ - rm Makefile.tmp); done + if sed 's/^if/#GNUif/'Makefile.tmp; then \ + mv -f Makefile.tmp Makefile; fi); done -usedepend2: +gnudepend: for i in $(SUBDIR); do (cd $$i; \ - mv Makefile Makefile.tmp; \ - sed '/^#Depend/q' Makefile; \ - rm Makefile.tmp); done + if sed '/^#Depend/q' Makefile.tmp;then \ + mv -f Makefile.tmp Makefile; fi); done wc: wc `find . -name '*.[ch]'` -