Revision 1114 trunk/scripts/admb/adlink

adlink (revision 1114)
11 11
if [[ "$1" == "-help" ]]; then help; exit; fi
12 12
if [[ "$1" == "--help" ]]; then help; exit; fi
13 13

  
14
if [ -f "$ADMB_HOME/bin/admb-cfg.sh" ]; then
15
  source "$ADMB_HOME/bin/admb-cfg.sh"
16
else
17
  CXX=c++
18
fi
19

  
20
if [ "$CXX" == "openCC" ]; then
21
  sym=-O2
22
else
23
  sym=-O3
24
fi
25

  
14 26
unset shared
15
sym=
16 27
opt=
17 28
while getopts "dgrso" A; do
18 29
  case $A in
19 30
    d) shared=-shared;;
20
    g) unset sym;;
31
    g) sym=-g;;
21 32
    r) ;;
22 33
    s) ;;
23 34
    o) opt=o;;
......
25 36
done
26 37
shift $((OPTIND-1))
27 38

  
28
if [[ "`uname -s`" == "Darwin" ]]; then unset sym; fi
39
#if [[ "`uname -s`" == "Darwin" ]]; then unset sym; fi
29 40

  
30 41
model="${1%.*}"
31 42

  
......
40 51
  fi 
41 52
done
42 53

  
43
if [ -f "$ADMB_HOME/bin/admb-cfg.sh" ]; then
44
  source "$ADMB_HOME/bin/admb-cfg.sh"
45
else
46
  CXX=c++
47
fi
48

  
49 54
LDFLAGS="$LDFLAGS"
50 55
if [ ! -z "$sym" ]; then
51 56
  LDFLAGS="$LDFLAGS $sym"

Also available in: Unified diff