                       Building a GENESIS Distribution
                         July 1993 (version 1.4.1)

You must be running X11R3, X11R4 or X11R5 on a Sun (SunOS 4.0 or greater),
DECstation (Ultrix 3.1), Silicon Graphics (Irix 4.0.1 and up).  Other
platforms may be capable of running GENESIS, but the software has not
been tested by Caltech outside of these environments.  GENESIS is known
to compile on Hewlett Packard systems (HPUX, versions unknown).  There
is a problem with the X11 libraries supplied by HP.  A library set
is available via ftp which does work.  Details are in the Makefile in
the src directory.  No guarantees on platforms or operating systems
outside of these parameters!   Note that all of our code has been
built using X11 from MIT.   The code will execute fine with the Sun
OPENWIN product, but we have not tested compilation using their include
files.    Since the MIT distribution is free, we suggest that you use
it.

The GENESIS distribution may be installed in whatever directory is most
convenient.  The place where you unpack the distribution is the installation
directory.  In the instructions that follow, directory and file names are
given relative to the installation directory.  Thus, this file is src/README.

To build the distribution follow the instructions below.   

REQUIRED MODIFICATIONS:

Edit the file src/Makefile and set the following parameters. Do NOT
edit the files called 'Makefile.machine-name' or rename them to Makefile. It 
is critical that these parameters are set correctly for a clean compile and
install to occur:

	MACHINE=	{sun3,sun4,mips,irix,hpux}
			Specify sun3 for sun 3s
			Specify sun4 for sun 4s & SPARCstations
			Specify mips for DECstation 2100, 3100 and 5000s
			Specify irix for Silicon Graphics IRIX
			Specify hpux for Hewlett Packard HPUX
			Specify other for any other UNIX system and set SYS
			    to either SYSV or BSD
	XVERSION=	{X11R3,X11R4,X11R5}
			Specify one of X11R3, X11R4 or X11R5.
			DECstations are X11R3.  SUN Openwindows 2 is
			X11R3 while Openwindows 3 is X11R4. Again, we
			suggest that you compile GENESIS with the MIT
			include and library files.

OPTIONAL MODIFICATIONS:

If for some reason your X11 include and library files are located in
non-standard directories (e.g. not in /usr/include and /usr/lib) you
can set the following parameters in src/Makefile:

	XLIB=		<dir>
			Specify the directory in which the X11 libraries
			reside.

	CFLAGS=		<other-cflags-stuff> -I<dir>
			Specify the directory in which the X11 include
			hierarchy resides.  Note that the directory
			specified must have a subdirectory named X11 in
			which the include files reside.

For example, if you have openwin fully installed on your SUN, you can use
the following parameter settings:

	XLIB =		/usr/openwin/lib
	CFLAGS =	-O -I/usr/openwin/include

to compile using openwin includes and libraries.  (Note the comments in
src/Makefile about using openwin.)

SPECIAL NOTES if using X11R3:

	If X11R3 is specified, REMOVE the library line for "libXext.a".  
	This library first appeared in X11R4 and not present in X11R3.

BUILDING THE DISTRIBUTION:

	From the src directory type:

		make clean
		make > & ! make.out &
		(or for the Bourne shell: make > make.out 2>&1 & )


	This will take between 10 to 30 minutes, depending on machine
	type.   The compile process can be viewed by typing:

		tail -f make.out 	[ hit ^C to exit the tail ]

	If you want to build a version of GENESIS to be run without
	XODUS, type "make nxdefault".  To compile a minimum version of
	GENESIS with none of the object libraries included, type
	"make mindefault".
	
INSTALLATION:
	
	After a clean build the distribution can be installed by 
	typing:

		make install

	This will copy all important files and binaries to the installation
	directory and the subdirectories startup, lib and include.  GENESIS
	initialization commands in .simrc will be modified to refer to the
	installation directory as part of the installation process.  Finally,
	type:

		make clean

	to remove temporary files which were created during the compilation.

TESTING THE DISTRIBUTION:

	After a successful 'make install' the distribution can be
	tested by cd'ing to Scripts/{MultiCell, neurokit, squid or
	orient_tut} and following the directions found in the README
	files found in those directories.  Make sure that you've added
	the installation directory to your path and copied .simrc to
	your home directory before running any of the demos.  .simrc
	files from previous versions of GENESIS should be replaced by
	the one in the installation directory.  If you are using
	GENESIS without XODUS (nxgenesis) or a minimal version of
	GENESIS (mingenesis), copy .nxsimrc or .minsimrc to .simrc in
	your home directory.
