Revision 1351 trunk/scripts/admb/adcomp.bat

adcomp.bat (revision 1351)
6 6

  
7 7
rem Pop args until model=%1
8 8
set dll=
9
set opt=-DOPT_LIB
9
set safopt=-DSAFE_ALL
10 10
set sym=-O3
11 11
set i=0
12 12
:STARTLOOP
......
14 14
if %1==-d set dll=-DBUILDING_DLL & shift
15 15
if %1==-g set sym=-g& shift
16 16
if %1==-r shift
17
if %1==-s set opt=-DSAFE_ALL& shift
17
if %1==-f set safopt=-DOPT_LIB& shift
18 18
set /a i=%i%+1
19 19
if %i%==100 shift & set i=0 & echo.&echo Warning: illegal option %1 (discarded)
20 20
goto STARTLOOP
......
29 29
  set CXXFLAGS=%ADMB_CFG_CXXFLAGS%
30 30
)
31 31

  
32
set CMD=g++ -c %CXXFLAGS% %sym% -D__GNUDOS__ %dll% -Dlinux %opt% -DUSE_LAPLACE -fpermissive -I. -I"%ADMB_HOME%\include" -I"%ADMB_HOME%\contrib\include" -o %model%.obj %model%.cpp
32
set CMD=g++ -c %CXXFLAGS% %sym% -D__GNUDOS__ %dll% -Dlinux %safopt% -DUSE_LAPLACE -fpermissive -I. -I"%ADMB_HOME%\include" -I"%ADMB_HOME%\contrib\include" -o %model%.obj %model%.cpp
33 33
echo %CMD%
34 34
%CMD%
35 35

  
36 36
goto EOF
37 37

  
38 38
:HELP
39
echo Usage: adcomp [-d] [-g] [-r] [-s] model
39
echo Usage: adcomp [-d] [-g] [-r] [-f] model
40 40
echo.
41 41
echo Compile AD Model Builder C++ to object code, using the MinGW GCC compiler.
42 42
echo.
43
echo   -d     Create DLL
44
echo   -g     Insert debugging symbols
45
echo   -r     Create ADMB-RE
46
echo   -s     Enforce safe bounds
47
echo   model  Filename prefix, e.g. simple
43
echo   -d     Build a dynamic library (dll).
44
echo   -g     Build with debug symbols.
45
echo   -r     Build Random effects program (ADMB-RE).
46
echo   -f     Build with Fast optimized mode (no bounds checking).
47
echo          By default, admb script builds with bounds checking.
48
echo   model  TPL file (ie 'simple.tpl' or the filename 'simple' with no .tpl extension)
48 49
echo.
49 50

  
50 51
:EOF

Also available in: Unified diff