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