########################################################################
# $Id: Makefile,v 1.4 93/01/26 11:23:38 drew Exp $
########################################################################

       SHELL = /bin/sh
          RM = rm -f
          MV = mv
        MAKE = make
   XMKMF_CMD = xmkmf
all:
	@echo ''
	@echo 'To Build Xerion, use the following procedure.'
	@echo ''
	@echo '1) Make sure that you have Imake, and all of the necessary'
	@echo '   X libraries (See the README file). If you don'\''t have'
	@echo '   them, go get them.'
	@echo ''
	@echo '2) Set the shell environment variable XERIONDIR to $$PWD'
	@echo '   and source the file ./config/setup.csh:'
	@echo ''
	@echo '	unix> setenv XERIONDIR $$PWD'
	@echo '	unix> source $$XERIONDIR/config/setup.csh'
	@echo ''
	@echo '3) Edit the configuration parameters in ./config/xerion.cf'
	@echo '   (search for the string "EDIT:", and make the appropriate'
	@echo '   changes).'
	@echo ''
	@echo '4) Build Xerion, by typing:'
	@echo ''
	@echo '	unix> make World |& tee build.log'
	@echo ''
	@echo '5) Install Xerion, and clean up all generated files by'
	@echo '   typing:'
	@echo ''
	@echo '	unix> make install'
	@echo '	unix> make clean'
	@echo ''
	@echo 'NOTES:'
	@echo '  Do not name your log file make.log or it will be deleted.'
	@echo '  If "make World" fails, you can continue the build by typing'
	@echo '  "make Everything".'
	@echo '  To build only the Makefile, type "make Makefile".'
	@echo '  If the top-level Makefile gets corrupted, copy Makefile.ini
	@echo '  to Makefile and try again.'
	@echo ''

World::
	@echo ""
	@echo "Building Version 3.1 of the Xerion Neural Network Simulator"
	@echo ""
	@echo "##############################################################"
	@echo "# Did you remember to check the configuration parameters in  #"
	@echo "# the directory ./config/xerion.cf?                          #"
	@echo "##############################################################"
	@echo ""
	@date
	@echo ""
	@$(XMKMF_CMD)
	$(MAKE) $(MFLAGS) Makefiles
	$(MAKE) $(MFLAGS) clean
	$(MAKE) $(MFLAGS) includes
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) all
	@echo ""
	@date
	@echo ""
	@echo "Full build of Version 3.1 of the Xerion Neural Network Simulator complete."
	@echo ""
	

Makefile::
	@$(XMKMF_CMD)
