Updated makefiles to work with YC automatically.
[idzebra-moved-to-github.git] / Makefile.in
1 # Copyright (C) 1994-1998, Index Data
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile.in,v 1.2 1998-10-28 15:20:40 adam Exp $
5
6 SHELL=/bin/sh
7 MAKE=make
8 RANLIB=@RANLIB@
9 CC=@CC@
10 CPP=@CPP@
11 CDEFS=@DEFS@ @ODEFS@
12
13 # Where are Yaz libraries located?
14 YAZLIB=../../yaz/lib/libyaz.a
15 # Where are Yaz header files located?
16 YAZINC=-I../../yaz/z39.50 -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
20 # Some systems have seperate socket libraries
21 LIBS=@LIBS@
22
23 SUBDIR=util bfile dfa dict isamc isam rset recctrl index
24
25 all:
26         for i in $(SUBDIR); do cd $$i; if $(MAKE) OSILIB="$(OSILIB)" YAZLIB="$(YAZLIB)" YAZINC="$(YAZINC)" RANLIB="$(RANLIB)" CDEFS="$(CDEFS)" LIBS="$(LIBS)" CFLAGS="$(CFLAGS)" CC="$(CC)"; then cd ..; else exit 1; fi; done
27
28 dep depend:
29         for i in $(SUBDIR); do cd $$i; if $(MAKE) CPP="$(CPP)" CDEFS="$(CDEFS)" YAZINC="$(YAZINC)" depend; then cd ..; else exit 1; fi; done
30
31 clean:
32         for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done
33         rm -f lib/*.a
34
35 cleanup:
36         rm -f `find $(SUBDIR) -name "*.[oa]" -print`
37         rm -f `find $(SUBDIR) -name "core" -print`
38         rm -f `find $(SUBDIR) -name "errlist" -print`
39         rm -f `find $(SUBDIR) -name "a.out" -print`
40
41 cleandepend: 
42         for i in $(SUBDIR); do (cd $$i; \
43                 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
44                 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
45
46 wc:
47         wc `find . -name '*.[ch]'`
48