Revision 1359

trunk/scripts/admb/admb.bat (revision 1359)
1 1
@echo off
2
@REM 
2
@REM
3 3
@REM  Copyright 2013 (c) ADMB Foundation
4
@REM 
4
@REM
5 5

  
6 6
setlocal EnableExtensions EnableDelayedExpansion
7 7

  
8 8
if [%1]==[] goto HELP
9
if [%1]==[-h] goto HELP
9 10
if [%1]==[-help] goto HELP
10 11
if [%1]==[--help] goto HELP
11 12

  
......
31 32
  echo "Error: ADMB_HOME is not defined."
32 33
  goto EOF
33 34
)
34
if defined MINGW_HOME (
35
  set PATH=!ADMB_HOME!\bin;!MINGW_HOME!\bin;!PATH!
36
) else (
37
  set PATH=!ADMB_HOME!\bin;!ADMB_HOME!\utilities\mingw\bin;!PATH!
38
)
39 35
set tpls=
40 36
set srcs=
41 37
set objs=
42 38
for %%a in (%*) do (
43 39
  set arg=%%a
44 40
  if "!arg:~0,1!"=="-" (
41
    if "!arg!"=="-c" (
42
      set compileonly= -c
43
    )
45 44
    if "!arg!"=="-d" (
46 45
      set d= -d
47 46
    )
......
65 64
    )
66 65
    if "%%~xa"==".tpl" (
67 66
      if not defined tpls (
68
        set tpls=%%a
67
        set tpls=!arg!
69 68
      ) else (
70 69
        set tpls=!tpls! !arg!
71 70
      )
72 71
    )
73 72
    if "%%~xa"==".c" (
74 73
      if not defined srcs (
75
        set srcs=%%a
74
        set srcs=!arg!
76 75
      ) else (
77 76
        set srcs=!srcs! !arg!
78 77
      )
79 78
    )
80 79
    if "%%~xa"==".cpp" (
81 80
      if not defined srcs (
82
        set srcs=%%a
81
        set srcs=!arg!
83 82
      ) else (
84 83
        set srcs=!srcs! !arg!
85 84
      )
86 85
    )
87 86
    if "%%~xa"==".o" (
88 87
      if not defined objs (
89
        set objs=%%a
88
        set objs=!arg!
90 89
      ) else (
91 90
        set objs=!objs! !arg!
92 91
      )
93 92
    )
94 93
    if "%%~xa"==".obj" (
95 94
      if not defined objs (
96
        set objs=%%a
95
        set objs=!arg!
97 96
      ) else (
98 97
        set objs=!objs! !arg!
99 98
      )
100 99
    )
101 100
  )
102 101
)
102
if defined CXXFLAGS (
103
  set CXXFLAGS= -c !CXXFLAGS!
104
) else (
105
  set CXXFLAGS= -c
106
)
107
if defined LDFLAGS (
108
  set LDFLAGS= -static !LDFLAGS!
109
) else (
110
  set LDFLAGS= -static
111
)
112
if exist "!ADMB_HOME!"\bin\admb-cfg.bat (
113
  call "!ADMB_HOME!"\bin\admb-cfg.bat
114
  if defined ADMB_CFG_CXXFLAGS (
115
    set CXXFLAGS=!CXXFLAGS!!ADMB_CFG_CXXFLAGS!
116
  )
117
  if defined ADMB_CFG_CXX (
118
    set CXX=!ADMB_CFG_CXX!
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff