HEADERTARGET=~len/include
LIBTARGET=~len/lib

CLEANDIRS=include lib chnhash linteger lmisc prng docs tests
DISTCLEANDIRS=include lib chnhash linteger lmisc prng docs tests
LINSTALLDIRS=chnhash linteger prng lmisc 
LIBS=libch.a liblinte.a libprng.a
INCLDIRS=chnhash linteger lmisc prng

install-local:
	for DIR  in $(LINSTALLDIRS) ; \
	do  ( cd $$DIR ; make install ) ; \
 	done 	

install-libs:
	for ILIB  in $(LIBS) ; \
	do  ( cp  lib/$$ILIB $(LIBTARGET) ) ; \
	done 	

install-headers:
	for HDIR  in $(INCLDIRS) ; \
	do  ( cp -R include/$$HDIR $(HEADERTARGET) ) ; \
	done 	

install:	install-libs install-headers

clean:
	for DIR  in $(CLEANDIRS) ; do  ( cd $$DIR ; make clean ) ;  done 	

dist-clean:
	for DIR  in $(DISTCLEANDIRS) ; \
	do  ( cd $$DIR ; make dist-clean ) ; \
 	done 	
