1 # Copyright (C) 1994-1995, Index Data I/S
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.44 1996-01-08 09:07:51 adam Exp $
11 # Where are Yaz libraries located?
12 #YAZLIB=../../yaz/lib/libyaz.a
13 #YAZLIB=/usr/local/lib/libyazchkr.a
15 # Where are Yaz header files located?
16 #YAZINC=-I../../yaz/include
17 # If Yaz is compiled with mosi support uncomment and specify.
18 #OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
19 OSILIB=../../xtimosi/src/libmosi.a -lrfc
21 # Some systems have seperate socket libraries
22 #NETLIB=-lnsl -lsocket
24 SUBDIR=util str bfile dfa dict isam rset index
27 for i in $(SUBDIR); do cd $$i; if $(MAKE) OSILIB="$(OSILIB)" YAZLIB="$(YAZLIB)" YAZINC="$(YAZINC)" RANLIB="$(RANLIB)" NETLIB="$(NETLIB)" CFLAGS="$(CFLAGS)" CC="$(CC)"; then cd ..; else exit 1; fi; done
30 for i in $(SUBDIR); do cd $$i; if $(MAKE) YAZINC="$(YAZINC)" depend; then cd ..; else exit 1; fi; done
33 for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done
37 rm -f `find $(SUBDIR) -name "*.[oa]" -print`
38 rm -f `find $(SUBDIR) -name "core" -print`
39 rm -f `find $(SUBDIR) -name "errlist" -print`
40 rm -f `find $(SUBDIR) -name "a.out" -print`
43 for i in $(SUBDIR); do (cd $$i; \
44 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
45 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
48 for i in $(SUBDIR); do (cd $$i; \
49 if sed 's/^if/#if/' <Makefile|sed 's/^include/#include/'| \
50 sed 's/^endif/#endif/' | \
51 sed 's/^depend: depend2/depend: depend1/g' | \
52 sed '/^#Depend/q' >Makefile.tmp; then \
53 mv -f Makefile.tmp Makefile; fi); done
56 for i in $(SUBDIR); do (cd $$i; \
57 if sed '/^#Depend/q' <Makefile| \
58 sed 's/^#if/if/' |sed 's/^#include/include/'| \
59 sed 's/^#endif/endif/' | \
60 sed 's/^depend: depend1/depend: depend2/g' >Makefile.tmp;then \
61 mv -f Makefile.tmp Makefile; fi); done
64 echo "Making distribution version $(VERSION). Did you commit?"
68 mkdir tmp; cd tmp; cvs export -f -D now zebra
69 cd tmp/zebra/doc; make all
70 cd tmp; mv zebra zebra-$(VERSION)
71 cd tmp; tar zcf ../zebra-$(VERSION).tar.gz zebra-$(VERSION)
75 wc `find . -name '*.[ch]'`