source: XMLIO_V2/dev/common/make_xios @ 279

Last change on this file since 279 was 274, checked in by hozdoba, 13 years ago

nouvelle interface fortran et corrections

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/bash
2
3install_dir=$PWD
4
5# Traitement de la ligne de commande
6while (($# > 0))
7   do
8      case $1 in
9         "-h")
10            # A modifier
11            exit;;
12
13         "--prod")  compil_mode="prod"  ; shift ;;
14         "--dev")   compil_mode="dev"   ; shift ;;
15         "--debug") compil_mode="debug" ; shift ;;
16         "--arch")  arch=$2     ; shift ; shift ;;
17         "--doc")   doc="true"          ; shift ;;
18         *)         code="$1"           ; shift ;;
19      esac
20   done
21
22# Vérification de la présence d'un identifiant d'architecture.
23
24if [[ !(-z $arch) ]]
25   then
26      rm -f  $install_dir/arch.path
27      rm -f  $install_dir/arch.fcm
28      ln -s  $install_dir/arch/arch-${arch}.path $install_dir/arch.path
29      ln -s  $install_dir/arch/arch-${arch}.fcm  $install_dir/arch.fcm
30      source $install_dir/arch.path
31   else
32      echo "Veuillez definir une architecture cible !"
33      exit 1
34fi
35
36# Vérification de la présence d'un mode de compilation.
37
38if [[ "$compil_mode" == "prod" ]]
39   then
40      COMPIL_CFLAGS="%PROD_CFLAGS"
41      COMPIL_FFLAGS="%PROD_FFLAGS"
42elif [[ "$compil_mode" == "dev" ]]
43   then
44      COMPIL_CFLAGS="%DEV_CFLAGS"
45      COMPIL_FFLAGS="%DEV_FFLAGS"
46elif [[ "$compil_mode" == "debug" ]]
47   then
48      COMPIL_CFLAGS="%DEBUG_CFLAGS"
49      COMPIL_FFLAGS="%DEBUG_FFLAGS"
50else
51   echo "Veuillez definir un mode de compilation [debug|dev|prod] !"
52   exit 1
53fi
54
55XMLIO_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR"
56XMLIO_FINCDIR="$MPI_INCDIR"
57
58XMLIO_LIB="$NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB"
59
60rm -f config.fcm
61echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> config.fcm
62echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm
63
64echo "%CBASE_INC     $XMLIO_CINCDIR" >> config.fcm     
65echo "%FBASE_INC     $XMLIO_FINCDIR" >> config.fcm
66echo "%ARCH_LD       $XMLIO_LIB" >> config.fcm
67
68echo "=> Activation du mode "$compil_mode" pour la distribution sous l'architecture \""$arch"\" !"
69
70# Création de la documentation doxygen.
71if [[ !(-z $doc) ]]
72   then
73      echo -e "- Création de la documentation de code doxygen (désactivée)..."
74      #doxygen -s
75fi
76
77make_dir=$PWD
78
79export PATH=$PWD/tools/FCM/bin:$PATH
80
81#$make_dir/tools/preprocess_cpp $make_dir/src/xmlio/iface/interface.cpp      $make_dir/src/xmlio/iface/interface.cpp.in
82#$make_dir/tools/preprocess_f03 $make_dir/src/xmlio/fortran/ixmlioserver.f90 $make_dir/src/xmlio/fortran/ixmlioserver.f03.in
83
84fcm build
85
Note: See TracBrowser for help on using the repository browser.