Revision 1450 trunk/scripts/admb/admb.bat

admb.bat (revision 1450)
112 112
    )
113 113
  )
114 114
)
115
if defined CXXFLAGS (
116
  set CXXFLAGS= -c !CXXFLAGS!
117
) else (
118
  set CXXFLAGS= -c
119
)
120
if defined d (
121
  if defined LDFLAGS (
122
    set LDFLAGS= -shared !LDFLAGS!
123
  ) else (
124
    set LDFLAGS= -shared
125
  )
126
)
127
if defined LDFLAGS (
128
  set LDFLAGS= -static !LDFLAGS!
129
) else (
130
  set LDFLAGS= -static
131
)
132 115
if exist !ADMB_HOME!\bin\admb-cfg.bat (
133 116
  call !ADMB_HOME!\bin\admb-cfg.bat
117
  if defined ADMB_CFG_CXX (
118
    set CXX=!ADMB_CFG_CXX!
119
  )
134 120
  if defined ADMB_CFG_CXXFLAGS (
135 121
    set CXXFLAGS=!CXXFLAGS! !ADMB_CFG_CXXFLAGS!
136 122
  )
137
  if defined ADMB_CFG_CXX (
138
    set CXX=!ADMB_CFG_CXX!
139
  )
140 123
  if defined ADMB_CFG_LD (
141 124
    if not defined d (
142 125
      set LD=!ADMB_CFG_LD!
......
146 129
    set LDFLAGS=!LDFLAGS! !ADMB_CFG_LDFLAGS!
147 130
  )
148 131
)
149
if not defined CXX (
150
  set CXX=g++
151
)
152
if not defined LD (
153
  if not defined d (
154
    set LD=g++
132
if "!CXX!"=="cl" (
133
  set LD=!CXX!
134
  if defined CXXFLAGS (
135
    set CXXFLAGS= /c /nologo /EHsc !CXXFLAGS!
155 136
  ) else (
156
    set LD=g++
137
    set CXXFLAGS= /c /nologo /EHsc
157 138
  )
158
)
159
if defined g (
160
  set CXXFLAGS=!CXXFLAGS! -g
161
  set LDFLAGS=!LDFLAGS! -s
139
  if defined g (
140
    set CXXFLAGS=!CXXFLAGS! /Z7
141
  ) else (
142
    set CXXFLAGS=!CXXFLAGS! /O2
143
  )
144
  if defined fast (
145
    set CXXFLAGS=!CXXFLAGS! /DOPT_LIB
146
  ) else (
147
    set CXXFLAGS=!CXXFLAGS! /DSAFE_ALL
148
  )
149
  set CXXFLAGS=!CXXFLAGS! /DUSE_LAPLACE /DWIN32 /D__MSVC32__=8 /I. /I!ADMB_HOME!\include /I!ADMB_HOME!\contrib\include
162 150
) else (
163
  set CXXFLAGS=!CXXFLAGS! -O3
151
  if not defined CXX (
152
    set CXX=g++
153
  )
154
  if not defined LD (
155
    if not defined d (
156
      set LD=g++
157
    ) else (
158
      set LD=g++
159
    )
160
  )
161
  if defined CXXFLAGS (
162
    set CXXFLAGS= -c !CXXFLAGS!
163
  ) else (
164
    set CXXFLAGS= -c
165
  )
166
  if defined d (
167
    if defined LDFLAGS (
168
      set LDFLAGS= -shared !LDFLAGS!
169
    ) else (
170
      set LDFLAGS= -shared
171
    )
172
  )
173
  if defined LDFLAGS (
174
    set LDFLAGS= -static !LDFLAGS!
175
  ) else (
176
    set LDFLAGS= -static
177
  )
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff