Revision 1461 trunk/scripts/admb/admb

admb (revision 1461)
149 149
else
150 150
  CXXFLAGS="$CXXFLAGS -DSAFE_ALL"
151 151
fi
152
CXXFLAGS="$CXXFLAGS -D__GNUDOS__ -Dlinux -DUSE_LAPLACE -I. -I\"$ADMB_HOME/include\" -I\"$ADMB_HOME/contrib/include\""
152
if [ ! -f "$ADMB_HOME/contrib/lib/libcontrib.a" ]; then
153
  CXXFLAGS="$CXXFLAGS -D__GNUDOS__ -Dlinux -DUSE_LAPLACE -I. -I\"$ADMB_HOME/include\" -I\"$ADMB_HOME/include/contrib\""
154
else
155
  CXXFLAGS="$CXXFLAGS -D__GNUDOS__ -Dlinux -DUSE_LAPLACE -I. -I\"$ADMB_HOME/include\" -I\"$ADMB_HOME/contrib/include\""
156
fi
153 157
if [ "$CXX" == "adcomp-x86_64-w64-mingw32" ]; then
154 158
  LDFLAGS="--static $LDFLAGS"
155 159
fi
......
240 244
    CMD="$CXX $LDFLAGS -o$model"
241 245
  fi
242 246
  CMD="$CMD $file $objs"
243
  if [[ "$library" == "opt" ]]; then
244
    CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo.a\" \"$ADMB_HOME/lib/libadmbo.a\""
247
  if [ ! -f "$ADMB_HOME/contrib/lib/libcontrib.a" ]; then
248
    if [[ "$library" == "opt" ]]; then
249
      CMD="$CMD \"$ADMB_HOME/lib/libadmbo.a\""
250
    else
251
      CMD="$CMD \"$ADMB_HOME/lib/libadmb.a\""
252
    fi
245 253
  else
246
    CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib.a\" \"$ADMB_HOME/lib/libadmb.a\""
254
    if [[ "$library" == "opt" ]]; then
255
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo.a\" \"$ADMB_HOME/lib/libadmbo.a\""
256
    else
257
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib.a\" \"$ADMB_HOME/lib/libadmb.a\""
258
    fi
247 259
  fi
248 260
  echo -e \\n\*\*\* Linking $file $objs:\\n$CMD
249 261
  eval $CMD
......
285 297
    CMD="$CXX $LDFLAGS -o$outputfilebasename"
286 298
  fi
287 299
  CMD="$CMD $listobjs"
288
  if [[ "$library" == "opt" ]]; then
289
    CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo.a\" \"$ADMB_HOME/lib/libadmbo.a\""
300
  if [ ! -f "$ADMB_HOME/contrib/lib/libcontrib.a" ]; then
301
    if [[ "$library" == "opt" ]]; then
302
      CMD="$CMD \"$ADMB_HOME/lib/libadmbo.a\""
303
    else
304
      CMD="$CMD \"$ADMB_HOME/lib/libadmb.a\""
305
    fi
290 306
  else
291
    CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib.a\" \"$ADMB_HOME/lib/libadmb.a\""
307
    if [[ "$library" == "opt" ]]; then
308
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontribo.a\" \"$ADMB_HOME/lib/libadmbo.a\""
309
    else
310
      CMD="$CMD \"$ADMB_HOME/contrib/lib/libcontrib.a\" \"$ADMB_HOME/lib/libadmb.a\""
311
    fi
292 312
  fi
293 313
  echo -e \\n\*\*\* Linking $listobjs:\\n$CMD
294 314
  eval $CMD

Also available in: Unified diff