| 1 | @ECHO OFF
|
|---|
| 2 | SETLOCAL
|
|---|
| 3 |
|
|---|
| 4 | REM #
|
|---|
| 5 | REM # File produced by the obuild tool version 1.0
|
|---|
| 6 | REM # for the package snova with version v2r0p0.
|
|---|
| 7 | REM #
|
|---|
| 8 |
|
|---|
| 9 | REM #////////////////////////////////////////////////
|
|---|
| 10 | REM # Usage :
|
|---|
| 11 | REM # DOS> CD some_path\pack\version\obuild
|
|---|
| 12 | REM # DOS> DOS\build_snova
|
|---|
| 13 | REM #
|
|---|
| 14 | REM #////////////////////////////////////////////////
|
|---|
| 15 |
|
|---|
| 16 | REM #////////////////////////////////////////////////
|
|---|
| 17 | REM #/// Get path of this file :
|
|---|
| 18 | REM #////////////////////////////////////////////////
|
|---|
| 19 | SET obuild_snova_path=%~dp0
|
|---|
| 20 | REM # Remove ending \obuild\DOS\
|
|---|
| 21 | SET obuild_snova_path=%obuild_snova_path:~0,-12%
|
|---|
| 22 |
|
|---|
| 23 | REM #////////////////////////////////////////////////
|
|---|
| 24 | REM #/// Treat arguments :
|
|---|
| 25 | REM #////////////////////////////////////////////////
|
|---|
| 26 |
|
|---|
| 27 | SET obuild_verbose=no
|
|---|
| 28 | SET obuild_debug=no
|
|---|
| 29 | SET obuild_optimize=yes
|
|---|
| 30 | SET obuild_set_x=no
|
|---|
| 31 |
|
|---|
| 32 | :next_arg
|
|---|
| 33 | IF "%1%" == "" GOTO end_args
|
|---|
| 34 |
|
|---|
| 35 | IF NOT "%1%" == "-v" GOTO end_if_v
|
|---|
| 36 | SET obuild_verbose=yes
|
|---|
| 37 | SHIFT
|
|---|
| 38 | GOTO next_arg
|
|---|
| 39 | :end_if_v
|
|---|
| 40 |
|
|---|
| 41 | IF NOT "%1%" == "-g" GOTO end_if_g
|
|---|
| 42 | SET obuild_debug=yes
|
|---|
| 43 | SHIFT
|
|---|
| 44 | GOTO next_arg
|
|---|
| 45 | :end_if_g
|
|---|
| 46 |
|
|---|
| 47 | IF NOT "%1%" == "-x" GOTO end_if_x
|
|---|
| 48 | SET obuild_set_x=yes
|
|---|
| 49 | SHIFT
|
|---|
| 50 | GOTO next_arg
|
|---|
| 51 | :end_if_x
|
|---|
| 52 |
|
|---|
| 53 | :end_args
|
|---|
| 54 |
|
|---|
| 55 | REM #////////////////////////////////////////////////
|
|---|
| 56 | REM #/// End arguments.
|
|---|
| 57 | REM #////////////////////////////////////////////////
|
|---|
| 58 |
|
|---|
| 59 | IF %obuild_set_x% == yes ECHO ON
|
|---|
| 60 |
|
|---|
| 61 | IF %obuild_debug% == yes SET obuild_optimize=no
|
|---|
| 62 |
|
|---|
| 63 | IF "%OBUILD_PLATFORM%" == "" (
|
|---|
| 64 | IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
|
|---|
| 65 | SET obuild_platform=%OS%
|
|---|
| 66 | ) ELSE (
|
|---|
| 67 | SET obuild_platform=%OBUILD_PLATFORM%
|
|---|
| 68 | )
|
|---|
| 69 |
|
|---|
| 70 | IF "%obuild_platform%" == "" (
|
|---|
| 71 | ECHO obuild_platform variable not defined.
|
|---|
| 72 | GOTO obuild_return
|
|---|
| 73 | )
|
|---|
| 74 |
|
|---|
| 75 | IF "%OBUILD_DIR_BIN%" == "" (
|
|---|
| 76 | SET obuild_dir_bin=bin_obuild
|
|---|
| 77 | ) ELSE (
|
|---|
| 78 | SET obuild_dir_bin=%OBUILD_DIR_BIN%
|
|---|
| 79 | )
|
|---|
| 80 |
|
|---|
| 81 | IF "%obuild_dir_bin%" == "" (
|
|---|
| 82 | ECHO obuild_dir_bin variable not defined.
|
|---|
| 83 | GOTO obuild_return
|
|---|
| 84 | )
|
|---|
| 85 |
|
|---|
| 86 | IF NOT EXIST "%obuild_snova_path%\%obuild_dir_bin%" MKDIR "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 87 |
|
|---|
| 88 | IF NOT EXIST "%obuild_snova_path%\%obuild_dir_bin%" MKDIR "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 89 | IF NOT EXIST "%obuild_snova_path%\%obuild_dir_bin%\obuild_platform.exe" (
|
|---|
| 90 | cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snova_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snova_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
|
|---|
| 91 | IF EXIST obuild_platform.obj DEL obuild_platform.obj
|
|---|
| 92 | )
|
|---|
| 93 |
|
|---|
| 94 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 95 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 96 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 97 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 98 | cd "%obuild_pwd_snova_0%"
|
|---|
| 99 | SET obuild_pwd_snova_0=
|
|---|
| 100 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_0
|
|---|
| 101 | SET obuild_cxx_command=cl.exe
|
|---|
| 102 | :end_if_platform_0
|
|---|
| 103 | SET obuild_platform_result=
|
|---|
| 104 | IF "%obuild_cxx_command%" == "" ECHO Variable obuild_cxx_command not defined. && GOTO obuild_return
|
|---|
| 105 |
|
|---|
| 106 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 107 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 108 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 109 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 110 | cd "%obuild_pwd_snova_0%"
|
|---|
| 111 | SET obuild_pwd_snova_0=
|
|---|
| 112 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
|
|---|
| 113 | SET obuild_cxx_optimize=/O2
|
|---|
| 114 | :end_if_platform_1
|
|---|
| 115 | SET obuild_platform_result=
|
|---|
| 116 |
|
|---|
| 117 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 118 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 119 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 120 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 121 | cd "%obuild_pwd_snova_0%"
|
|---|
| 122 | SET obuild_pwd_snova_0=
|
|---|
| 123 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_2
|
|---|
| 124 | SET obuild_cxx_debug=/ZI /Od
|
|---|
| 125 | :end_if_platform_2
|
|---|
| 126 | SET obuild_platform_result=
|
|---|
| 127 |
|
|---|
| 128 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 129 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 130 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 131 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 132 | cd "%obuild_pwd_snova_0%"
|
|---|
| 133 | SET obuild_pwd_snova_0=
|
|---|
| 134 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
|
|---|
| 135 | SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
|
|---|
| 136 | :end_if_platform_3
|
|---|
| 137 | SET obuild_platform_result=
|
|---|
| 138 |
|
|---|
| 139 | IF NOT %obuild_debug% == yes GOTO else_if_db_build_lib_snova_sh_4
|
|---|
| 140 | SET obuild_cxx_debug_local=%obuild_cxx_debug%
|
|---|
| 141 | GOTO end_if_db_build_lib_snova_sh_4
|
|---|
| 142 | :else_if_db_build_lib_snova_sh_4
|
|---|
| 143 | SET obuild_cxx_debug_local=
|
|---|
| 144 | :end_if_db_build_lib_snova_sh_4
|
|---|
| 145 |
|
|---|
| 146 | IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_lib_snova_sh_5
|
|---|
| 147 | SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
|
|---|
| 148 | GOTO end_if_opt_build_lib_snova_sh_5
|
|---|
| 149 | :else_if_opt_build_lib_snova_sh_5
|
|---|
| 150 | SET obuild_cxx_optimize_local=
|
|---|
| 151 | :end_if_opt_build_lib_snova_sh_5
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 | IF NOT EXIST "%obuild_snova_path%\%obuild_dir_bin%" MKDIR "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 155 | IF NOT EXIST "%obuild_snova_path%\%obuild_dir_bin%\obuild_find.exe" (
|
|---|
| 156 | cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snova_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snova_path%\obuild\cpp\obuild_find.cpp" 1> NUL
|
|---|
| 157 | IF EXIST obuild_find.obj DEL obuild_find.obj
|
|---|
| 158 | )
|
|---|
| 159 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 160 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 161 | IF NOT EXIST obuild_find.exe ECHO Program obuild_find.exe not found. && GOTO obuild_return
|
|---|
| 162 | FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe bhep v1r4p2`) DO SET obuild_bhep_path=%%j
|
|---|
| 163 | cd "%obuild_pwd_snova_0%"
|
|---|
| 164 | SET obuild_pwd_snova_0=
|
|---|
| 165 | IF NOT DEFINED obuild_bhep_path ECHO Can't find bhep package. && GOTO obuild_return
|
|---|
| 166 |
|
|---|
| 167 | SET obuild_cxx_includes=/I"%obuild_snova_path%"
|
|---|
| 168 | SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\GeomUtils\include"
|
|---|
| 169 | SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\SNgeom2\include"
|
|---|
| 170 | SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\SNvertex\include"
|
|---|
| 171 | SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_bhep_path%"
|
|---|
| 172 |
|
|---|
| 173 | IF EXIST "%obuild_snova_path%\%obuild_dir_bin%\lib_snova" RMDIR /S /Q "%obuild_snova_path%\%obuild_dir_bin%\lib_snova"
|
|---|
| 174 | IF NOT EXIST "%obuild_snova_path%\%obuild_dir_bin%\lib_snova" MKDIR "%obuild_snova_path%\%obuild_dir_bin%\lib_snova"
|
|---|
| 175 |
|
|---|
| 176 | @IF %obuild_verbose% == yes @ECHO ON
|
|---|
| 177 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 178 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\event.obj /Tp"..\source\snova\base\event.cc" 1> cl_exe_error
|
|---|
| 179 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 180 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 181 | cd "%obuild_snova_path%\obuild"
|
|---|
| 182 |
|
|---|
| 183 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 184 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\generator.obj /Tp"..\source\snova\base\generator.cc" 1> cl_exe_error
|
|---|
| 185 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 186 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 187 | cd "%obuild_snova_path%\obuild"
|
|---|
| 188 |
|
|---|
| 189 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 190 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\run.obj /Tp"..\source\snova\base\run.cc" 1> cl_exe_error
|
|---|
| 191 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 192 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 193 | cd "%obuild_snova_path%\obuild"
|
|---|
| 194 |
|
|---|
| 195 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 196 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\snova_const.obj /Tp"..\source\snova\base\snova_const.cc" 1> cl_exe_error
|
|---|
| 197 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 198 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 199 | cd "%obuild_snova_path%\obuild"
|
|---|
| 200 |
|
|---|
| 201 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 202 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\snova_mgr.obj /Tp"..\source\snova\base\snova_mgr.cc" 1> cl_exe_error
|
|---|
| 203 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 204 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 205 | cd "%obuild_snova_path%\obuild"
|
|---|
| 206 |
|
|---|
| 207 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 208 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\snova_utils.obj /Tp"..\source\snova\base\snova_utils.cc" 1> cl_exe_error
|
|---|
| 209 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 210 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 211 | cd "%obuild_snova_path%\obuild"
|
|---|
| 212 |
|
|---|
| 213 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 214 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\stacking.obj /Tp"..\source\snova\base\stacking.cc" 1> cl_exe_error
|
|---|
| 215 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 216 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 217 | cd "%obuild_snova_path%\obuild"
|
|---|
| 218 |
|
|---|
| 219 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 220 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\stepping.obj /Tp"..\source\snova\base\stepping.cc" 1> cl_exe_error
|
|---|
| 221 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 222 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 223 | cd "%obuild_snova_path%\obuild"
|
|---|
| 224 |
|
|---|
| 225 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 226 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\stepping_verbose.obj /Tp"..\source\snova\base\stepping_verbose.cc" 1> cl_exe_error
|
|---|
| 227 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 228 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 229 | cd "%obuild_snova_path%\obuild"
|
|---|
| 230 |
|
|---|
| 231 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 232 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\tracking.obj /Tp"..\source\snova\base\tracking.cc" 1> cl_exe_error
|
|---|
| 233 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 234 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 235 | cd "%obuild_snova_path%\obuild"
|
|---|
| 236 |
|
|---|
| 237 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 238 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\geometry2.obj /Tp"..\source\snova\geom\geometry2.cc" 1> cl_exe_error
|
|---|
| 239 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 240 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 241 | cd "%obuild_snova_path%\obuild"
|
|---|
| 242 |
|
|---|
| 243 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 244 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\materials.obj /Tp"..\source\snova\geom\materials.cc" 1> cl_exe_error
|
|---|
| 245 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 246 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 247 | cd "%obuild_snova_path%\obuild"
|
|---|
| 248 |
|
|---|
| 249 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 250 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\nemo_field2.obj /Tp"..\source\snova\geom\nemo_field2.cc" 1> cl_exe_error
|
|---|
| 251 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 252 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 253 | cd "%obuild_snova_path%\obuild"
|
|---|
| 254 |
|
|---|
| 255 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 256 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\visibilities2.obj /Tp"..\source\snova\geom\visibilities2.cc" 1> cl_exe_error
|
|---|
| 257 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 258 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 259 | cd "%obuild_snova_path%\obuild"
|
|---|
| 260 |
|
|---|
| 261 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 262 | %obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\lib_snova\physics.obj /Tp"..\source\snova\physics\physics.cc" 1> cl_exe_error
|
|---|
| 263 | @IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
|
|---|
| 264 | @IF NOT ERRORLEVEL 1 @DEL cl_exe_error
|
|---|
| 265 | cd "%obuild_snova_path%\obuild"
|
|---|
| 266 |
|
|---|
| 267 | @IF %obuild_verbose% == yes @ECHO OFF
|
|---|
| 268 |
|
|---|
| 269 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 270 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 271 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 272 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 273 | cd "%obuild_pwd_snova_0%"
|
|---|
| 274 | SET obuild_pwd_snova_0=
|
|---|
| 275 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_26
|
|---|
| 276 | SET obuild_cxx_linker_command=link.exe
|
|---|
| 277 | :end_if_platform_26
|
|---|
| 278 | SET obuild_platform_result=
|
|---|
| 279 | IF "%obuild_cxx_linker_command%" == "" ECHO Variable obuild_cxx_linker_command not defined. && GOTO obuild_return
|
|---|
| 280 |
|
|---|
| 281 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 282 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 283 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 284 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 285 | cd "%obuild_pwd_snova_0%"
|
|---|
| 286 | SET obuild_pwd_snova_0=
|
|---|
| 287 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_27
|
|---|
| 288 | SET obuild_cxx_linker_debug=/DEBUG
|
|---|
| 289 | :end_if_platform_27
|
|---|
| 290 | SET obuild_platform_result=
|
|---|
| 291 |
|
|---|
| 292 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 293 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 294 | IF NOT EXIST .\obuild_platform.exe ECHO Program obuild_platform.exe not found. && GOTO obuild_return
|
|---|
| 295 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
|
|---|
| 296 | cd "%obuild_pwd_snova_0%"
|
|---|
| 297 | SET obuild_pwd_snova_0=
|
|---|
| 298 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_28
|
|---|
| 299 | SET obuild_cxx_linker_options=/nologo
|
|---|
| 300 | :end_if_platform_28
|
|---|
| 301 | SET obuild_platform_result=
|
|---|
| 302 |
|
|---|
| 303 | IF NOT %obuild_debug% == yes GOTO else_if_db_build_lib_snova_sh_29
|
|---|
| 304 | SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
|
|---|
| 305 | GOTO end_if_db_build_lib_snova_sh_29
|
|---|
| 306 | :else_if_db_build_lib_snova_sh_29
|
|---|
| 307 | SET obuild_cxx_linker_debug_local=
|
|---|
| 308 | :end_if_db_build_lib_snova_sh_29
|
|---|
| 309 |
|
|---|
| 310 | IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_lib_snova_sh_30
|
|---|
| 311 | SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
|
|---|
| 312 | GOTO end_if_opt_build_lib_snova_sh_30
|
|---|
| 313 | :else_if_opt_build_lib_snova_sh_30
|
|---|
| 314 | SET obuild_cxx_linker_optimize_local=
|
|---|
| 315 | :end_if_opt_build_lib_snova_sh_30
|
|---|
| 316 |
|
|---|
| 317 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snova_0=%%d
|
|---|
| 318 | cd "%obuild_snova_path%\%obuild_dir_bin%"
|
|---|
| 319 | IF EXIST .\lib_snova\tmp_objs DEL .\lib_snova\tmp_objs
|
|---|
| 320 | FOR %%f IN (.\lib_snova\*.obj) DO ECHO %%f >> .\lib_snova\tmp_objs
|
|---|
| 321 |
|
|---|
| 322 | REM # Create the archive library snova :
|
|---|
| 323 | @IF %obuild_verbose% == yes @ECHO ON
|
|---|
| 324 | lib.exe /nologo /machine:ix86 /out:.\lib_snova\snova.arc @.\lib_snova\tmp_objs
|
|---|
| 325 | @IF ERRORLEVEL 1 @GOTO obuild_return
|
|---|
| 326 | @IF %obuild_verbose% == yes @ECHO OFF
|
|---|
| 327 |
|
|---|
| 328 | REM # Build the obuild_windef.exe utility program :
|
|---|
| 329 | cl.exe /nologo /DWIN32 /MD /O2 /W3 /Feobuild_windef.exe "%obuild_snova_path%\obuild\cpp\obuild_windef.c" 1> NUL
|
|---|
| 330 | IF EXIST obuild_windef.obj DEL obuild_windef.obj
|
|---|
| 331 |
|
|---|
| 332 | REM # Building the .def file :
|
|---|
| 333 | @IF %obuild_verbose% == yes @ECHO ON
|
|---|
| 334 | dumpbin.exe /symbols /out:.\lib_snova\tmp .\lib_snova\snova.arc 1> dumpbin_exe_error .\lib_snova\snova.arc
|
|---|
| 335 | @IF ERRORLEVEL 1 @TYPE dumpbin_exe_error && @GOTO obuild_return
|
|---|
| 336 | @IF NOT ERRORLEVEL 1 @DEL dumpbin_exe_error
|
|---|
| 337 | @IF %obuild_verbose% == yes @ECHO OFF
|
|---|
| 338 | .\obuild_windef.exe snova < .\lib_snova\tmp > .\lib_snova\snova.def
|
|---|
| 339 | REM # Building the linking library :
|
|---|
| 340 | REM # It produces a .exp file.
|
|---|
| 341 | @IF %obuild_verbose% == yes @ECHO ON
|
|---|
| 342 | lib.exe /nologo /machine:ix86 /out:.\snova.lib /def:.\lib_snova\snova.def 1> lib_exe_error
|
|---|
| 343 | @IF ERRORLEVEL 1 @TYPE lib_exe_error && @GOTO obuild_return
|
|---|
| 344 | @IF NOT ERRORLEVEL 1 @DEL lib_exe_error
|
|---|
| 345 | @IF %obuild_verbose% == yes @ECHO OFF
|
|---|
| 346 |
|
|---|
| 347 | REM # Building the DLL :
|
|---|
| 348 | IF EXIST .\snova.dll DEL .\snova.dll
|
|---|
| 349 | @IF %obuild_verbose% == yes @ECHO ON
|
|---|
| 350 | link.exe /nologo /dll /out:.\snova.dll .\snova.exp .\lib_snova\snova.arc %obuild_linked_libraries%
|
|---|
| 351 | @IF %obuild_verbose% == yes @ECHO OFF
|
|---|
| 352 |
|
|---|
| 353 | cd "%obuild_pwd_snova_0%"
|
|---|
| 354 | SET obuild_pwd_snova_0=
|
|---|
| 355 | REM # Some cleanup :
|
|---|
| 356 | IF EXIST "%obuild_snova_path%\%obuild_dir_bin%\lib_snova\tmp_objs" DEL "%obuild_snova_path%\%obuild_dir_bin%\lib_snova\tmp_objs"
|
|---|
| 357 | IF EXIST "%obuild_snova_path%\%obuild_dir_bin%\snova.exp" DEL "%obuild_snova_path%\%obuild_dir_bin%\snova.exp"
|
|---|
| 358 |
|
|---|
| 359 | :obuild_return
|
|---|
| 360 | ENDLOCAL
|
|---|
| 361 | @ECHO ON
|
|---|