1 # Copyright (C) 1995-1998, Index Data
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile.in,v 1.5 1998-10-28 15:09:59 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../z39.50 -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=$(MOD) util odr $(RFC1006) ccl comstack retrieval client server ztest 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
63 cd server; strip ztest
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
74 for i in $(SUBDIR); do (cd $$i; \
75 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
76 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
78 install: all install.misc install.lib install.bin
81 @if [ ! -d $(BINDIR) ]; then \
82 echo "Making directory $(BINDIR)"; \
85 @echo "Installing client -> $(BINDIR)"; \
86 cp client/client $(BINDIR)/client; chmod 755 $(BINDIR)/client
87 @echo "Installing ztest -> $(BINDIR)"; \
88 cp server/ztest $(BINDIR)/ztest; chmod 755 $(BINDIR)/ztest
91 @if [ ! -d $(LIBDIR) ]; then \
92 echo "Making directory $(LIBDIR)"; \
95 @echo "Installing libyaz.a -> $(LIBDIR)"; \
96 cp lib/libyaz.a $(LIBDIR)/libyaz.a; \
97 chmod 644 $(LIBDIR)/libyaz.a
98 @if [ -f lib/librfc.a ]; then \
99 echo "Installing librfc.a -> $(LIBDIR)"; \
100 cp lib/librfc.a $(LIBDIR)/librfc.a; \
101 chmod 644 $(LIBDIR)/librfc.a; \
103 @if [ ! -d $(INCDIR) ]; then \
104 echo "Making directory $(INCDIR)"; \
107 @cd include; for f in *.h; do \
108 echo "Installing $$f -> $(INCDIR)"; \
109 cp $$f $(INCDIR)/$$f; chmod 644 $(INCDIR)/$$f; \
113 @if [ ! -d $(YAZDIR) ]; then \
114 echo "Making directory $(YAZDIR)"; \
117 @cd tab; for f in *; do \
118 if [ -f $$f ]; then \
119 echo "Installing $$f -> $(YAZDIR)"; \
120 cp $$f $(YAZDIR)/$$f; chmod 644 $(YAZDIR)/$$f; \
125 wc `find . -name '*.[ch]'`