Revision 1503 trunk/scripts/admb/admb

admb (revision 1503)
63 63
  case $A in
64 64
    d)
65 65
       dll=-dll
66
       SHARED=-shared
66 67
       ;;
67 68
    g)
68 69
       debug=-debug
......
130 131
  LDFLAGS="$LDFLAGS"
131 132
fi
132 133
if [ ! -z "$dll" ]; then
133
  CXXFLAGS="$CXXFLAGSS"
134
  CXXFLAGS="-fPIC $CXXFLAGSS"
134 135
  LDFLAGS="-shared $LDFLAGS"
135 136
fi
136 137
if [ ! -z "$debug" ]; then
......
247 248
  CMD="$CMD $file $objs"
248 249
  if [ ! -f "$ADMB_HOME/contrib/lib/libcontrib.a" ]; then
249 250
    if [[ "$library" == "opt" ]]; then
250
      CMD="$CMD \"$ADMB_HOME/lib/libadmbo.a\""
251
      CMD="$CMD \"$ADMB_HOME/lib/libadmbo$SHARED.a\""
251 252
    else
252
      CMD="$CMD \"$ADMB_HOME/lib/libadmb.a\""
253
      CMD="$CMD \"$ADMB_HOME/lib/libadmb$SHARED.a\""
253 254
    fi
254 255
  else
255 256
    if [[ "$library" == "opt" ]]; then
256
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo.a\" \"$ADMB_HOME/lib/libadmbo.a\""
257
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo$SHARED.a\" \"$ADMB_HOME/lib/libadmbo$SHARED.a\""
257 258
    else
258
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib.a\" \"$ADMB_HOME/lib/libadmb.a\""
259
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib$SHARED.a\" \"$ADMB_HOME/lib/libadmb$SHARED.a\""
259 260
    fi
260 261
  fi
261 262
  echo -e \\n\*\*\* Linking: $file $objs\\n$CMD
......
300 301
  CMD="$CMD $listobjs"
301 302
  if [ ! -f "$ADMB_HOME/contrib/lib/libcontrib.a" ]; then
302 303
    if [[ "$library" == "opt" ]]; then
303
      CMD="$CMD \"$ADMB_HOME/lib/libadmbo.a\""
304
      CMD="$CMD \"$ADMB_HOME/lib/libadmbo$SHARED.a\""
304 305
    else
305
      CMD="$CMD \"$ADMB_HOME/lib/libadmb.a\""
306
      CMD="$CMD \"$ADMB_HOME/lib/libadmb$SHARED.a\""
306 307
    fi
307 308
  else
308 309
    if [[ "$library" == "opt" ]]; then
309
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo.a\" \"$ADMB_HOME/lib/libadmbo.a\""
310
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo$SHARED.a\" \"$ADMB_HOME/lib/libadmbo$SHARED.a\""
310 311
    else
311
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib.a\" \"$ADMB_HOME/lib/libadmb.a\""
312
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib$SHARED.a\" \"$ADMB_HOME/lib/libadmb$SHARED.a\""
312 313
    fi
313 314
  fi
314 315
  echo -e \\n\*\*\* Linking: $listobjs\\n$CMD

Also available in: Unified diff