Chris Greenhalgh, 6/12/2000, rev-4b.
MASSIVE-3 currently has limited cross-platform build support. It has been compiled in the past on IRIX using cc, on AIX using gcc and on Windows using Microsoft Visual C++ version 4.2 and above.
If you have access to the core MRL directories then you will find that the top level massive3 directory is divided into release directories ('rev-*') and personal development directories ('dev-*'). Within each one the structure is the same. The external tarball release is one such release directory.
Each release/development copy of massive-3 typically include the following top-level directories:
config - user/client configuration files
crgshare - supporting libraries (crg, ctm, dgl, audio) from CRGSHARE (MASSIVE-2)
doc - MASSIVE-3 document (that same as on the web)
etc - data files, geometries, etc.
scripts - useful scripts
src - source files
worlds - sample worlds/scripts
i386-ms-wnt4.0', 'mips-sgi-irix6.3').
The source code (src) is divided into a number of subdirectories:
src/libhivek - the core linked library which includes all general data distribution
stuff and audio, but no clients or graphics.
src/stdapps - standard application such as bodyExampleClient, Trader, VerySimpleApp, persistent things
src/devices - part of a device-driver framework from MASSIVE-2, currently just a Polhemus
fastrak driver. Currently only used by the immersiveClient.
src/apps - a few other ('non-standard') applications such as SofaClient
src/mgmtapi - the management server, for control from Java for cameras and constraints.
src/mgmtjava - Java applications that use the management server, e.g. cameras, temporal
link controls, world managers
src/samples - sample code
Each platform-specific build directory has a parallel set of directories in which libraries/programs are compiled, e.g. on Windows:
i386-ms-wnt4.0/libhivek - build libhivek
i386-ms-wnt4.0/stdapps - build stdapps
i386-ms-wnt4.0/devices - build libdevices
i386-ms-wnt4.0/apps - build other apps
i386-ms-wnt4.0/mgmtapi - build management apps
i386-ms-wnt4.0/samples - build samples
plus:
i386-ms-wnt4.0/bin - where the final libraries and executables are created and run from.
(Being platform independent) src/mgmtjava can be compiled in place.
There is slightly odd cross-platform build system as follows.
For each target platform there is a platform-specific Makefile that defines
path separators, commands, flags, etc. These can be found in the src/ directory as Makefile-prefix.<TARGET>. For example, Makefile-prefix.win32, Makefile-prefix.unix, Makefile-prefix.aix. Any customisation for a particular build platform should be done here.
For each build directory there is a (hopefully) platform-independent Makefile,
just called Makefile (e.g. src/libhivek/Makefile).
Once platform-specific build directories (<PLATFORM>) and subdirectories (bin, libhivek, stdapps, devices, apps, mgmtapi, samples) have been created (by hand), and whenever a Makefile is changed, the real Makefiles are generated from
the above using a script run from the platform-specific build directory.
For windows, in the i386-ms-wnt4.0/ directory run:
> ../scripts/win32makefile
This is a Bourne Shell (or BASH) script; it can be run under Cygnus solutions
Cygwin UNIX shell (www.cygnus.com, search for Cygwin) on the windows machine,
or can be run on a UNIX machine hosting the filesystem. This uses sed to do some of the symbol substitutions that nmake (Microsoft's make) cannot cope with.
For other platforms, in the <PLATFORM> directory run:
> ../scripts/anymakefile <TARGET>
where <TARGET> is the suffix on the platform-specific Makefile that you want to use.
These commands will create the following makefiles:
<PLATFORM>/libhivek/Makefile
<PLATFORM>/stdapps/Makefile
<PLATFORM>/devices/Makefile
<PLATFORM>/mgmtapi/Makefile
<PLATFORM>/apps/Makefile
<PLATFORM>/samples/Makefile
MASSIVE-3 uses several libraries from CRGSHARE. CRGSHARE has its own build
system. On UNIX this is based on autoconf; on Windows there is a separate hand-crafted set of Makefiles. If you need
to build this for a new platform then good luck...
Once you have a suitable build of CRGSHARE, you can build MASSIVE-3 as follows:
i386-ms-wnt4.0'; on UNIX platforms it is normally the result of running the script scripts/config.guess. We will refer to this directory name as <PLATFORM>.
bin, libhivek, stdapps, devices, apps, mgmtapi, samples
src/ and find or create one that suits your build platform. We will refere to
its filename suffix as <TARGET>.
<PLATFORM> directory run the script to create the makefiles as described above, i.e. > ../scripts/win32makefile
or> ../scripts/anymakefile <TARGET>
PLATFORM - set to <PLATFORM>, above.CRGSHARE_VER - set to the full path of the crgshare directory. LD_LIBRARY_PATH - set as per the user tutorial, to locate crgshare and massive3 shared
objects.
libhivek
stdapps
mgmtapi
apps
samples
devices
stdapps (2)> nmake all> make allimmersive', e.g. on Windows:> nmake immersive
bin directory that libhivek and the various executables have been created.
src/mgmtjava and compile everything:> javac *.java
Note 1: the build dependencies are not complete; if you change a file, especially in the core library, and you are not sure what depends on it then it is safest to delete all objects and recompile everything.
Note 2: remember to change the Makefiles under src/ and then to rerun the makefile generating script, rather than changing the Makefiles in the individual build directories.