| 1 | ======================== BuildMgr Module ====================== | 
|---|
| 2 | == Code Management scripts / top level makefile for SOPHYA ==== | 
|---|
| 3 | =============================================================== | 
|---|
| 4 | (C) LAL-IN2P3/CNRS   1998-2007 | 
|---|
| 5 | (C) DAPNIA/CEA       1998-2007 | 
|---|
| 6 | =============================================================== | 
|---|
| 7 |  | 
|---|
| 8 | ### README file for SOPHYA Build makefiles and scripts (BuildMgr) #### | 
|---|
| 9 | See http://www.sophya.org and the SOPHYA overview manual for more information | 
|---|
| 10 |  | 
|---|
| 11 |  | 
|---|
| 12 | ==================================== | 
|---|
| 13 | A/ Software build and installation : | 
|---|
| 14 | ==================================== | 
|---|
| 15 |  | 
|---|
| 16 | 1/ Configuration: | 
|---|
| 17 | csh> cd BuildMgr/ | 
|---|
| 18 | csh> ./configure -h | 
|---|
| 19 | # configure with c-fitsio, installed in /usr/local/include and /usr/local/lib, | 
|---|
| 20 | # with g++ as cxx compiler. The target installation directory is $HOME/SObjs/ | 
|---|
| 21 | # To get c-fitsio : http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html | 
|---|
| 22 |  | 
|---|
| 23 |  | 
|---|
| 24 | # Create the target installation directory (if not already existing) | 
|---|
| 25 | csh> mkdir ~/SObjs | 
|---|
| 26 | # Define the SOPHYABASE environment variable | 
|---|
| 27 | csh> setenv $SOPHYABASE ~/SObjs/ | 
|---|
| 28 | # run the configure script | 
|---|
| 29 | csh> ./configure -sbase $SOPHYABASE -scxx g++ -extp /usr/local | 
|---|
| 30 | -noext fftw -noext lapack -noext astro | 
|---|
| 31 |  | 
|---|
| 32 | 2/ compile and build the libraries | 
|---|
| 33 | csh> make libs extlibs slb slbext | 
|---|
| 34 | # Or if you want to compile also PI (need Motif or Lesstif) | 
|---|
| 35 | csh> make all slball | 
|---|
| 36 |  | 
|---|
| 37 | 3/ Compile some test and utility programs | 
|---|
| 38 | csh> make basetests prgutil | 
|---|
| 39 | # To compile piapp | 
|---|
| 40 | csh> make piapp | 
|---|
| 41 |  | 
|---|
| 42 | 4/ You can clean the .o files, if you are not going to recompile after | 
|---|
| 43 | changing or update source files | 
|---|
| 44 | csh> make cleanobj | 
|---|
| 45 |  | 
|---|
| 46 | 5/ List of Makefile targets | 
|---|
| 47 | > libs extlibs PI = all | 
|---|
| 48 | > slb slbext slbpi = slball    (OR = slballinone) | 
|---|
| 49 | > clean  cleanobj | 
|---|
| 50 | > tests prgutil prgmap progpi = prgall | 
|---|
| 51 | > basetests piapp (ou progpi)  pmixer | 
|---|
| 52 |  | 
|---|
| 53 | 6/ Currently tested on the following platform/compilers | 
|---|
| 54 | ------------------------------------------------------------------------- | 
|---|
| 55 | Linux 2.4 , 2.6              g++ 3.x 4.0     (GNU g++ compiler) | 
|---|
| 56 | MacOSX/Darwin 10.3/10.4      g++ 3.3,4.0     (Apple/GNU compiler) | 
|---|
| 57 | Linux 2.4                    icc 9.0         (Intel compiler) | 
|---|
| 58 | HP/Compaq/DEC OSF 5.x        cxx 6.x         (native Tru64/OSF compiler) | 
|---|
| 59 | SGI IRIX64                   CC  7.30        (IRIX-64 native compiler) | 
|---|
| 60 | IBM AIX (5.3)                xlC 8.0         (AIX native compiler) | 
|---|
| 61 | ------------------------------------------------------------------------- | 
|---|
| 62 |  | 
|---|
| 63 | ============================ | 
|---|
| 64 | B/ Code management scripts : | 
|---|
| 65 | ============================ | 
|---|
| 66 |  | 
|---|
| 67 | 1/ configure : c-shell script configuration | 
|---|
| 68 | ./configure -sbase /tmp/sbase/ -scxx cxx -extp /usr/local/extlibs | 
|---|
| 69 |  | 
|---|
| 70 | 2/ mkmflib : c-shell script for creation of library module Makefile / smakefile | 
|---|
| 71 | ./mkmflib -sbase /tmp/sbase SUtils | 
|---|
| 72 |  | 
|---|
| 73 | 3/ mkmfprog : c-shell script for creation of programs module Makefile / smakefile | 
|---|
| 74 | ./mkmfprog -sbase /tmp/sbase SUtils | 
|---|
| 75 |  | 
|---|
| 76 | 4/ domkmf : c-shell script : calls mkmflib for all modules | 
|---|
| 77 | ./domkmf -sbase /tmp/sbase | 
|---|
| 78 |  | 
|---|
| 79 | 5/ chk_cvs.csh : Compares/updates modules using CVS | 
|---|
| 80 | Usage: chk_cvs.csh [-a] [-all] [-nos] [-u] [r] | 
|---|
| 81 | chk_cvs.csh  -h  for help | 
|---|
| 82 |  | 
|---|
| 83 | 6/ Makefile/smakefile : Top level makefile for library and program modules | 
|---|
| 84 |  | 
|---|
| 85 | 7/ Configuration files used to generate sophyamake.inc | 
|---|
| 86 | - Linux_g++_make.inc: Linux with g++ compiler | 
|---|
| 87 | - OSF1_cxx_make.inc:  HP/Compaq/Digital Tru64 with native cxx compiler | 
|---|
| 88 | - Darwin_g++_make.inc: Apple/MacOSX with the native GNU compiler | 
|---|
| 89 | - IRIX64_CC_make.inc: SGI IRIX-64 system and native CC compiler | 
|---|
| 90 | - AIX_xlC_make.inc : IBM AIX system and compiler xlC | 
|---|
| 91 | - Linux_icc_make.inc : Linux with Intel compiler | 
|---|
| 92 |  | 
|---|
| 93 |  | 
|---|
| 94 | ========================================== | 
|---|
| 95 | C/ List of modules SOPHYA and PI modules : | 
|---|
| 96 | ========================================== | 
|---|
| 97 |  | 
|---|
| 98 | * BuildMgr/      Scripts for code management and makefiles | 
|---|
| 99 | * BaseTools/     General architecture support classes | 
|---|
| 100 | * TArray/        Template numerical arrays, vectors and matrices | 
|---|
| 101 | * HiStats/       Histogram-ming and data set handling classes | 
|---|
| 102 | * NTools/        Some standard numerical analysis tools | 
|---|
| 103 | * SUtils/        Utility classes and functions | 
|---|
| 104 | * SysTools/      Interface to various services provided by the operating system | 
|---|
| 105 | * SkyMap/        Local and full sky maps | 
|---|
| 106 | * SkyT/          Spectral emission and detector frequency response modelling | 
|---|
| 107 | * Samba/         Miscellaneous classes (TOD analysis, Spherical Harmonics, ...) | 
|---|
| 108 |  | 
|---|
| 109 | Modules using external library | 
|---|
| 110 | * FitsIOServer/  FITS format file I/O (interface with cfitsio library) | 
|---|
| 111 | * LinAlg/        Interface with Lapack linear algebra package | 
|---|
| 112 | * IFFTW/         Interface with FFTW package | 
|---|
| 113 | * XAstroPack/    Interface with astronomy library (XEphem) | 
|---|
| 114 | The XEphem library code is in the SOPHYA module XephemAstroLib | 
|---|
| 115 |  | 
|---|
| 116 | * XephemAstroLib/ The code of the external XEphem astronomy library, extracted from XEphem | 
|---|
| 117 |  | 
|---|
| 118 | Modules with main programs | 
|---|
| 119 | * Tests/         Simple test programs | 
|---|
| 120 |  | 
|---|
| 121 | * PMixer/        skymixer and utility main programs | 
|---|
| 122 |  | 
|---|
| 123 | * PrgUtil/       Utility main programs | 
|---|
| 124 |  | 
|---|
| 125 | * PrgMap/        Utility main programs for sky map manipulation | 
|---|
| 126 |  | 
|---|
| 127 | PI/piapp GUI and interactive analysis framework | 
|---|
| 128 |  | 
|---|
| 129 | * PI/            GUI class library and application framework | 
|---|
| 130 | * PIGcont/       PI contour drawer | 
|---|
| 131 | * PIext/         specific GUI objects for SOPHYA classes and piapp framework | 
|---|
| 132 | * ProgPI/        interactive analysis tool using SOPHYA, PI PIGCont and PIext | 
|---|
| 133 |  | 
|---|
| 134 |  | 
|---|
| 135 | ================================================ | 
|---|
| 136 | D/ How to use Sophya libraries and/or programs : | 
|---|
| 137 | ================================================ | 
|---|
| 138 |  | 
|---|
| 139 | 1./ Set the Sophya environment variable : | 
|---|
| 140 | that is the repository where the libraries and the programs stand, | 
|---|
| 141 | for example: | 
|---|
| 142 | > setenv SOPHYABASE /home/.../SophyaWork | 
|---|
| 143 |  | 
|---|
| 144 | ..Remark: | 
|---|
| 145 | The choice of the name is up to you, but if you want | 
|---|
| 146 | to use versions on different operating systems (or compilators) | 
|---|
| 147 | the "SOPHYABASE" repository must be different, for example: | 
|---|
| 148 | > setenv SOPHYABASE /home/.../SophyaWork_Linux_gcc2.95 | 
|---|
| 149 | > setenv SOPHYABASE /home/.../SophyaWork_Linux_gcc4 | 
|---|
| 150 | > setenv SOPHYABASE /home/.../SophyaWork_OSF1_cxx | 
|---|
| 151 | > setenv SOPHYABASE /home/.../SophyaWork_OSF1_gcc | 
|---|
| 152 | > ... | 
|---|
| 153 |  | 
|---|
| 154 | So you will find: | 
|---|
| 155 | ..shared libraries   in:  $SOPHYABASE/slb | 
|---|
| 156 | ..archived libraries in:  $SOPHYABASE/lib | 
|---|
| 157 | (you will probably prefer to use the shared versions of the libraries) | 
|---|
| 158 | ..programs           in:  $SOPHYABASE/exe | 
|---|
| 159 | ..include files      in:  $SOPHYABASE/include | 
|---|
| 160 | (you will only need it if you write code using sophya libraries) | 
|---|
| 161 | ..object files       in:  $SOPHYABASE/obj | 
|---|
| 162 | (you probably should not have to use it) | 
|---|
| 163 |  | 
|---|
| 164 | 2./ Using Sophya shared libraries: | 
|---|
| 165 | As you would do for any software, | 
|---|
| 166 | add the repository name of Sophya shared libraries to LD_LIBRARY_PATH | 
|---|
| 167 | > setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${SOPHYABASE}/slb | 
|---|
| 168 |  | 
|---|
| 169 | 3./ Using Sophya programs: | 
|---|
| 170 | As you would do for any software, | 
|---|
| 171 | add the repository name of Sophya programs to PATH | 
|---|
| 172 | > setenv PATH ${PATH}:${SOPHYABASE}/exe | 
|---|
| 173 | then recomputed the internal hash table for executables | 
|---|
| 174 | > rehash | 
|---|
| 175 |  | 
|---|
| 176 | 4./ Using external libraries which are wrapped in Sophya external modules: | 
|---|
| 177 | Sophya is presently using the archived version of the external libraries | 
|---|
| 178 | so nothing special have to be done. | 
|---|
| 179 |  | 
|---|
| 180 | 5./ Making your own programs: | 
|---|
| 181 | If you are writing code using Sophya you may like to | 
|---|
| 182 | "include $(SOPHYABASE)/include/sophyamake.inc" | 
|---|
| 183 | in your own Makefile. | 
|---|
| 184 | That will provide you with default variables for the libraries repositories | 
|---|
| 185 | and names as well as standard compilation and link options for | 
|---|
| 186 | various current OS and compilators. | 
|---|
| 187 | (please see: > more $SOPHYABASE/include/sophyamake.inc ) | 
|---|
| 188 | That is JUST AN HELP that Sophya provides, you may prefer | 
|---|
| 189 | to deal YOURSELF with libraires path/names and compiler/linker options. | 
|---|