Last change
on this file since 67 was
66,
checked in by ymipsl, 15 years ago
|
ajout trunk xmlioserver
YM
|
-
Property svn:executable set to
*
|
File size:
1.4 KB
|
Line | |
---|
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_CFLAGS="%PROD_CFLAGS" |
---|
55 | COMPIL_FFLAGS="%PROD_FFLAGS" |
---|
56 | elif [[ "$compil_mode" == "dev" ]] |
---|
57 | then |
---|
58 | COMPIL_CFLAGS="%DEV_CFLAGS" |
---|
59 | COMPIL_FFLAGS="%DEV_FFLAGS" |
---|
60 | elif [[ "$compil_mode" == "debug" ]] |
---|
61 | then |
---|
62 | COMPIL_CFLAGS="%DEBUG_CFLAGS" |
---|
63 | COMPIL_FFLAGS="%DEBUG_FFLAGS" |
---|
64 | fi |
---|
65 | |
---|
66 | rm -f config.fcm |
---|
67 | |
---|
68 | echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> config.fcm |
---|
69 | echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm |
---|
70 | |
---|
71 | fcm build |
---|
Note: See
TracBrowser
for help on using the repository browser.