E852 Documentation: Software: Setup


Run-Time enviromnent

The following environment variables have to be defined in order to run the E852 software:

The DAQ online system also defines additional environment variables listed below-

The preferred way to set these variables is to source the correct setup file. The setup file used at BNL is:

        > source /home/mpsdaq/e852/daq/setup

Software Building enviromnent

  1. The Make Program

    Building of E852 software is managed be the GNU Make software (gnumake). E852 currently (as of 1995-03-16) uses GNU Make version 3.68.

    Why?

    1. absolutely portable. The same version of GNU make can be built on almost any computer.
    2. good documentation. The GNU make manual is as thick as the /bin/make manual and is kept much more up to date.
    3. built-in support for the SCCS code management system. GNU make can automatically detect out of date sources and update them from the SCCS tree.

  2. Multiplatform support

    The E852 software builds and runs on multiple software and hardware platforms. The platfrom dependance (compiler switches, libraries, etc...) is handled automagically by the E852_MAKETARGET environment variable.

    Supported platfroms are listed here:

    1. SGI Irix4: E852_MAKETARGET = irix4 (no longer supported)
    2. SGI Irix5.2, 5.3: E852_MAKETARGET = irix5 and irix5o
    3. SGI Irix6: E852_MAKETARGET = irix6 and irix6o (supported only partially)
    4. IBM AIX3.2.5: E852_MAKETARGET = rs6000 or rs6000o

  3. Guidelines for writing Makefiles

    1. include the '$E852_HOME/makefiles/rules.make' file. It will define the $(INCLUDE) $(FINCLUDE) and $(CFLAGS) depending on $(E852_MAKETARGET) for every differently for every platform.
    2. use $(INCLUDE) defined in 'rules.make' for include files. The suggested search order is -I. -I../include -I$(E852_HOME)/include.
    3. look for libraries in the order- -L../lib -L$(E852_HOME)/lib Use $(FLIB) to load the Fortran libraries (very platform dependant- it is different even for irix4 and irix5)
    4. create libraries in the $(LIBDIR) directory.
    5. define the 'clean' and 'all' targets in such a way that the sequence 'make clean' 'make all' will rebuild everything frm scratch.

  4. "Bare bones" setup

    To be able to build some subsystems (but not the libraries) follow these steps:

    1. set E852_MAKETARGET appropriately, setenv E852_HOME to be /home/lemond/e852 put $E852_HOME/bin in your path (to get 'gnumake' and 'acpp').
    2. Make the build tree- ('->' means a symbolic link)
                          your_home/e852/source/makefiles -> /home/lemond/e852/source/makefiles
                                           your_subsystem
                                           your_subsystem/SCCS -> /home/lemond/e852/source/your_subsystem/SCCS
      
    3. 'cd your_subsystem'
    4. 'gnumake Makefile'. At this point gnumake should extract the Makefile from SCCS. If it does not happen, contact a knowledgable person.
    5. 'gnumake all'. This will supposedly build everything.

  5. "standard" setup

    Everything is same as above except for more symlinks-
              your_home/e852/source/makefiles -> /home/lemond/e852/source/makefiles
                                .../lib -> /home/lemond/e852/lib
                         or depending of the target host-
                                .../lib -> /home/lemond/e852/lib.irix4
                                .../lib -> /home/lemond/e852/lib.irix5
                                .../lib -> /home/lemond/e852/lib.rs6000
                                .../include -> /home/lemond/e852/include
                                .../your_subsystem
                                .../your_subsystem/SCCS -> /home/lemond/e852/source/your_subsystem/SCCS
    

  6. "isolated" setup

    This setup allows one to isolate himself from the /home/lemond/e852/ tree. Instead of symlinks, the 'lib' and 'include' are real directories with some of the libraries and include files. Most Makefiles are setup to look first in these 'local' directories, then in /home/lemond/e852/{lib,include}

//
original: CO somewhen
revised:  CO 1995-03-16
end file