Last change
on this file since 13 was
12,
checked in by ymipsl, 12 years ago
|
dynamico tree creation
YM
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[12] | 1 | #!/bin/bash |
---|
| 2 | set -x |
---|
| 3 | export PATH=$PWD/../tools/FCM/bin:$PATH |
---|
| 4 | |
---|
| 5 | compil_mode_defined="FALSE" |
---|
| 6 | compil_mode="prod" |
---|
| 7 | |
---|
| 8 | arch_defined="FALSE" |
---|
| 9 | arch="" |
---|
| 10 | |
---|
| 11 | while (($# > 0)) |
---|
| 12 | do |
---|
| 13 | case $1 in |
---|
| 14 | "-h") cat <<fin |
---|
| 15 | Usage : |
---|
| 16 | makegcm [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 |
---|
| 20 | fin |
---|
| 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 |
---|
| 38 | done |
---|
| 39 | |
---|
| 40 | if [[ "$arch_defined" == "TRUE" ]] |
---|
| 41 | then |
---|
| 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 |
---|
| 47 | else |
---|
| 48 | echo "Veuillez definir une architecture cible" |
---|
| 49 | exit 1 |
---|
| 50 | fi |
---|
| 51 | |
---|
| 52 | if [[ "$compil_mode" == "prod" ]] |
---|
| 53 | then |
---|
| 54 | COMPIL_FFLAGS="%PROD_FFLAGS" |
---|
| 55 | elif [[ "$compil_mode" == "dev" ]] |
---|
| 56 | then |
---|
| 57 | COMPIL_FFLAGS="%DEV_FFLAGS" |
---|
| 58 | elif [[ "$compil_mode" == "debug" ]] |
---|
| 59 | then |
---|
| 60 | COMPIL_FFLAGS="%DEBUG_FFLAGS" |
---|
| 61 | fi |
---|
| 62 | |
---|
| 63 | rm -f config.fcm |
---|
| 64 | |
---|
| 65 | echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm |
---|
| 66 | |
---|
| 67 | ./build |
---|
Note: See
TracBrowser
for help on using the repository browser.