X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=Makefile;h=1d1217224d852bfc0e6ff9070d49b2852305705e;hb=4938d0c2e8f4e1eec397c2bfbbc7e23fd150c369;hp=cd01bd4010fd54a8d6e6f05317b7a7c1d907b673;hpb=74e5eb155366d2138068acfd2b28f4a1097eb3b9;p=egate.git diff --git a/Makefile b/Makefile index cd01bd4..1d12172 100644 --- a/Makefile +++ b/Makefile @@ -1,34 +1,64 @@ # Top level Makefile for Email gateway. # Europagate, 1994-1995. # -# $Id: Makefile,v 1.16 1995/03/01 14:31:03 adam Exp $ +# $Id: Makefile,v 1.29 1996/02/29 15:33:18 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 +LIBDIR=/usr/local/lib/emailgw # GNU regex package location -#REGEXOBJ=/usr/local/gnu/regex-0.12/regex.o -#REGEXINC=-I/usr/local/gnu/regex-0.12 +#REGEXOBJ=../../../pd-src/regex-0.12/regex.o +#REGEXINC=-I../../../pd-src/regex-0.12 -# For sun-sparc-solaris -#ZPRE=/usr/local/emailgw/src/zdist102b1-1/libz3950 -#ZDEFS=-DHIGH_TO_LOW -Dfar= +# Other libraries libraries needed on some systems #NETLIB=-lnsl -lsocket -# For linux -ZPRE=/home/proj/zdist/zdist102b1-1/libz3950 -ZDEFS=-DLOW_TO_HIGH -Dfar= +# Location of Tcl +TCLLIB=/usr/local/lib/libtcl7.5.a +TCLINC= + +# Location of IrTcl +IRTCLDIR=../../ir-tcl +IRTCLLIB=$(IRTCLDIR)/libirtcl.a +IRTCLINC=-I$(IRTCLDIR) + +# 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= + +SUBDIR=res+log util ccl fml $(ZACC) kernel www all: - for i in $(SUBDIR); do cd $$i; if $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" ZPRE="$(ZPRE)" CPP="$(CPP)" NETLIB="$(NETLIB)" REGEXOBJ="$(REGEXOBJ)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)"; 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)" NETLIB="$(NETLIB)" REGEXOBJ="$(REGEXOBJ)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)" TCLLIB="$(TCLLIB)" TCLINC="$(TCLINC)" IRTCLLIB="$(IRTCLLIB)" IRTCLINC="$(IRTCLINC)"; 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)" REGEXINC="$(REGEXINC)" ZDEFS="$(ZDEFS)" 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: + @if [ ! -d $(LIBDIR) ]; then \ + echo "Making directory $(LIBDIR)"; \ + mkdir $(LIBDIR); \ + fi + @cd kernel; for i in eti monitor kernel; do \ + echo "Installing $$i"; \ + cp $$i $(LIBDIR); chmod +x $(LIBDIR)/$$i; \ + done + @cd kernel; for i in *.res *.bib *.fml; do \ + echo "Installing $$i"; \ + cp $$i $(LIBDIR);\ + done + clean: -rm -f lib/*.a for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done @@ -37,26 +67,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]'`