Revision 932

trunk/scripts/admb/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

  
trunk/scripts/admb/adcomp.bat (revision 932)
23 23
set model=%~n1
24 24
if defined CXXFLAGS (set CXXFLAGS=%CXXFLAGS% )
25 25

  
26
set CMD=g++ -c %CXXFLAGS%%sym% -Wno-deprecated -D__GNUDOS__ %dll%-Dlinux %opt%^
27
 -DUSE_LAPLACE -fpermissive -I. -I"%ADMB_HOME%\include" -I"%ADMB_HOME%\contrib" -o %model%.obj^
28
 %model%.cpp
26
set CMD=g++ -c %CXXFLAGS% %sym% -D__GNUDOS__ %dll% -Dlinux %opt% -DUSE_LAPLACE -fpermissive -I. -I"%ADMB_HOME%\include" -I"%ADMB_HOME%\contrib" -o %model%.obj %model%.cpp
29 27
echo %CMD%
30 28
%CMD%
31 29

  
trunk/scripts/admb/admb.bat (revision 932)
53 53
if not defined parser set parser=tpl2cpp
54 54

  
55 55
for %%a in (!tpls!) do (
56
  set model=%%~na
56 57
  if not exist %%~na.tpl goto ERROR1
57
  set model=%%~na
58 58
  del classdef.tmp xxdata.tmp xxhtop.tmp xxhtopm.tmp xxglobal.tmp xxtopm.tmp 2> NUL
59 59
  del xxalloc.tmp xxalloc1.tmp xxalloc2.tmp xxalloc3.tmp xxalloc4.tmp xxalloc5.tmp xxalloc6.tmp header.tmp 2> NUL
60 60
  del tfile1 tfile2 tfile3 tfile4 tfile5 2> NUL
......
117 117

  
118 118
:ERROR2
119 119
echo.&echo Error: Could not parse !model!.tpl
120
pwd
120 121
goto EOF
121 122

  
122 123
:EOF

Also available in: Unified diff