Revision 528

tags/admb-11/VERSION (revision 528)
1
11
tags/admb-11/scripts/CC/adlink-64bit (revision 528)
1
#!/bin/bash
2
shopt -s expand_aliases
3
alias help='echo -e "Usage: adlink [-d] [-r] [-s] model\n
4
Link AD Model Builder object code to executable.\n
5
  -d creates DLL
6
  -r creates ADMB-RE
7
  -s uses safe bounds and debugging symbols
8
  model is the filename prefix, e.g. simple\n"'
9
if [[ "$1" == "" ]]; then help; exit; fi
10
if [[ "$1" == "-help" ]]; then help; exit; fi
11
if [[ "$1" == "--help" ]]; then help; exit; fi
12
###########################################################################################################################
13
###                                                                                                                       #
14
### Script:   adlink [-d] [-r] [-s] model                                                                                 #
15
###                                                                                                                       #
16
### Purpose:  Link ADMB object code to executable                                                                         #
17
###                                                                                                                       #
18
### Args:     -d creates DLL                                                                                              #
19
###           -r creates ADMB-RE                                                                                          #
20
###           -s uses safe bounds and debugging symbols                                                                   #
21
###           model is the filename prefix, e.g. simple                                                                   #
22
###                                                                                                                       #
23
### Requires: ADMB libraries, g++                                                                                         #
24
###                                                                                                                       #
25
### Returns:  Creates executable or DLL with same prefix                                                                  #
26
###                                                                                                                       #
27
### History:  23 May 2009  Arni Magnusson created                                                                         #
28
###                                                                                                                       #
29
###########################################################################################################################
30

  
31
# Pop args until model=$1
32
unset re
33
s=-s
34
unset shared
35
df1b2lib=-ldf1b2stub
36
adlib=-lado
37
while getopts "drs" A; do
38
  case $A in
39
    d) shared=-shared;;
40
    r) re=true;;
41
    s) unset s; adlib=-lads;;
42
  esac
43
done
44
shift $[OPTIND-1]
45
if [[ -z $shared ]] ; then out="-o $1" ; else out="-o $1.so" ; fi
46

  
47
if [ -n $re ] ; then
48
  if [ "$adlib" = "-lado" ] ; then
49
    df1b2lib=-ldf1b2o;
50
  else
51
    df1b2lib=-ldf1b2s;
52
  fi
53
fi
54

  
55
CC $1.o -m64 -L$ADMB_HOME/lib -ladmod -ladt $adlib $df1b2lib -ladmod -ladt $adlib $df1b2lib -o $1
0 56

  
tags/admb-11/scripts/CC/adcomp-64bit (revision 528)
1
#!/bin/bash
2
shopt -s expand_aliases
3
alias help='echo -e "Usage: adcomp [-d] [-r] [-s] model\n
4
Compile AD Model Builder C++ to object code.\n
5
  -d     Create object file for DLL
6
  -r     Create object file for ADMB-RE
7
  -s     Create object file with safe bounds and debugging symbols
8
  model  Filename prefix, e.g. simple\n"'
9
if [[ "$1" == "" ]]; then help; exit; fi
10
if [[ "$1" == "-help" ]]; then help; exit; fi
11
if [[ "$1" == "--help" ]]; then help; exit; fi
12
###########################################################################################################################
13
###                                                                                                                       #
14
### Script:   adcomp [-d] [-r] [-s] model                                                                                 #
15
###                                                                                                                       #
16
### Purpose:  Compile ADMB C++ to object code                                                                             #
17
###                                                                                                                       #
18
### Args:     -d creates object file for DLL                                                                              #
19
###           -r creates object file for ADMB-RE                                                                          #
20
###           -s creates object file with safe bounds and debugging symbols                                               #
21
###           model is the filename prefix, e.g. simple                                                                   #
22
###                                                                                                                       #
23
### Requires: ADMB header files, g++                                                                                      #
24
###                                                                                                                       #
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff