Revision 917 trunk/scripts/cl/adlink.bat

adlink.bat (revision 917)
6 6
if [%1]==[] goto HELP
7 7
if [%1]==[-help] goto HELP
8 8
if [%1]==[--help] goto HELP
9
set objs=
9
set OBJS=
10 10
for %%a in (%*) do (
11 11
  set arg=%%a
12 12
  if "!arg:~0,1!"=="-" (
13 13
    if "!arg!"=="-s" (
14
      set libs="%ADMB_HOME%"\lib\admb.lib "%ADMB_HOME%"\contrib\lib\contrib.lib
14
      set LIBS="%ADMB_HOME%"\lib\admb.lib "%ADMB_HOME%"\contrib\lib\contrib.lib
15 15
    )
16
    if "!arg!"=="-g" (
17
      set DEBUG="/DEBUG"
18
    )
16 19
  ) else (
17 20
    if "%%~xa"=="" (
18
      set objs=!objs! !arg!.obj
21
      set OBJS=!OBJS! !arg!.obj
19 22
    ) else (
20
      set objs=!objs! !arg!
23
      set OBJS=!OBJS! !arg!
21 24
    )
22 25
  )
23 26
)
24 27

  
25
if not defined libs set libs="%ADMB_HOME%"\lib\admbo.lib "%ADMB_HOME%"\contrib\lib\contribo.lib
28
if not defined LIBS set LIBS="%ADMB_HOME%"\lib\admbo.lib "%ADMB_HOME%"\contrib\lib\contribo.lib
26 29
set LIBPATH_MSSDK=/libpath:"%MSSDK%"\lib
27 30

  
28 31
@echo on
29
cl %objs% %libs% /link
32
cl %OBJS% %LIBS% /link %DEBUG%
30 33
@echo off
31 34

  
32 35
goto EOF

Also available in: Unified diff