Revision 1085 trunk/scripts/admb/adlink.bat

adlink.bat (revision 1085)
1 1
@echo off
2
@REM r244 [2009-05-28] arnima  created
2 3

  
3 4
setlocal EnableExtensions EnableDelayedExpansion
4 5

  
......
15 16
set objects=!objects! %%a
16 17
if not defined model set model=%%~na
17 18
)
19
if %%~xa==.o (
20
set objects=!objects! %%a
21
if not defined model set model=%%~na
22
)
18 23
if %%a==-d set linker=dllwrap
19 24
if %%a==-g set sym=
20 25
if %%a==-r set r=
......
27 32
if %linker%==g++ (set out=-o %model%) else (set def=-def %model%.def^
28 33
 --driver-name g++ & set out=--output-lib lib%model%.a -o %model%.dll)
29 34

  
30
set CMD=%linker% %sym% -static %def% %out% %objects% %libs%
35
set CMD=%linker% %sym% -static %def% -o %model%.exe %objects% %libs%
31 36
echo %CMD%
32 37
%CMD%
33 38

  
......
47 52
echo.
48 53

  
49 54
:EOF
50

  
51
REM r985 [2011-02-17] arnima  changed sym=-g to sym=[space], fixed spaces
52
REM r982 [2011-02-16] arnima  rewrite, fixed bug when user option is not
53
REM                           recognized, enabled strip and debug, fixed spaces
54
REM r917 [2010-12-24] johnoel pruned 'mingw' dir
55
REM r914 [2010-12-24] johnoel changed \\lib to \lib and echo off to @echo off,
56
REM                           moved to 'g++' dir
57
REM r629 [2010-05-20] johnoel changed .o to .obj
58
REM r623 [2010-05-20] johnoel changed /lib to \\lib, disabled strip
59
REM r593 [2010-04-20] johnoel quoted ADMB_HOME
60
REM r567 [2010-04-16] johnoel fixed bugs in r563
61
REM r564 [2010-04-15] johnoel fixed bugs in r563
62
REM r563 [2010-04-15] johnoel simplified echo, disabled -ldf1b2stub
63
REM r525 [2009-08-07] arnima  added support for filename extension like
64
REM                           simple.obj, unquoted ADMB_HOME, added -static
65
REM                   johnoel split -s option into separate -g and -s options
66
REM r244 [2009-05-28] arnima  created

Also available in: Unified diff