 #      $Source: /home/fergia/CVS/tcfs-openbsd/tcfslib-1.0.0/Makefile,v $
 #      $Revision: 1.3 $
 #      $Date: 2000/06/09 12:34:46 $
 #      $State: Exp $
 #      $Author: fergia $
 #      $Lockers$


CIPHERDIR=	/usr/tcfs/cipher
LIBDIR=         /usr/tcfs/lib
 
all: all_include all_lib all_cipher 

dep:
	@(cd include; make dep);
	@(cd lib; make dep);
	@(cd cipher; make dep);

all_include:
	@(echo -e "\nMaking header files for TCFS library...")
	@(cd include; make all)

all_lib:
	@(echo -e "\nMaking TCFS library...")
	@(cd lib; make all)

all_cipher:
	@(echo -e "\nMaking cipher shared library...")
	@(cd cipher; make all)

install: install_include install_lib install_cipher install_man 
	@(echo -e "\nUpdating run-time link bindings...")
	ldconfig -m $(CIPHERDIR) $(LIBDIR) /usr/local/lib 

install_include:
	@(echo -e "\nInstalling header files for TCFS library in "\
		$(INCLUDEDIR)...)
	@(cd include; make install)

install_lib:
	@(echo -e "\nInstalling TCFS library in "$(LIBDIR)...)
	@(cd lib; make install)

install_cipher:
	@(echo -e "\nInstalling cipher shared library in "$(CIPHERDIR)...)
	@(cd cipher; make install)

install_man:
	@(echo -e "\nInstalling TCFS library's manuals in "$(MANDIR)...) 
	@(cd man; make install)

uninstall:
	@(echo -e "\nRemoving header files for TCFS library from "\
		$(INCLUDEDIR)...)
	@(cd include; make uninstall)
	@(echo -e "\nRemoving TCFS library from "$(LIBDIR)...)
	@(cd lib; make uninstall)
	@(echo -e "\nRemoving cipher shared library from "$(CIPHERDIR)...)
	@(cd cipher; make uninstall)
	@(echo -e "\nRemoving TCFS library's manuals from "$(MANDIR)...) 
	@(cd man; make uninstall)

clean:
	@(echo -e "\nCleaning header files for TCFS library...")
	@(cd include; make clean)
	@(echo -e "\nCleaning TCFS library...")
	@(cd lib; make clean)
	@(echo -e "\nCleaning cipher shared library...")
	@(cd cipher; make clean)
	 
