source: snovis/trunk/obuild/DOS/build_app_prog_snova.bat @ 137

Last change on this file since 137 was 137, checked in by barrand, 15 years ago
  • Property svn:executable set to *
File size: 28.2 KB
Line 
1@ECHO OFF
2SETLOCAL
3
4REM #
5REM # File produced by the obuild tool version 1.0
6REM # for the package snovis with version v1r1.
7REM #
8
9REM #////////////////////////////////////////////////
10REM # Usage :
11REM #   DOS> CD some_path\pack\version\obuild
12REM #   DOS> DOS\build_prog_snova
13REM #
14REM #////////////////////////////////////////////////
15
16REM #////////////////////////////////////////////////
17REM #/// Get path of this file :
18REM #////////////////////////////////////////////////
19SET obuild_snovis_path=%~dp0
20REM # Remove ending \obuild\DOS\
21SET obuild_snovis_path=%obuild_snovis_path:~0,-12%
22
23REM #////////////////////////////////////////////////
24REM #/// Treat arguments :
25REM #////////////////////////////////////////////////
26
27SET obuild_verbose=no
28SET obuild_debug=no
29SET obuild_optimize=yes
30SET obuild_set_x=no
31
32:next_arg
33IF "%1%" == "" GOTO end_args
34
35IF NOT "%1%" == "-v" GOTO end_if_v
36  SET obuild_verbose=yes
37  SHIFT
38  GOTO next_arg
39:end_if_v
40
41IF NOT "%1%" == "-g" GOTO end_if_g
42  SET obuild_debug=yes
43  SHIFT
44  GOTO next_arg
45:end_if_g
46
47IF 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
55REM #////////////////////////////////////////////////
56REM #/// End arguments.
57REM #////////////////////////////////////////////////
58
59IF %obuild_set_x% == yes ECHO ON
60
61IF %obuild_debug% == yes SET obuild_optimize=no
62
63IF "%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
70IF "%obuild_platform%" == "" (
71  ECHO obuild_platform variable not defined.
72  GOTO obuild_return
73)
74
75IF "%OBUILD_DIR_BIN%" == "" (
76  SET obuild_dir_bin=%obuild_platform%_obuild
77) ELSE (
78  SET obuild_dir_bin=%OBUILD_DIR_BIN%
79)
80
81IF "%obuild_dir_bin%" == "" (
82  ECHO obuild_dir_bin variable not defined.
83  GOTO obuild_return
84)
85
86IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
87
88IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
89IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
90  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
91  IF EXIST obuild_platform.obj DEL obuild_platform.obj
92)
93
94FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
95cd "%obuild_snovis_path%\%obuild_dir_bin%"
96IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
97FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
98cd "%obuild_pwd_snovis_0%"
99SET obuild_pwd_snovis_0=
100IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
101SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
102:end_if_platform_1
103SET obuild_platform_result=
104FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
105cd "%obuild_snovis_path%\%obuild_dir_bin%"
106IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
107FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
108cd "%obuild_pwd_snovis_0%"
109SET obuild_pwd_snovis_0=
110IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
111SET Geant4_home=/usr/local/geant4/8.2
112:end_if_platform_3
113SET obuild_platform_result=
114FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
115cd "%obuild_snovis_path%\%obuild_dir_bin%"
116IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
117FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
118cd "%obuild_pwd_snovis_0%"
119SET obuild_pwd_snovis_0=
120IF NOT %obuild_platform_result% == yes GOTO end_if_platform_4
121SET obuild_cxx_command=c++
122:end_if_platform_4
123SET obuild_platform_result=
124FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
125cd "%obuild_snovis_path%\%obuild_dir_bin%"
126IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
127FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
128cd "%obuild_pwd_snovis_0%"
129SET obuild_pwd_snovis_0=
130IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
131SET obuild_cxx_command=c++
132:end_if_platform_5
133SET obuild_platform_result=
134FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
135cd "%obuild_snovis_path%\%obuild_dir_bin%"
136IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
137FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
138cd "%obuild_pwd_snovis_0%"
139SET obuild_pwd_snovis_0=
140IF NOT %obuild_platform_result% == yes GOTO end_if_platform_6
141SET obuild_cxx_command=cxx
142:end_if_platform_6
143SET obuild_platform_result=
144FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
145cd "%obuild_snovis_path%\%obuild_dir_bin%"
146IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
147FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
148cd "%obuild_pwd_snovis_0%"
149SET obuild_pwd_snovis_0=
150IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
151SET obuild_cxx_command=cl.exe
152:end_if_platform_7
153SET obuild_platform_result=
154IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
155
156FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
157cd "%obuild_snovis_path%\%obuild_dir_bin%"
158IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
159FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
160cd "%obuild_pwd_snovis_0%"
161SET obuild_pwd_snovis_0=
162IF NOT %obuild_platform_result% == yes GOTO end_if_platform_8
163SET obuild_cxx_optimize=-O
164:end_if_platform_8
165SET obuild_platform_result=
166FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
167cd "%obuild_snovis_path%\%obuild_dir_bin%"
168IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
169FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
170cd "%obuild_pwd_snovis_0%"
171SET obuild_pwd_snovis_0=
172IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
173SET obuild_cxx_optimize=-O
174:end_if_platform_9
175SET obuild_platform_result=
176FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
177cd "%obuild_snovis_path%\%obuild_dir_bin%"
178IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
179FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
180cd "%obuild_pwd_snovis_0%"
181SET obuild_pwd_snovis_0=
182IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
183SET obuild_cxx_optimize=-O
184:end_if_platform_10
185SET obuild_platform_result=
186FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
187cd "%obuild_snovis_path%\%obuild_dir_bin%"
188IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
189FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
190cd "%obuild_pwd_snovis_0%"
191SET obuild_pwd_snovis_0=
192IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
193SET obuild_cxx_optimize=/O2
194:end_if_platform_11
195SET obuild_platform_result=
196
197FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
198cd "%obuild_snovis_path%\%obuild_dir_bin%"
199IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
200FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
201cd "%obuild_pwd_snovis_0%"
202SET obuild_pwd_snovis_0=
203IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
204SET obuild_cxx_debug=-g
205:end_if_platform_12
206SET obuild_platform_result=
207FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
208cd "%obuild_snovis_path%\%obuild_dir_bin%"
209IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
210FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
211cd "%obuild_pwd_snovis_0%"
212SET obuild_pwd_snovis_0=
213IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
214SET obuild_cxx_debug=-g
215:end_if_platform_13
216SET obuild_platform_result=
217FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
218cd "%obuild_snovis_path%\%obuild_dir_bin%"
219IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
220FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
221cd "%obuild_pwd_snovis_0%"
222SET obuild_pwd_snovis_0=
223IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
224SET obuild_cxx_debug=-g
225:end_if_platform_14
226SET obuild_platform_result=
227FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
228cd "%obuild_snovis_path%\%obuild_dir_bin%"
229IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
230FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
231cd "%obuild_pwd_snovis_0%"
232SET obuild_pwd_snovis_0=
233IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
234SET obuild_cxx_debug=/ZI /Od
235:end_if_platform_15
236SET obuild_platform_result=
237
238FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
239cd "%obuild_snovis_path%\%obuild_dir_bin%"
240IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
241FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
242cd "%obuild_pwd_snovis_0%"
243SET obuild_pwd_snovis_0=
244IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
245SET obuild_cxx_options=-fPIC
246:end_if_platform_16
247SET obuild_platform_result=
248FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
249cd "%obuild_snovis_path%\%obuild_dir_bin%"
250IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
251FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
252cd "%obuild_pwd_snovis_0%"
253SET obuild_pwd_snovis_0=
254IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
255SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
256:end_if_platform_17
257SET obuild_platform_result=
258
259IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_prog_snova_sh_18
260  SET obuild_cxx_debug_local=%obuild_cxx_debug%
261  GOTO end_if_db_build_app_prog_snova_sh_18
262:else_if_db_build_app_prog_snova_sh_18
263  SET obuild_cxx_debug_local=
264:end_if_db_build_app_prog_snova_sh_18
265
266IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_prog_snova_sh_19
267  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
268  GOTO end_if_opt_build_app_prog_snova_sh_19
269:else_if_opt_build_app_prog_snova_sh_19
270  SET obuild_cxx_optimize_local=
271:end_if_opt_build_app_prog_snova_sh_19
272
273
274IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
275IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
276  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
277  IF EXIST obuild_find.obj DEL obuild_find.obj
278)
279FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
280cd "%obuild_snovis_path%\%obuild_dir_bin%"
281IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
282FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
283cd "%obuild_pwd_snovis_0%"
284SET obuild_pwd_snovis_0=
285IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
286FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
287cd "%obuild_snovis_path%\%obuild_dir_bin%"
288IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
289FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
290cd "%obuild_pwd_snovis_0%"
291SET obuild_pwd_snovis_0=
292IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
293FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
294cd "%obuild_snovis_path%\%obuild_dir_bin%"
295IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
296FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
297cd "%obuild_pwd_snovis_0%"
298SET obuild_pwd_snovis_0=
299IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
300FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
301cd "%obuild_snovis_path%\%obuild_dir_bin%"
302IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
303FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
304cd "%obuild_pwd_snovis_0%"
305SET obuild_pwd_snovis_0=
306IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
307FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
308cd "%obuild_snovis_path%\%obuild_dir_bin%"
309IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
310FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  bhep v1r4p2`) DO SET obuild_bhep_path=%%j
311cd "%obuild_pwd_snovis_0%"
312SET obuild_pwd_snovis_0=
313IF NOT DEFINED obuild_bhep_path  ECHO Can't find bhep package.  && GOTO obuild_return
314FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
315cd "%obuild_snovis_path%\%obuild_dir_bin%"
316IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
317FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
318cd "%obuild_pwd_snovis_0%"
319SET obuild_pwd_snovis_0=
320IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
321FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
322cd "%obuild_snovis_path%\%obuild_dir_bin%"
323IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
324FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
325cd "%obuild_pwd_snovis_0%"
326SET obuild_pwd_snovis_0=
327IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
328FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
329cd "%obuild_snovis_path%\%obuild_dir_bin%"
330IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
331FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
332cd "%obuild_pwd_snovis_0%"
333SET obuild_pwd_snovis_0=
334IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
335FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
336cd "%obuild_snovis_path%\%obuild_dir_bin%"
337IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
338FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
339cd "%obuild_pwd_snovis_0%"
340SET obuild_pwd_snovis_0=
341IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
342FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
343cd "%obuild_snovis_path%\%obuild_dir_bin%"
344IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
345FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
346cd "%obuild_pwd_snovis_0%"
347SET obuild_pwd_snovis_0=
348IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
349FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
350cd "%obuild_snovis_path%\%obuild_dir_bin%"
351IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
352FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  bhep v1r4p2`) DO SET obuild_bhep_path=%%j
353cd "%obuild_pwd_snovis_0%"
354SET obuild_pwd_snovis_0=
355IF NOT DEFINED obuild_bhep_path  ECHO Can't find bhep package.  && GOTO obuild_return
356FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
357cd "%obuild_snovis_path%\%obuild_dir_bin%"
358IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
359FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
360cd "%obuild_pwd_snovis_0%"
361SET obuild_pwd_snovis_0=
362IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
363FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
364cd "%obuild_snovis_path%\%obuild_dir_bin%"
365IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
366FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
367cd "%obuild_pwd_snovis_0%"
368SET obuild_pwd_snovis_0=
369IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
370
371SET obuild_cxx_includes=/I"%obuild_snova_path%"
372SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\GeomUtils\include"
373SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\SNvertex\include"
374SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\SNgeom2\include"
375SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_bhep_path%"
376FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
377cd "%obuild_snovis_path%\%obuild_dir_bin%"
378IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
379FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
380cd "%obuild_pwd_snovis_0%"
381SET obuild_pwd_snovis_0=
382IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
383SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
384:end_if_platform_25
385SET obuild_platform_result=
386FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
387cd "%obuild_snovis_path%\%obuild_dir_bin%"
388IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
389FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
390cd "%obuild_pwd_snovis_0%"
391SET obuild_pwd_snovis_0=
392IF NOT %obuild_platform_result% == yes GOTO end_if_platform_26
393SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
394:end_if_platform_26
395SET obuild_platform_result=
396SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HDF5_path%\include"
397
398IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova"
399IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova"
400
401@IF %obuild_verbose% == yes @ECHO ON
402cd "%obuild_snovis_path%\%obuild_dir_bin%"
403%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\app_prog_snova\prog_snova2.obj  /Tp"..\applications\prog_snova2.cxx" 1> cl_exe_error
404@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
405@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
406cd "%obuild_snovis_path%\obuild"
407
408@IF %obuild_verbose% == yes @ECHO OFF
409
410FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
411cd "%obuild_snovis_path%\%obuild_dir_bin%"
412IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
413FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
414cd "%obuild_pwd_snovis_0%"
415SET obuild_pwd_snovis_0=
416IF NOT %obuild_platform_result% == yes GOTO end_if_platform_29
417SET obuild_cxx_linker_command=c++
418:end_if_platform_29
419SET obuild_platform_result=
420FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
421cd "%obuild_snovis_path%\%obuild_dir_bin%"
422IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
423FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
424cd "%obuild_pwd_snovis_0%"
425SET obuild_pwd_snovis_0=
426IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
427SET obuild_cxx_linker_command=c++
428:end_if_platform_30
429SET obuild_platform_result=
430FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
431cd "%obuild_snovis_path%\%obuild_dir_bin%"
432IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
433FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
434cd "%obuild_pwd_snovis_0%"
435SET obuild_pwd_snovis_0=
436IF NOT %obuild_platform_result% == yes GOTO end_if_platform_31
437SET obuild_cxx_linker_command=cxx
438:end_if_platform_31
439SET obuild_platform_result=
440FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
441cd "%obuild_snovis_path%\%obuild_dir_bin%"
442IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
443FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
444cd "%obuild_pwd_snovis_0%"
445SET obuild_pwd_snovis_0=
446IF NOT %obuild_platform_result% == yes GOTO end_if_platform_32
447SET obuild_cxx_linker_command=link.exe
448:end_if_platform_32
449SET obuild_platform_result=
450IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
451
452FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
453cd "%obuild_snovis_path%\%obuild_dir_bin%"
454IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
455FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
456cd "%obuild_pwd_snovis_0%"
457SET obuild_pwd_snovis_0=
458IF NOT %obuild_platform_result% == yes GOTO end_if_platform_33
459SET obuild_cxx_linker_debug=-g
460:end_if_platform_33
461SET obuild_platform_result=
462FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
463cd "%obuild_snovis_path%\%obuild_dir_bin%"
464IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
465FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
466cd "%obuild_pwd_snovis_0%"
467SET obuild_pwd_snovis_0=
468IF NOT %obuild_platform_result% == yes GOTO end_if_platform_34
469SET obuild_cxx_linker_debug=-g
470:end_if_platform_34
471SET obuild_platform_result=
472FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
473cd "%obuild_snovis_path%\%obuild_dir_bin%"
474IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
475FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
476cd "%obuild_pwd_snovis_0%"
477SET obuild_pwd_snovis_0=
478IF NOT %obuild_platform_result% == yes GOTO end_if_platform_35
479SET obuild_cxx_linker_debug=-g
480:end_if_platform_35
481SET obuild_platform_result=
482FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
483cd "%obuild_snovis_path%\%obuild_dir_bin%"
484IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
485FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
486cd "%obuild_pwd_snovis_0%"
487SET obuild_pwd_snovis_0=
488IF NOT %obuild_platform_result% == yes GOTO end_if_platform_36
489SET obuild_cxx_linker_debug=/DEBUG
490:end_if_platform_36
491SET obuild_platform_result=
492
493FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
494cd "%obuild_snovis_path%\%obuild_dir_bin%"
495IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
496FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
497cd "%obuild_pwd_snovis_0%"
498SET obuild_pwd_snovis_0=
499IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
500SET obuild_cxx_linker_options=/nologo
501:end_if_platform_37
502SET obuild_platform_result=
503
504IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_prog_snova_sh_38
505  SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
506  GOTO end_if_db_build_app_prog_snova_sh_38
507:else_if_db_build_app_prog_snova_sh_38
508  SET obuild_cxx_linker_debug_local=
509:end_if_db_build_app_prog_snova_sh_38
510
511IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_prog_snova_sh_39
512  SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
513  GOTO end_if_opt_build_app_prog_snova_sh_39
514:else_if_opt_build_app_prog_snova_sh_39
515  SET obuild_cxx_linker_optimize_local=
516:end_if_opt_build_app_prog_snova_sh_39
517
518SET obuild_linked_libraries="%obuild_snova_path%\%obuild_dir_bin%\snova.lib"
519SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\snvertex.lib"
520SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\sngeom.lib"
521SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\geomutils.lib"
522SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_bhep_path%\%obuild_dir_bin%\bhep.lib"
523SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4interfaces
524FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
525cd "%obuild_snovis_path%\%obuild_dir_bin%"
526IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
527FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
528cd "%obuild_pwd_snovis_0%"
529SET obuild_pwd_snovis_0=
530IF NOT %obuild_platform_result% == yes GOTO end_if_platform_46
531SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global
532:end_if_platform_46
533SET obuild_platform_result=
534FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
535cd "%obuild_snovis_path%\%obuild_dir_bin%"
536IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
537FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
538cd "%obuild_pwd_snovis_0%"
539SET obuild_pwd_snovis_0=
540IF NOT %obuild_platform_result% == yes GOTO end_if_platform_47
541SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
542:end_if_platform_47
543SET obuild_platform_result=
544SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HDF5_path%\%obuild_dir_bin%\osc_HDF5.lib"
545SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
546
547FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
548cd "%obuild_snovis_path%\%obuild_dir_bin%"
549IF EXIST .\app_prog_snova\tmp_objs DEL .\app_prog_snova\tmp_objs
550FOR %%f IN (.\app_prog_snova\*.obj) DO ECHO %%f >> .\app_prog_snova\tmp_objs
551REM # Link prog_snova :
552IF EXIST .\prog_snova.exe DEL .\prog_snova.exe
553@IF %obuild_verbose% == yes @ECHO ON
554%obuild_cxx_linker_command% %obuild_cxx_linker_debug_local% %obuild_cxx_linker_optimize_local% %obuild_cxx_linker_options% /out:.\prog_snova.exe @.\app_prog_snova\tmp_objs %obuild_linked_libraries%
555@IF ERRORLEVEL 1 @GOTO obuild_return
556@IF %obuild_verbose% == yes @ECHO OFF
557
558cd "%obuild_pwd_snovis_0%"
559SET obuild_pwd_snovis_0=
560REM # Some cleanup :
561IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs"
562IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.ilk" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.ilk"
563IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.pdb" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.pdb"
564IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs"
565IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.exp"
566
567:obuild_return
568ENDLOCAL
569@ECHO ON
Note: See TracBrowser for help on using the repository browser.