1 # Copyright (C) 1995-1999, Index Data
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile.in,v 1.12 1999-06-09 09:43:31 adam Exp $
6 # Uncomment the lines below to enable mOSI communcation.
9 #LIBMOSI=../../xtimosi/src/libmosi.a ../lib/librfc.a
14 # Standard include path and original protocol encoders.
15 INCLUDE=-I. -I../include
17 # The Module below is either asn (the original de/en-coders)
18 # or z39.50 (the compiled de/en-coders).
25 SUBDIR=util odr $(MOD) zutil $(RFC1006) ccl comstack client server ztest retrieval lib
26 # Add external libraries to the LIBS macro
31 # Installation directories, etc.
34 exec_prefix=@exec_prefix@
36 BINDIR=$(exec_prefix)/bin
37 # Public libraries and header files
38 LIBDIR=$(exec_prefix)/lib
39 INCDIR=$(prefix)/include
41 YAZDIR=$(prefix)/lib/yaz
44 for i in $(SUBDIR); do cd $$i; if $(MAKE) CC="$(CC)" \
45 RANLIB="$(RANLIB)" LIBS="$(LIBS)" \
46 INCLUDE="$(INCLUDE)" CFLAGS="$(CFLAGS)" \
48 LIBMOSI="$(LIBMOSI)" XMOSI="$(XMOSI)";\
49 then cd ..; else exit 1; fi; done
52 for i in $(SUBDIR); do cd $$i; if $(MAKE) CPP="$(CPP)" \
53 INCLUDE="$(INCLUDE)" CDEFS="$(CDEFS)" depend; \
54 then cd ..; else exit 1; fi; done
57 for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done
60 for i in $(SUBDIR); do (cd $$i; rm -f *.o); done
61 mv lib/libyaz.a .; rm -f lib/*.a; mv libyaz.a lib
62 cd client; strip client
66 rm -f `find $(SUBDIR) -name "*.[oa]" -print`
67 rm -f `find $(SUBDIR) -name "core" -print`
68 rm -f `find $(SUBDIR) -name "errlist" -print`
69 rm -f `find $(SUBDIR) -name "a.out" -print`
71 distclean: clean cleandepend
77 for i in $(SUBDIR); do (cd $$i; \
78 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
79 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
81 install: all install.misc install.lib install.bin
84 @if [ ! -d $(BINDIR) ]; then \
85 echo "Making directory $(BINDIR)"; \
88 @echo "Installing client -> $(BINDIR)"; \
89 cp client/client $(BINDIR)/client; chmod 755 $(BINDIR)/client
90 @echo "Installing ztest -> $(BINDIR)"; \
91 cp ztest/ztest $(BINDIR)/ztest; chmod 755 $(BINDIR)/ztest
94 @if [ ! -d $(LIBDIR) ]; then \
95 echo "Making directory $(LIBDIR)"; \
98 @echo "Installing libyaz.a -> $(LIBDIR)"; \
99 cp lib/libyaz.a $(LIBDIR)/libyaz.a; \
100 chmod 644 $(LIBDIR)/libyaz.a
101 @if [ -f lib/librfc.a ]; then \
102 echo "Installing librfc.a -> $(LIBDIR)"; \
103 cp lib/librfc.a $(LIBDIR)/librfc.a; \
104 chmod 644 $(LIBDIR)/librfc.a; \
106 @if [ ! -d $(INCDIR) ]; then \
107 echo "Making directory $(INCDIR)"; \
110 @cd include; for f in *.h; do \
111 echo "Installing $$f -> $(INCDIR)"; \
112 cp $$f $(INCDIR)/$$f; chmod 644 $(INCDIR)/$$f; \
116 @if [ ! -d $(YAZDIR) ]; then \
117 echo "Making directory $(YAZDIR)"; \
120 @cd tab; for f in *; do \
121 if [ -f $$f ]; then \
122 echo "Installing $$f -> $(YAZDIR)"; \
123 cp $$f $(YAZDIR)/$$f; chmod 644 $(YAZDIR)/$$f; \
128 wc `find . -name '*.[ch]'`