Building Karma from source code
-------------------------------

Files that may need modifying to build Karma for a new platform:

  ./.login
  ./login.mrc
  ./csh_script/uname_to_platform
  /usr/local/bin/platform
  ./include/gmakedefs/general.h1
  ./source/lib/makefiles/GNUmakefile.h1
  ./source/lib/makefiles/$OS/GNUmakefile.h1
  ./source/lib/makefiles/generic/shared-objects


To find modified source files:

  find . -name '*,v'


There are two separate builds, one for Karma itself, and one just for the
versions of kvis and kview provided in the Livedata distributions.  These
are referred to as MultibeamVis/View.  They are statically-linked to the
Karma libraries, and do not dynamically load the Glish libraries.


To build Karma:

  source ./login.mrc

  setenv MAKE_MULTIBEAMVIS 1        ...to build MultibeamVis/View, ...
    or
  unsetenv MAKE_MULTIBEAMVIS        ...not to.

  rm -rf ./admin.bin/
  rm -rf ./$MACHINE_OS/
  rm -rf ./build/$MACHINE_OS/       ...clean the slate

  vi ./include/gmakedefs/general.h1 ...modify rpath as suggested (optional)

  mkdir $MACHINE_OS
  cd $MACHINE_OS
  mkdir -p bin lib/shared-objects
  ln -s ../.cshrc
  ln -s ../.karmarc
  ln -s ../.login
  ln -s ../cm_script
  ln -s ../csh_script
  ln -s ../doc
  ln -s ../include
  ln -s ../man
  ln -s ../share
  ln -s ../www

  cd $KARMAROOT
  ./csh_script/make_build.libs      ...makes the lib build directory tree
  ./csh_script/make_build.modules   ...makes the module build directory tree

  cd $KARMAROOT/build/$MACHINE_OS/lib
  make |& tee make.log              ...check the log for errors

  cd $KARMAROOT/source/kutil        ...make shader2c, required for compiling
  make                                 xray
  setenv PATH "$KARMAROOT/admin.bin/${MACHINE_OS}:$PATH"

  cd $KARMAROOT/build/$MACHINE_OS/modules
  make |& tee make.log              ...check the log for errors

  Install...

  cd $KARMAROOT
  rm -rf ./build/$MACHINE_OS/       ...tidy up


When building MultibeamVis/View:

  Copy the MultibeamVis and MultibeamView executables from $KARMABINPATH to
  $LVD/darwin/bin.


2011/05/03 Mark Calabretta
