4 ###########################################################################
6 # Files associated to each mode
7 DEBUG_FILE
=$RYZOM_PATH/.mode_debug
8 #RELEASE_FILE=$RYZOM_PATH/.mode_release
9 STATIC_FILE
=$RYZOM_PATH/.mode_static
10 DYNAMIC_FILE
=$RYZOM_PATH/.mode_dynamic
11 SILENT_FILE
=$RYZOM_PATH/.mode_silent
14 ###########################################################################
19 echo "Compilation modes :"
21 echo " Debug mode : $DEBUG_MODE"
22 # echo " Release mode : $RELEASE_MODE"
24 echo " Static linking : $STATIC_MODE"
25 echo " Dynamic linking : $DYNAMIC_MODE"
27 echo " Silent compilation : $SILENT_MODE"
32 ###########################################################################
33 # Get the specific mode value and set the corresponding variable
48 ###########################################################################
49 # Set a specific mode to ON if it's OFF, and to OFF if its ON
55 # Get the current mode value
56 OLD_VALUE
=$
(eval echo \$
$VAR)
58 if test X
"$OLD_VALUE" = "XOFF"
60 # Set the MODE to ON in case it's OFF
62 touch -f $FILE ||
(echo "Error : cannot create mode files" && exit 1)
64 # Set the MODE to OFF in case it's ON
66 rm -f $FILE ||
(echo "Error : cannot delete mode files" && exit 1)
73 ###########################################################################
78 echo "Usage: `basename $0` [debug] [static] [dynamic] [silent]"
79 echo " debug -> turn ON/OFF debug compilation"
80 echo " static -> turn ON/OFF static linking"
81 echo " dynamic -> turn ON/OFF dynamic linking"
82 echo " slient -> turn ON/OFF silent compilation"
87 ###########################################################################
89 # Get the mode settings
90 getMode DEBUG_MODE
$DEBUG_FILE
91 #getMode RELEASE_MODE $RELEASE_FILE
92 getMode STATIC_MODE
$STATIC_FILE
93 getMode DYNAMIC_MODE
$DYNAMIC_FILE
94 getMode SILENT_MODE
$SILENT_FILE
96 # Print the mode values and exit if there is no argument
108 setMode DEBUG_MODE
$DEBUG_FILE
112 # setMode RELEASE_MODE $RELEASE_FILE
116 setMode STATIC_MODE
$STATIC_FILE
120 setMode DYNAMIC_MODE
$DYNAMIC_FILE
124 setMode SILENT_MODE
$SILENT_FILE
127 *) echo "Error : $1 : Unknown argument"