1 # Copyright (C) 1995-1998, Index Data
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile.in,v 1.1 1998-08-21 14:13:23 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
18 # Uncomment the two lines below if you want to try the ASN.1 compiler
19 # (yc) for YAZ. Download yc separately and untar it along with YAZ:
20 # gunzip -c yaz.tar.gz | tar xvf -
21 # gunzip -c yc.tar.gz | tar xvf -
24 # You must run 'make depend' before 'make'.
25 #INCLUDE=-I../z39.50 -I. -I../include
32 SUBDIR=$(MOD) util odr $(RFC1006) ccl comstack retrieval client server ztest makelib
33 # Add external libraries to the ELIBS macro
38 # Installation directories, etc.
41 exec_prefix=@exec_prefix@
43 BINDIR=$(exec_prefix)/bin
44 # Public libraries and header files
45 LIBDIR=$(exec_prefix)/lib
46 INCDIR=$(prefix)/include
48 YAZDIR=$(prefix)/lib/yaz
51 for i in $(SUBDIR); do cd $$i; if $(MAKE) CC="$(CC)" \
52 RANLIB="$(RANLIB)" ELIBS="$(ELIBS)" \
53 INCLUDE="$(INCLUDE)" CFLAGS="$(CFLAGS)" \
55 LIBMOSI="$(LIBMOSI)" XMOSI="$(XMOSI)";\
56 then cd ..; else exit 1; fi; done
59 for i in $(SUBDIR); do cd $$i; if $(MAKE) CPP="$(CPP)" \
60 INCLUDE="$(INCLUDE)" CDEFS="$(CDEFS)" depend;\
61 then cd ..; else exit 1; fi; done
64 for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done
68 for i in $(SUBDIR); do (cd $$i; rm -f *.o); done
69 mv lib/libyaz.a .; rm -f lib/*.a; mv libyaz.a lib
70 cd client; strip client
71 cd server; strip ztest
74 rm -f `find $(SUBDIR) -name "*.[oa]" -print`
75 rm -f `find $(SUBDIR) -name "core" -print`
76 rm -f `find $(SUBDIR) -name "errlist" -print`
77 rm -f `find $(SUBDIR) -name "a.out" -print`
79 distclean: clean cleandepend
82 for i in $(SUBDIR); do (cd $$i; \
83 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
84 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
86 install: all install.misc install.lib install.bin
89 @if [ ! -d $(BINDIR) ]; then \
90 echo "Making directory $(BINDIR)"; \
93 @echo "Installing client -> $(BINDIR)"; \
94 cp client/client $(BINDIR)/client; chmod 755 $(BINDIR)/client
95 @echo "Installing ztest -> $(BINDIR)"; \
96 cp server/ztest $(BINDIR)/ztest; chmod 755 $(BINDIR)/ztest
99 @if [ ! -d $(LIBDIR) ]; then \
100 echo "Making directory $(LIBDIR)"; \
103 @echo "Installing libyaz.a -> $(LIBDIR)"; \
104 cp lib/libyaz.a $(LIBDIR)/libyaz.a; \
105 chmod 644 $(LIBDIR)/libyaz.a
106 @if [ -f lib/librfc.a ]; then \
107 echo "Installing librfc.a -> $(LIBDIR)"; \
108 cp lib/librfc.a $(LIBDIR)/librfc.a; \
109 chmod 644 $(LIBDIR)/librfc.a; \
111 @if [ ! -d $(INCDIR) ]; then \
112 echo "Making directory $(INCDIR)"; \
115 @cd include; for f in *.h; do \
116 echo "Installing $$f -> $(INCDIR)"; \
117 cp $$f $(INCDIR)/$$f; chmod 644 $(INCDIR)/$$f; \
121 @if [ ! -d $(YAZDIR) ]; then \
122 echo "Making directory $(YAZDIR)"; \
125 @cd tab; for f in *; do \
126 if [ -f $$f ]; then \
127 echo "Installing $$f -> $(YAZDIR)"; \
128 cp $$f $(YAZDIR)/$$f; chmod 644 $(YAZDIR)/$$f; \
133 wc `find . -name '*.[ch]'`