1 # Copyright (C) 1994-1996, Index Data I/S
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.57 1996-12-20 11:06:37 adam Exp $
10 # Where are Yaz libraries located?
11 YAZLIB=../../yaz/lib/libyaz.a
12 # Where are Yaz header files located?
13 YAZINC=-I../../yaz/include
14 # If Yaz is compiled with mosi support uncomment and specify.
15 #OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
17 # Some systems have seperate socket libraries
18 #NETLIB=-lnsl -lsocket
20 SUBDIR=util bfile dfa dict isamc isam rset recctrl index
23 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
26 for i in $(SUBDIR); do cd $$i; if $(MAKE) YAZINC="$(YAZINC)" depend; then cd ..; else exit 1; fi; done
29 for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done
33 rm -f `find $(SUBDIR) -name "*.[oa]" -print`
34 rm -f `find $(SUBDIR) -name "core" -print`
35 rm -f `find $(SUBDIR) -name "errlist" -print`
36 rm -f `find $(SUBDIR) -name "a.out" -print`
39 for i in $(SUBDIR); do (cd $$i; \
40 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
41 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
44 for i in $(SUBDIR); do (cd $$i; \
45 if sed 's/^if/#if/' <Makefile|sed 's/^include/#include/'| \
46 sed 's/^endif/#endif/' | \
47 sed 's/^depend: depend2/depend: depend1/g' | \
48 sed '/^#Depend/q' >Makefile.tmp; then \
49 mv -f Makefile.tmp Makefile; fi); done
52 for i in $(SUBDIR); do (cd $$i; \
53 if sed '/^#Depend/q' <Makefile| \
54 sed 's/^#if/if/' |sed 's/^#include/include/'| \
55 sed 's/^#endif/endif/' | \
56 sed 's/^depend: depend1/depend: depend2/g' >Makefile.tmp;then \
57 mv -f Makefile.tmp Makefile; fi); done
60 wc `find . -name '*.[ch]'`