source: codes/icosagcm/trunk/make_icosa @ 14

Last change on this file since 14 was 14, checked in by ymipsl, 12 years ago

some update

YM

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2set -x
3export PATH=$PWD/tools/FCM/bin:$PATH
4
5compil_mode_defined="FALSE"
6compil_mode="prod"
7
8arch_defined="FALSE"
9arch=""
10
11while (($# > 0))
12  do
13  case $1 in
14      "-h") cat <<fin
15Usage :
16makegcm [options] -m arch exec
17[-h]                       : help
18[-prod / -dev / -debug]    : compilation en mode production (default) / developpement / debug .
19 -arch nom_arch            : nom de l\'architecture cible
20fin
21          exit;;
22
23      "-prod")
24          compil_mode="prod" ; shift ;;
25
26      "-dev")
27          compil_mode="dev" ; shift ;;
28
29      "-debug")
30          compil_mode="debug" ; shift ;;
31
32      "-arch")
33          arch=$2 ; arch_defined="TRUE"; shift ; shift ;;
34
35      *)
36          code="$1" ; shift ;;
37  esac
38done
39
40if [[ "$arch_defined" == "TRUE" ]]
41then
42  rm -f arch.path
43  rm -f arch.fcm
44  ln -s arch/arch-${arch}.path ./arch.path
45  ln -s arch/arch-${arch}.fcm  ./arch.fcm
46  source arch.path
47else
48  echo "Veuillez definir une architecture cible"
49  exit 1
50fi
51
52if [[ "$compil_mode" == "prod" ]]
53then
54  COMPIL_FFLAGS="%PROD_FFLAGS"
55elif [[ "$compil_mode" == "dev" ]]
56then
57  COMPIL_FFLAGS="%DEV_FFLAGS"
58elif [[ "$compil_mode" == "debug" ]]
59then
60  COMPIL_FFLAGS="%DEBUG_FFLAGS"
61fi
62
63rm -f config.fcm
64
65echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm
66
67./build
Note: See TracBrowser for help on using the repository browser.