Imake


an example Imakefile

linking to libraries: g77 upmu1.o next_ofl_file.o -lmufitpe -lzbs -L/skam/06a/lib -o upmu1_low
g77 objects -(libraries) -L(hardwired libs)
Super-K libraries:
  atmpd lib: /home/atmpd/skrep/07a/atmpd/src/ 
  SK lib   : /skam/skrep/06c/skam_src/
  Cern lib : /cern/2005/src/ 
How do you find a library? Look for lines like this in your COMPILE.sh (if you have one):
  setenv PACKAGE /home/atmpd/skrep
  setenv PACKAGE_LEVEL 07a
  setenv EXPERIMENT /skam/skrep
  setenv EXPERIMENT_LEVEL 07b
  setenv CVSCOSRC ${PACKAGE}/${PACKAGE_LEVEL}/config_linux
  setenv PATH ${PACKAGE_ROOT}/bin/${MACHINE}:${EXPERIMENT_ROOT}/bin:${PATH}
  setenv CERN         /cern
  setenv CERN_LEVEL   2005 

Imakefile syntax: FortranProgramTarget(program, objs, deplibs, loclibs, syslibs)
an example: FortranProgramTarget(fillnt,fillnt.o $(OBJS) $(UPMUOBJ) $(TAUOBJ),,$(TAULIB) $(APLIB) $(SKLIB) $(SITE_LIBRARIES) $(FJTLIB) `cernlib mathlib lapack`,)

conditional compilation: to build code inside #ifdef/#endif statements:
in Imakefile:
#ifdef UPMU
FORTRANDEFINES += -DUPMU
#endif
in compilation script: imake_boot -DUPMU
in source code:
#ifdef UPMU
#include "gumed_u.h"
#endif

Back to Resources


ethrane@u.washington.edu