Welcome to Earthworm

Before you try and compile Earthworm from this directory, you will
need to set some environment variables as they are used by the
Makefiles pre-built herein.

Step 1:
cd ../environment and find the shell/OS that matches your platform
edit the environment file and then run or source the file so that
your build environment is set.

After your EW_HOME and EW_VERSION parameters, the most important env 
var for compilation under Unix is GLOBALFLAGS.
For Windows, there are Visual Studio .bat variable settings that must
be sourced (see the ew_nt.cmd example).

Step 2:
run make or for windows nmake followed by your target OS:

1. To build (compile) the entire Earthworm distribution on a Sun:
        make unix

1a. To compile the Earthworm distrib. on a Mac OS X, Linux, or other POSIX box:
        make unix

2. To build (compile) the entire Earthworm distribution on an NT PC:
        nmake nt



Troubleshooting:

If you get the error:

gnu/stubs-32.h: No such file or directory

try:

sudo yum install  glibc-devel.i686

If you get the error:

skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.6.0/libgcc_s.so

try:

sudo yum install libgcc.i686

_64 BIT COMPILES ON LINUX_

Earthworm currently compiles in 32 bit mode. Earthworm doesn't have memory requirements that take advantage 64 bit, but the latest 64 bit operating systems don't come with libraries that support 32 bit automatically installed.

Here's what libraries you should install in a Red Hat based system:
sudo yum install glibc-devel.i686 libgcc.i686 libstdc++-devel.i686

For Ubuntu:
sudo apt-get install libc6-dev-i386 gfortran-multilib 
or if you get an errr above, try just 
sudo apt-get install gfortran-multilib

If you get errors installing any of these libraries, try installing them one at at time instead of multipl on one command line

Known compile issues:
StartstopConsole will not compile with newer Windows compilers, and will not work on newer Windows operating systems
PsnAdSend will not compile on OSX