Changeset 3210 in Sophya for trunk


Ignore:
Timestamp:
Apr 11, 2007, 3:23:47 PM (18 years ago)
Author:
ansari
Message:

Suite ajout options configure (-nothsafe -compopt -noPI ...) , prise en charge des options -arch64 (-64 -q64) et -slballinone par configure/propagation vers sophyamake.inc, Reza 11/04/2007

Location:
trunk/SophyaLib/BuildMgr
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BuildMgr/AIX_xlC_make.inc

    r3013 r3210  
    1919#  Def compilateur C et flags
    2020CC = xlc
    21 CFLAGS = -O -g
     21# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
     22CFLAGS = -O -g  CNFPHFLF
    2223#  Def compilateur C++ et flags
    2324CXX =  xlC
     
    2526#  -qrtti=all : generate all RTTI infomation dynamic_cast + typeinfo
    2627#  -qeh=v6 : Exception handling compatible with v6
    27 CXXFLAGS = -qrtti=all -qeh=v6 -O -g
     28CXXFLAGS = -qrtti=all -qeh=v6 -O -g CNFPHFLF
    2829# flags specifiques pour templates repository...
    2930# CXXTEMPFLG = -qtemplateregistry=$(SOPHYAOBJP)/templateregistry -qtemplaterecompile
    3031CXXTEMPFLG =
    3132#  Compilo fortran
    32 FC = xlf
     33FC = xlf CNFPHFLF
    3334FFLAGS = 
    3435# Pour fabriquer les lib .a
     
    5859
    5960SOPHYASLBLIST = -L$(SOPHYASLBP) -lsophya  $(SOPBASELIBS)
    60 # SOPHYAEXTSLBLIST = -L$(SOPHYASLBP) -lextsophya -lsophya $(SOPEXTLIBS) $(SOPBASELIBS)
    61 # SOPHYAALLSLBLIST = -L$(SOPHYALIBP) -lPIext -lPIGcont -lPI -L$(SOPHYASLBP) -lextsophya -lsophya $(PILIBS) $(SOPEXTLIBS) $(SOPBASELIBS)
    62 ### --- Pb sur AIX quand plusieurs shared libs sont utilisees
    63 SOPHYAEXTSLBLIST = -L$(SOPHYASLBP) -lAsophyaextPI  $(SOPBASELIBS) $(SOPEXTLIBS) $(SOPBASELIBS)
    64 SOPHYAALLSLBLIST = $(SOPHYAEXTSLBLIST)
     61SOPHYAEXTSLBLIST = -L$(SOPHYASLBP) -lextsophya -lsophya $(SOPEXTLIBS) $(SOPBASELIBS)
     62SOPHYAALLSLBLIST = -L$(SOPHYASLBP) -lPI -lextsophya -lsophya $(PILIBS) $(SOPEXTLIBS) $(SOPBASELIBS)
     63### --- Pb sur AIX quand plusieurs shared libs sont utilisees -> remplacement par -lAsophyaextPI
     64## SOPHYAEXTSLBLIST = -L$(SOPHYASLBP) -lAsophyaextPI  $(SOPBASELIBS) $(SOPEXTLIBS) $(SOPBASELIBS)
     65## SOPHYAALLSLBLIST = $(SOPHYAEXTSLBLIST)
     66### ---------------------
    6567
    6668#  Commande de link pour creation d'executables
  • trunk/SophyaLib/BuildMgr/Darwin_g++_make.inc

    r2912 r3210  
    1313#  Def compilateur C et flags
    1414CC = cc
    15 CFLAGS = -fno-common -g -fPIC
     15# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
     16CFLAGS = -fno-common -g -fPIC CNFPHFLF
    1617#  With optimization flags
    17 # CFLAGS = -fno-common -g -fastf -mtune=G5 -fPIC
     18#  CFLAGS = -fno-common -g -fastf -mtune=G5 -fPIC
    1819#  Def compilateur C++ et flags
    1920CXX =  c++
    20 CXXFLAGS = -fno-common -g -fPIC
     21CXXFLAGS = -fno-common -g -fPIC  CNFPHFLF
    2122# CXXFLAGS = -fno-common -g -fastf -mtune=G5 -fPIC
    2223# flags specifiques pour templates repository...
  • trunk/SophyaLib/BuildMgr/IRIX64_CC_make.inc

    r3094 r3210  
    1515#  Def compilateur C et flags
    1616CC = cc
    17 CFLAGS = -64 -O -g
     17# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
     18CFLAGS = -O -g CNFPHFLF
    1819#  Def compilateur C++ et flags
    1920CXX =  CC
    20 CXXFLAGS = -64 -prelink -LANG:std -O -g
     21CXXFLAGS = -prelink -LANG:std -O -g CNFPHFLF
    2122# flags specifiques pour templates repository...
    2223CXXTEMPFLG =
    2324#  Compilo fortran / commande et flags a verifier
    2425FC = f90
    25 FFLAGS = -64
     26FFLAGS = CNFPHFLF
    2627# Pour fabriquer les lib .a
    2728AR = /usr/bin/ar
  • trunk/SophyaLib/BuildMgr/Linux_g++_make.inc

    r3130 r3210  
    1313#  Def compilateur C et flags
    1414CC = gcc
    15 CFLAGS = -Wall -Wpointer-arith -Wmissing-prototypes -O -g
     15# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
     16CFLAGS = -Wall -Wpointer-arith -Wmissing-prototypes -O -g -fPIC  CNFPHFLF
    1617#  Def compilateur C++ et flags
    1718CXX =  g++
    18 CXXFLAGS = -Wall -Wpointer-arith -Wsynth -O -g
     19CXXFLAGS = -Wall -Wpointer-arith -Wsynth -O -g -fPIC  CNFPHFLF
    1920# flags specifiques pour templates repository...
    2021CXXTEMPFLG =
  • trunk/SophyaLib/BuildMgr/Linux_icc_make.inc

    r2910 r3210  
    1313#  Def compilateur C et flags
    1414CC = icc
    15 CFLAGS = -fpic -O -g
     15# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
     16CFLAGS = -fpic -O -g  CNFPHFLF
    1617#  Def compilateur C++ et flags
    1718CXX =  icpc
    18 CXXFLAGS = -fpic -O -frtti -g
     19CXXFLAGS = -fpic -O -frtti -g  CNFPHFLF
    1920CXXREP =
    2021#  Compilo fortran
  • trunk/SophyaLib/BuildMgr/OSF1_cxx_make.inc

    r2910 r3210  
    1313#  Def compilateur C et flags
    1414CC = cc
    15 CFLAGS = -O -pthread -g1
     15# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
     16CFLAGS = -O -pthread -g1  CNFPHFLF
    1617#  Def compilateur C++ et flags
    1718CXX =  cxx
    18 CXXFLAGS = -O -pthread -g1 -no_implicit_include
     19CXXFLAGS = -O -pthread -g1 -no_implicit_include  CNFPHFLF
    1920# flags specifiques pour templates repository...
    2021CXXTEMPFLG = -ptr $(SOPHYAOBJP)/cxxrep/
    2122#  Compilo fortran
    22 FC = f77
     23FC = f77 CNFPHFLF
    2324FFLAGS = 
    2425# Pour fabriquer les lib .a
  • trunk/SophyaLib/BuildMgr/configure

    r3202 r3210  
    22#  SOPHYA configuration managment script
    33#  C. Magneville / R. Ansari   -      Mai 2005
     4#     Updated : 2006, Avr/Mai 2007
    45# Exemple: ./configure -sbase /laltmp/ansari/sbase/ -scxx cxx -extp /exp/planck/ExtLibs/Include/ \
    56#              -extp /exp/planck/ExtLibs/OSF1-cxx/
     
    3839unset incln
    3940unset mincname
     41set compopt
    4042unset arch64
    4143unset sasz64
    4244unset nofpic
     45unset nothsafe
    4346unset boundcheck
    4447unset sodebug
    4548unset usefftw2
    4649unset uselapack2
    47 unset singleslb
     50unset slballinone
    4851while ( $#argv > 0 )
    4952
    5053if( "$1" == "-h" ) then
    51   echo 'configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] [-minc mymake.inc] '
    52   echo '  [-arch64] [-sasz64] [-nofpic] [-boundcheck] [-sodebug]'
     54  echo 'configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] '
     55  echo "  [-minc mymake.inc]  [-compopt 'cc/cxxOptions'] "
     56  echo '  [-arch64] [-sasz64] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]'
    5357  echo '  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]'
    54   echo '  [-noextlib -noext fits -noext fftw -noext lapack -noext astro]'
    55   echo '  [-usefftw2 -uselapack2] [-singleslb]'
     58  echo '  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]'
     59  echo '  [-noPI] [-slballinone]'
     60  echo '  [-usefftw2 -uselapack2] '
     61  echo '  (See SOPHYA manual/web pages for a detailed description of configure options)'
    5662  exit -1
    5763endif
     
    6975if( "$1" == "-minc" ) then
    7076  set mincname = ( $2 )
     77  shift
     78endif
     79if( "$1" == "-compopt" ) then
     80  set spcompopt = ( $2 )
    7181  shift
    7282endif
     
    97107  end
    98108  shift
     109endif
     110if( "$1" == "-PI" ) then
     111  set SOPPIOK = ( 0 0 0 )
    99112endif
    100113if( "$1" == "-usefftw2" ) then
     
    115128  set uselapack2
    116129endif
    117 if( "$1" == "-singleslb" ) then
     130if( "$1" == "-slballinone" ) then
    118131# Pour utiliser une seule librairie libsophyaPIext.so au lieu
    119132#   des 3 libsophya.so libextsophya.so libPI.so
    120   set singleslb
     133  set slballinone
    121134endif
    122135#  Decodage options pour flags de machdefs.h
     
    130143if( "$1" == "-nofpic" ) then
    131144  set nofpic
     145endif
     146if( "$1" == "-nothsafe" ) then
     147  set nothsafe
    132148endif
    133149if( "$1" == "-boundcheck" ) then
     
    396412
    397413echo " " >> $mfile
    398 cat $mincname >> $mfile 
     414cat $mincname >> $mfile
     415
     416# --- Gestion des flags modifiants les options de compilation et liste de librairies (par sed)
     417set sprgfile = $TMPDIR/compop.scom 
     418set scmd = "s/CNFPHFLF/ $compopt/g"
     419if ($?arch64) then
     420  set a64cf = ' '
     421  if ( "$sname" == "IRIX64" ) &&  ("$SOPHYACXX" == "CC" ) set a64cf = '-64'
     422  if ( "$sname" == "AIX" ) && ( ("$SOPHYACXX" == "xlC" ) || ("$SOPHYACXX" == "xlc" ) )
     423    set a64cf = '-q64'
     424set scmd = "s/CNFPHFLF/$a64cf $compopt/g"
     425endif
     426echo $scmd > $sprgfile
     427if ( $?nofpic ) echo "s/-fPIC/ /g" >>  $sprgfile
     428if( $?slballinone ) then
     429  echo "s/-lPI -lextsophya -lsophya/-lAsophyaextPI/" >>  $sprgfile
     430  echo "s/-lextsophya -lsophya/-lAsophyaextPI/" >>  $sprgfile
     431endif
     432set scmd = "sed -f $sprgfile"
     433set mftmp = $TMPDIR/sopmake.inc
     434cp $mfile $mftmp
     435sed -f $sprgfile $mftmp >   $mfile
     436rm -f $sprgfile $mftmp
     437# --- FIN de gestion des flags modifiants les options de compilation (par sed)
    399438
    400439rm -f $mfile:t
     
    418457echo "#endif" >> $mdefname
    419458
     459## Definition de flags de compilation en fonction des options de configure
    420460if ( $?arch64 )  echo "#define SO_ARCH64  1" >> $mdefname
     461if ( $?sasz64 )  echo "#define SO_SASIZET64  1" >> $mdefname
    421462if ( $?nofpic )  echo "#define SO_NOFPIC  1" >> $mdefname
    422 if ( $?sasz64 )  echo "#define SO_SASIZET64  1" >> $mdefname
     463if ( $?nothsafe )  echo "#define SO_NOTHSAFE  1" >> $mdefname
    423464if ( $?boundcheck )  echo "#define SO_BOUNDCHECKING  1" >> $mdefname
    424465if ( $?sodebug )  echo "#define SOPHYA_DEBUG  1" >> $mdefname
    425466
    426467if ( "$sname" == "IRIX64" ) then
    427 #  SGI_ARCH64 : compile avec -64 (en 64 bits)
    428   echo "#define SGI_ARCH64 1 /* Compile avec -64 */" >> $mdefname
    429468  if ( "$SOPHYACXX" == "CC" ) then
    430469#  __SGICC__ : flag indiquant que c'est le compilo CC de SGI
     
    478517echo " " >> $sinc/sspvflags.h
    479518echo "/*------ Use of single shared lib for SOPHYA+extlibs+PI ---- */" >> $sinc/sspvflags.h
    480 if( $?singleslb ) then
    481   echo "#define SINGLESLB_SOPHYA_PI_EXT" >> $sinc/sspvflags.h
     519if( $?slballinone ) then
     520  echo "#define SO_SLBALLINONE " >> $sinc/sspvflags.h
    482521endif
    483522echo " " >> $sinc/sspvflags.h
     
    516555echo " 7.c/ Creating $objlistname "
    517556rm -f $objlistname ; touch $objlistname
    518 foreach d ( $SOPPI )
     557set i = 0
     558while ( $i < $#SOPPI )
     559  @ i += 1
     560  set d = $SOPPI[$i]
    519561  rm -f $sconf/$d.conf
     562  if( $SOPPIOK[$i] <= 0 ) continue
    520563  if ( ! -d ../$d ) continue
    521564  cat ../$d/objlist.list >> $objlistname
Note: See TracChangeset for help on using the changeset viewer.