Revision 932 trunk/scripts/admb/adlink.bat

adlink.bat (revision 932)
7 7
if [%1]==[--help] goto HELP
8 8

  
9 9
rem Pop args until model=%1
10
set adlib=-lado
11
set df1b2lib=-ldf1b2o
12
set contriblib=-lcontribo
13
set linker=g++
14
set sym=-s & rem space
15
set i=0
16 10
set objects=
17

  
11
set sym=-s & rem space
12
set linker=g++
18 13
for %%a in (%*) do (
19 14
if %%~xa==.obj (
20 15
set objects=!objects! %%a
......
24 19
if %%a==-g set sym=
25 20
if %%a==-r set r=
26 21
if %%a==-s (
27
  set adlib=-lads
28
  set df1b2lib=-ldf1b2s
29
  set contriblib=-lcontribs
22
  set libs="%ADMB_HOME%\lib\libadmb.a" "%ADMB_HOME%\contrib\lib\libcontrib.a"
30 23
)
31 24
)
25
if not defined libs set libs="%ADMB_HOME%\lib\libadmbo.a" "%ADMB_HOME%\contrib\lib\libcontribo.a"
32 26

  
33
set def=
34 27
if %linker%==g++ (set out=-o %model%) else (set def=-def %model%.def^
35 28
 --driver-name g++ & set out=--output-lib lib%model%.a -o %model%.dll)
36 29

  
37
set CMD=%linker% %sym%-static %def% -L"%ADMB_HOME%\lib" -L"%ADMB_HOME%\contrib" %def% %objects% %df1b2lib% ^
38
-ladmod %contriblib% -ladt %adlib% %df1b2lib% -ladmod -ladt %contriblib% %adlib% %contriblib% %out%
30
set CMD=%linker% %sym% -static %def% %out% %objects% %libs%
39 31
echo %CMD%
40 32
%CMD%
41 33

  

Also available in: Unified diff