X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=Makefile;h=e02df89e622714ec1ffc38fd65e98120d65b0aa5;hb=373495ef158d123d95ab44465d4249e65847492b;hp=20b06fa483e657d52f120d0afc8bb2dffc85d95c;hpb=e2ca7150cc23d2ad81d0364544ebf0d94f260722;p=egate.git diff --git a/Makefile b/Makefile index 20b06fa..e02df89 100644 --- a/Makefile +++ b/Makefile @@ -1,76 +1,120 @@ -# Top level Makefile for Email gateway. +# Top level Makefile for the Z39.50 gateway (WWW and email) # Europagate, 1994-1995. # -# $Log: Makefile,v $ -# Revision 1.8 1995/02/16 18:34:06 adam -# Minor changes. -# -# Revision 1.7 1995/02/16 15:01:26 quinn -# Added zlayer -# -# Revision 1.6 1995/02/16 14:47:31 quinn -# Removed CC -# -# Revision 1.5 1995/02/15 17:40:47 adam -# New module kernel. -# -# Revision 1.4 1995/02/13 12:34:56 adam -# New module ccl. -# -# Revision 1.3 1995/02/10 17:21:17 adam -# FML is add as sub Makefile. -# -# Revision 1.2 1995/02/10 16:48:52 adam -# Minor changes. -# -# Revision 1.1.1.1 1995/02/09 17:27:11 adam -# Initial version of email gateway under CVS control. +# $Id: Makefile,v 1.31 1996/05/31 08:02:20 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 + +# 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 -ldl +TCLINC= + +# 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)"; then cd ..; else exit 1; fi; done + 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 + +egw: + 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) 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.egw: + cd www; $(MAKE) HTTPDDIR="$(HTTPDDIR)" CGIDIR="$(CGIDIR)" HTDOCS="$(HTDOCS)" EGWDIR="$(EGWDIR)" GIFDIR="$(GIFDIR)" install clean: - rm -f lib/*.a + -rm -f lib/*.a for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done -cleanup: - rm -f lib `find $(SUBDIR) -name "*.[oa]" -print` - rm -f `find $(SUBDIR) -name "core" -print` - rm -f `find $(SUBDIR) -name "errlist" -print` - rm -f `find $(SUBDIR) -name "a.out" -print` +distclean: clean cleandepend -distclean: cleanup clean +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]'` -