1 # Copyright (C) 1995-1998, Index Data
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile.in,v 1.4 1998-09-28 12:44:47 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 lib
33 # Add external libraries to the LIBS 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)" LIBS="$(LIBS)" \
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
67 for i in $(SUBDIR); do (cd $$i; rm -f *.o); done
68 mv lib/libyaz.a .; rm -f lib/*.a; mv libyaz.a lib
69 cd client; strip client
70 cd server; strip ztest
73 rm -f `find $(SUBDIR) -name "*.[oa]" -print`
74 rm -f `find $(SUBDIR) -name "core" -print`
75 rm -f `find $(SUBDIR) -name "errlist" -print`
76 rm -f `find $(SUBDIR) -name "a.out" -print`
78 distclean: clean cleandepend
81 for i in $(SUBDIR); do (cd $$i; \
82 if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
83 mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
85 install: all install.misc install.lib install.bin
88 @if [ ! -d $(BINDIR) ]; then \
89 echo "Making directory $(BINDIR)"; \
92 @echo "Installing client -> $(BINDIR)"; \
93 cp client/client $(BINDIR)/client; chmod 755 $(BINDIR)/client
94 @echo "Installing ztest -> $(BINDIR)"; \
95 cp server/ztest $(BINDIR)/ztest; chmod 755 $(BINDIR)/ztest
98 @if [ ! -d $(LIBDIR) ]; then \
99 echo "Making directory $(LIBDIR)"; \
102 @echo "Installing libyaz.a -> $(LIBDIR)"; \
103 cp lib/libyaz.a $(LIBDIR)/libyaz.a; \
104 chmod 644 $(LIBDIR)/libyaz.a
105 @if [ -f lib/librfc.a ]; then \
106 echo "Installing librfc.a -> $(LIBDIR)"; \
107 cp lib/librfc.a $(LIBDIR)/librfc.a; \
108 chmod 644 $(LIBDIR)/librfc.a; \
110 @if [ ! -d $(INCDIR) ]; then \
111 echo "Making directory $(INCDIR)"; \
114 @cd include; for f in *.h; do \
115 echo "Installing $$f -> $(INCDIR)"; \
116 cp $$f $(INCDIR)/$$f; chmod 644 $(INCDIR)/$$f; \
120 @if [ ! -d $(YAZDIR) ]; then \
121 echo "Making directory $(YAZDIR)"; \
124 @cd tab; for f in *; do \
125 if [ -f $$f ]; then \
126 echo "Installing $$f -> $(YAZDIR)"; \
127 cp $$f $(YAZDIR)/$$f; chmod 644 $(YAZDIR)/$$f; \
132 wc `find . -name '*.[ch]'`