# Copyright (C) 1995-1999, Index Data # All rights reserved. # Sebastian Hammer, Adam Dickmeiss # $Id: Makefile.in,v 1.10 1999-06-08 10:16:17 adam Exp $ # Uncomment the lines below to enable mOSI communcation. #CDEFS=-DUSE_XTIMOSI #RFC1006=rfc1006 #LIBMOSI=../../xtimosi/src/libmosi.a ../lib/librfc.a #XMOSI=xmosi.o CDEFS=@DEFS@ # Standard include path and original protocol encoders. INCLUDE=-I. -I../z39.50 -I../include # The Module below is either asn (the original de/en-coders) # or z39.50 (the compiled de/en-coders). MOD=@ASNMODULE@ CC=@CC@ CPP=@CPP@ SHELL=/bin/sh MAKE=make SUBDIR=util odr $(MOD) zutil $(RFC1006) ccl comstack retrieval client server ztest lib # Add external libraries to the LIBS macro LIBS=@LIBS@ RANLIB=@RANLIB@ # Installation directories, etc. # Binaries prefix=@prefix@ exec_prefix=@exec_prefix@ BINDIR=$(exec_prefix)/bin # Public libraries and header files LIBDIR=$(exec_prefix)/lib INCDIR=$(prefix)/include # Misc tables, etc. YAZDIR=$(prefix)/lib/yaz all: for i in $(SUBDIR); do (cd $$i; $(MAKE) CC="$(CC)" \ RANLIB="$(RANLIB)" LIBS="$(LIBS)" \ INCLUDE="$(INCLUDE)" CFLAGS="$(CFLAGS)" \ CDEFS="$(CDEFS)" \ LIBMOSI="$(LIBMOSI)" XMOSI="$(XMOSI)");\ done dep depend: for i in $(SUBDIR); do (cd $$i; $(MAKE) CPP="$(CPP)" \ INCLUDE="$(INCLUDE)" CDEFS="$(CDEFS)" depend);\ done clean: for i in $(SUBDIR); do (cd $$i; $(MAKE) clean); done oclean: for i in $(SUBDIR); do (cd $$i; rm -f *.o); done mv lib/libyaz.a .; rm -f lib/*.a; mv libyaz.a lib cd client; strip client cd ztest; strip ztest cleanup: rm -f `find $(SUBDIR) -name "*.[oa]" -print` rm -f `find $(SUBDIR) -name "core" -print` rm -f `find $(SUBDIR) -name "errlist" -print` rm -f `find $(SUBDIR) -name "a.out" -print` distclean: clean cleandepend cleandepend: for i in $(SUBDIR); do (cd $$i; \ if sed '/^#Depend/q' Makefile.tmp; then \ mv -f Makefile.tmp Makefile; fi; rm -f .depend); done install: all install.misc install.lib install.bin install.bin: @if [ ! -d $(BINDIR) ]; then \ echo "Making directory $(BINDIR)"; \ mkdir $(BINDIR); \ fi @echo "Installing client -> $(BINDIR)"; \ cp client/client $(BINDIR)/client; chmod 755 $(BINDIR)/client @echo "Installing ztest -> $(BINDIR)"; \ cp ztest/ztest $(BINDIR)/ztest; chmod 755 $(BINDIR)/ztest install.lib: @if [ ! -d $(LIBDIR) ]; then \ echo "Making directory $(LIBDIR)"; \ mkdir $(LIBDIR); \ fi @echo "Installing libyaz.a -> $(LIBDIR)"; \ cp lib/libyaz.a $(LIBDIR)/libyaz.a; \ chmod 644 $(LIBDIR)/libyaz.a @if [ -f lib/librfc.a ]; then \ echo "Installing librfc.a -> $(LIBDIR)"; \ cp lib/librfc.a $(LIBDIR)/librfc.a; \ chmod 644 $(LIBDIR)/librfc.a; \ fi @if [ ! -d $(INCDIR) ]; then \ echo "Making directory $(INCDIR)"; \ mkdir $(INCDIR); \ fi @cd include; for f in *.h; do \ echo "Installing $$f -> $(INCDIR)"; \ cp $$f $(INCDIR)/$$f; chmod 644 $(INCDIR)/$$f; \ done install.misc: @if [ ! -d $(YAZDIR) ]; then \ echo "Making directory $(YAZDIR)"; \ mkdir $(YAZDIR); \ fi @cd tab; for f in *; do \ if [ -f $$f ]; then \ echo "Installing $$f -> $(YAZDIR)"; \ cp $$f $(YAZDIR)/$$f; chmod 644 $(YAZDIR)/$$f; \ fi; \ done wc: wc `find . -name '*.[ch]'`