#
#       Makefile for $(DENNOUDIR)/util/gt3-dcl5
#       

include	Mkinclude

SUBDIRS		= src bin include
DIRSCLN		= src doc include
DIRSCLNA	= src bin lib doc include

all:	libs

libs:
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Making $$i/" ; \
	  $(MAKE) ; \
	  cd .. ; \
	done


install: 
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Installing $$i/" ; \
	  $(MAKE) install; \
	  cd .. ; \
	done

clean: clean.local clean.dir

clean.all: clean.local clean.dira

clean.local:
	$(RM) *~

clean.dir:
	@for i in $(DIRSCLN) ; do \
	  cd $$i ; \
	  echo "Cleaning $$i/" ; \
	  $(MAKE) clean ; \
	  cd .. ; \
	done

clean.dira:
	@for i in $(DIRSCLNA) ; do \
	  cd $$i ; \
	  echo "Cleaning $$i/" ; \
	  $(MAKE) clean.all ; \
	  cd .. ; \
	done

tags:
	@$(TAGS) */*.F
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  $(MAKE) index ; \
	  cd .. ; \
	done

index:
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  $(MAKE) index ; \
	  cd .. ; \
	done

print:
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Printing $$i/" ; \
	  $(MAKE) print ; \
	  cd .. ; \
	done

$(PACK):
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Packing $$i/" ; \
	  $(MAKE) pack; \
	  cd .. ; \
	done	


