
# ------------------------------------------------------------------------
#       Makefile for demonstation shell of BLT library
# ------------------------------------------------------------------------

include ./win/makedefs

# ------------------------------------------------------------------------
#       Source and target installation directories
# ------------------------------------------------------------------------

srcdir =	.
instdirs =	$(prefix) $(exec_prefix) $(bindir) $(libdir) $(includedir)

# ------------------------------------------------------------------------
#       Don't edit anything beyond this point
# ------------------------------------------------------------------------

subdirs =	src demos library html

all:  
	(cd src; $(MAKE) -f Makefile.vc all) 
	(cd demos; $(MAKE) -f Makefile.vc all) 
	(cd library; $(MAKE) -f Makefile.vc all) 
	(cd html; $(MAKE) -f Makefile.vc all) 

install: install-dirs install-all install-readme

install-all: 
	(cd src; $(MAKE) -f Makefile.vc install) 
	(cd demos; $(MAKE) -f Makefile.vc install) 
	(cd library; $(MAKE) -f Makefile.vc install) 
	(cd html; $(MAKE) -f Makefile.vc install) 

install-dirs:
	@for i in $(instdirs) ; do \
	    if test ! -d "$$i" ; then \
		echo " mkdir $$i" ; \
		mkdir $$i ; \
	    fi ; \
        done

install-readme:
	$(INSTALL_DATA) $(srcdir)/README $(scriptdir)
	$(INSTALL_DATA) $(srcdir)/PROBLEMS $(scriptdir)
	$(INSTALL_DATA) $(srcdir)/NEWS $(scriptdir)

clean:
	(cd src; $(MAKE) -f Makefile.vc clean) 
	(cd demos; $(MAKE) -f Makefile.vc clean) 
	(cd library; $(MAKE) -f Makefile.vc clean) 
	(cd html; $(MAKE) -f Makefile.vc clean) 
	$(RM) *.bak *\~ "#"* *pure* .pure*

GENERATED_FILES = \
	config.status config.cache config.log Makefile 

distclean: clean
	(cd src; $(MAKE) -f Makefile.vc distclean) 
	(cd demos; $(MAKE) -f Makefile.vc distclean) 
	(cd library; $(MAKE) -f Makefile.vc distclean) 
	(cd html; $(MAKE) -f Makefile.vc distclean) 
	$(RM) $(GENERATED_FILES)
