# Top level Makefile for the Email - Z39.50 gateway # Europagate, 1995-1996. # # $Id: Makefile.email,v 1.7 1997/02/19 16:47:03 adam Exp $ # SHELL=/bin/sh MAKE=make #CC=cc CPP=$(CC) -E VERSION=1.1 # 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 # Other libraries needed on some systems #ELIBS=-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 all: for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZINC="$(ZINC)" ZLIB="$(ZLIB)" CPP="$(CPP)" ELIBS="$(ELIBS)" REGEXOBJ="$(REGEXOBJ)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)"; then cd ..; else exit 1; fi; done dep depend: for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZINC="$(ZINC)" CPP="$(CPP)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)" depend; then cd ..; else exit 1; fi; done install: @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 clean: -rm -f lib/*.a for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done distclean: clean cleandepend cleandepend: for i in $(SUBDIR); do (cd $$i; \ if sed '/^#Depend/q' Makefile.tmp; then \ mv -f Makefile.tmp Makefile; fi; rm -f .depend); done taildepend: for i in $(SUBDIR); do (cd $$i; \ if sed 's/^if/#GNUif/'Makefile.tmp; then \ mv -f Makefile.tmp Makefile; fi); done gnudepend: for i in $(SUBDIR); do (cd $$i; \ if sed '/^#Depend/q' Makefile.tmp;then \ mv -f Makefile.tmp Makefile; fi); done distribution: echo "Making distribution version $(VERSION). Did you commit?" if [ -d tmp ]; then \ rm -fr tmp; \ fi mkdir tmp; cd tmp; cvs export -f -D now egate cd tmp/egate; mv README.email README cd tmp/egate; mv Makefile.email Makefile cd tmp/egate; mv CHANGELOG.email CHANGELOG cd tmp/egate; rm -fr www cd tmp/egate; rm *.web cd tmp; mv egate email-z39-$(VERSION) cd tmp/email-z39-$(VERSION); make taildepend cd tmp/email-z39-$(VERSION)/doc; rm web.sgml; make egate cd tmp; tar zcf ../email-z39-$(VERSION).tar.gz email-z39-$(VERSION) rm -fr tmp