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

Last change on this file since 101 was 101, checked in by barrand, 16 years ago
  • Property svn:executable set to *
File size: 27.9 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 bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
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% Darwin`) 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 bhep_platform=Darwin
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% UNIX`) 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_5
121SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
122:end_if_platform_5
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% Darwin`) 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_7
131SET snova_platform=Darwin
132:end_if_platform_7
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% UNIX`) 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_9
141SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
142:end_if_platform_9
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% UNIX`) 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_11
151SET Geant4_home=/usr/local/geant4/8.2
152:end_if_platform_11
153SET obuild_platform_result=
154FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
155cd "%obuild_snovis_path%\%obuild_dir_bin%"
156IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
157FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
158cd "%obuild_pwd_snovis_0%"
159SET obuild_pwd_snovis_0=
160IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
161SET obuild_cxx_command=c++
162:end_if_platform_12
163SET obuild_platform_result=
164FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
165cd "%obuild_snovis_path%\%obuild_dir_bin%"
166IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
167FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
168cd "%obuild_pwd_snovis_0%"
169SET obuild_pwd_snovis_0=
170IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
171SET obuild_cxx_command=c++
172:end_if_platform_13
173SET obuild_platform_result=
174FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
175cd "%obuild_snovis_path%\%obuild_dir_bin%"
176IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
177FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
178cd "%obuild_pwd_snovis_0%"
179SET obuild_pwd_snovis_0=
180IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
181SET obuild_cxx_command=cxx
182:end_if_platform_14
183SET obuild_platform_result=
184FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
185cd "%obuild_snovis_path%\%obuild_dir_bin%"
186IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
187FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
188cd "%obuild_pwd_snovis_0%"
189SET obuild_pwd_snovis_0=
190IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
191SET obuild_cxx_command=cl.exe
192:end_if_platform_15
193SET obuild_platform_result=
194IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
195
196FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
197cd "%obuild_snovis_path%\%obuild_dir_bin%"
198IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
199FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
200cd "%obuild_pwd_snovis_0%"
201SET obuild_pwd_snovis_0=
202IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
203SET obuild_cxx_optimize=-O
204:end_if_platform_16
205SET obuild_platform_result=
206FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
207cd "%obuild_snovis_path%\%obuild_dir_bin%"
208IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
209FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
210cd "%obuild_pwd_snovis_0%"
211SET obuild_pwd_snovis_0=
212IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
213SET obuild_cxx_optimize=-O
214:end_if_platform_17
215SET obuild_platform_result=
216FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
217cd "%obuild_snovis_path%\%obuild_dir_bin%"
218IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
219FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
220cd "%obuild_pwd_snovis_0%"
221SET obuild_pwd_snovis_0=
222IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
223SET obuild_cxx_optimize=-O
224:end_if_platform_18
225SET obuild_platform_result=
226FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
227cd "%obuild_snovis_path%\%obuild_dir_bin%"
228IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
229FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
230cd "%obuild_pwd_snovis_0%"
231SET obuild_pwd_snovis_0=
232IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
233SET obuild_cxx_optimize=/O2
234:end_if_platform_19
235SET obuild_platform_result=
236
237FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
238cd "%obuild_snovis_path%\%obuild_dir_bin%"
239IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
240FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
241cd "%obuild_pwd_snovis_0%"
242SET obuild_pwd_snovis_0=
243IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
244SET obuild_cxx_debug=-g
245:end_if_platform_20
246SET obuild_platform_result=
247FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
248cd "%obuild_snovis_path%\%obuild_dir_bin%"
249IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
250FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
251cd "%obuild_pwd_snovis_0%"
252SET obuild_pwd_snovis_0=
253IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
254SET obuild_cxx_debug=-g
255:end_if_platform_21
256SET obuild_platform_result=
257FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
258cd "%obuild_snovis_path%\%obuild_dir_bin%"
259IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
260FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
261cd "%obuild_pwd_snovis_0%"
262SET obuild_pwd_snovis_0=
263IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
264SET obuild_cxx_debug=-g
265:end_if_platform_22
266SET obuild_platform_result=
267FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
268cd "%obuild_snovis_path%\%obuild_dir_bin%"
269IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
270FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
271cd "%obuild_pwd_snovis_0%"
272SET obuild_pwd_snovis_0=
273IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
274SET obuild_cxx_debug=/ZI /Od
275:end_if_platform_23
276SET obuild_platform_result=
277
278FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
279cd "%obuild_snovis_path%\%obuild_dir_bin%"
280IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
281FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
282cd "%obuild_pwd_snovis_0%"
283SET obuild_pwd_snovis_0=
284IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
285SET obuild_cxx_options=-fPIC
286:end_if_platform_24
287SET obuild_platform_result=
288FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
289cd "%obuild_snovis_path%\%obuild_dir_bin%"
290IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
291FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
292cd "%obuild_pwd_snovis_0%"
293SET obuild_pwd_snovis_0=
294IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
295SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
296:end_if_platform_25
297SET obuild_platform_result=
298
299IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_prog_snova_sh_26
300  SET obuild_cxx_debug_local=%obuild_cxx_debug%
301  GOTO end_if_db_build_app_prog_snova_sh_26
302:else_if_db_build_app_prog_snova_sh_26
303  SET obuild_cxx_debug_local=
304:end_if_db_build_app_prog_snova_sh_26
305
306IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_prog_snova_sh_27
307  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
308  GOTO end_if_opt_build_app_prog_snova_sh_27
309:else_if_opt_build_app_prog_snova_sh_27
310  SET obuild_cxx_optimize_local=
311:end_if_opt_build_app_prog_snova_sh_27
312
313
314IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
315IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
316  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
317  IF EXIST obuild_find.obj DEL obuild_find.obj
318)
319FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
320cd "%obuild_snovis_path%\%obuild_dir_bin%"
321IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
322FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
323cd "%obuild_pwd_snovis_0%"
324SET obuild_pwd_snovis_0=
325IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
326FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
327cd "%obuild_snovis_path%\%obuild_dir_bin%"
328IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
329FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
330cd "%obuild_pwd_snovis_0%"
331SET obuild_pwd_snovis_0=
332IF NOT DEFINED obuild_HDF5_path  ECHO Can't find HDF5 package.  && GOTO obuild_return
333FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
334cd "%obuild_snovis_path%\%obuild_dir_bin%"
335IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
336FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
337cd "%obuild_pwd_snovis_0%"
338SET obuild_pwd_snovis_0=
339IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
340
341FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
342cd "%obuild_snovis_path%\%obuild_dir_bin%"
343IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
344FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
345cd "%obuild_pwd_snovis_0%"
346SET obuild_pwd_snovis_0=
347IF NOT %obuild_platform_result% == yes GOTO end_if_platform_28
348SET obuild_cxx_includes=-I${snova_home}
349:end_if_platform_28
350SET obuild_platform_result=
351FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
352cd "%obuild_snovis_path%\%obuild_dir_bin%"
353IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
354FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
355cd "%obuild_pwd_snovis_0%"
356SET obuild_pwd_snovis_0=
357IF NOT %obuild_platform_result% == yes GOTO end_if_platform_29
358SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/GeomUtils/include
359:end_if_platform_29
360SET obuild_platform_result=
361FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
362cd "%obuild_snovis_path%\%obuild_dir_bin%"
363IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
364FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
365cd "%obuild_pwd_snovis_0%"
366SET obuild_pwd_snovis_0=
367IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
368SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNgeom2/include
369:end_if_platform_30
370SET obuild_platform_result=
371FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
372cd "%obuild_snovis_path%\%obuild_dir_bin%"
373IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
374FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
375cd "%obuild_pwd_snovis_0%"
376SET obuild_pwd_snovis_0=
377IF NOT %obuild_platform_result% == yes GOTO end_if_platform_31
378SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNvertex/include
379:end_if_platform_31
380SET obuild_platform_result=
381FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
382cd "%obuild_snovis_path%\%obuild_dir_bin%"
383IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
384FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
385cd "%obuild_pwd_snovis_0%"
386SET obuild_pwd_snovis_0=
387IF NOT %obuild_platform_result% == yes GOTO end_if_platform_32
388SET obuild_cxx_includes=%obuild_cxx_includes% -I${bhep_home}
389:end_if_platform_32
390SET obuild_platform_result=
391FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
392cd "%obuild_snovis_path%\%obuild_dir_bin%"
393IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
394FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
395cd "%obuild_pwd_snovis_0%"
396SET obuild_pwd_snovis_0=
397IF NOT %obuild_platform_result% == yes GOTO end_if_platform_33
398SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
399:end_if_platform_33
400SET obuild_platform_result=
401FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
402cd "%obuild_snovis_path%\%obuild_dir_bin%"
403IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
404FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
405cd "%obuild_pwd_snovis_0%"
406SET obuild_pwd_snovis_0=
407IF NOT %obuild_platform_result% == yes GOTO end_if_platform_34
408SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
409:end_if_platform_34
410SET obuild_platform_result=
411SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HDF5_path%\include"
412
413IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova"
414IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova"
415
416@IF %obuild_verbose% == yes @ECHO ON
417cd "%obuild_snovis_path%\%obuild_dir_bin%"
418%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
419@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
420@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
421cd "%obuild_snovis_path%\obuild"
422
423@IF %obuild_verbose% == yes @ECHO OFF
424
425FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
426cd "%obuild_snovis_path%\%obuild_dir_bin%"
427IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
428FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
429cd "%obuild_pwd_snovis_0%"
430SET obuild_pwd_snovis_0=
431IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
432SET obuild_cxx_linker_command=c++
433:end_if_platform_37
434SET obuild_platform_result=
435FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
436cd "%obuild_snovis_path%\%obuild_dir_bin%"
437IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
438FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
439cd "%obuild_pwd_snovis_0%"
440SET obuild_pwd_snovis_0=
441IF NOT %obuild_platform_result% == yes GOTO end_if_platform_38
442SET obuild_cxx_linker_command=c++
443:end_if_platform_38
444SET obuild_platform_result=
445FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
446cd "%obuild_snovis_path%\%obuild_dir_bin%"
447IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
448FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
449cd "%obuild_pwd_snovis_0%"
450SET obuild_pwd_snovis_0=
451IF NOT %obuild_platform_result% == yes GOTO end_if_platform_39
452SET obuild_cxx_linker_command=cxx
453:end_if_platform_39
454SET obuild_platform_result=
455FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
456cd "%obuild_snovis_path%\%obuild_dir_bin%"
457IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
458FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
459cd "%obuild_pwd_snovis_0%"
460SET obuild_pwd_snovis_0=
461IF NOT %obuild_platform_result% == yes GOTO end_if_platform_40
462SET obuild_cxx_linker_command=link.exe
463:end_if_platform_40
464SET obuild_platform_result=
465IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
466
467FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
468cd "%obuild_snovis_path%\%obuild_dir_bin%"
469IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
470FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
471cd "%obuild_pwd_snovis_0%"
472SET obuild_pwd_snovis_0=
473IF NOT %obuild_platform_result% == yes GOTO end_if_platform_41
474SET obuild_cxx_linker_debug=-g
475:end_if_platform_41
476SET obuild_platform_result=
477FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
478cd "%obuild_snovis_path%\%obuild_dir_bin%"
479IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
480FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
481cd "%obuild_pwd_snovis_0%"
482SET obuild_pwd_snovis_0=
483IF NOT %obuild_platform_result% == yes GOTO end_if_platform_42
484SET obuild_cxx_linker_debug=-g
485:end_if_platform_42
486SET obuild_platform_result=
487FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
488cd "%obuild_snovis_path%\%obuild_dir_bin%"
489IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
490FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
491cd "%obuild_pwd_snovis_0%"
492SET obuild_pwd_snovis_0=
493IF NOT %obuild_platform_result% == yes GOTO end_if_platform_43
494SET obuild_cxx_linker_debug=-g
495:end_if_platform_43
496SET obuild_platform_result=
497FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
498cd "%obuild_snovis_path%\%obuild_dir_bin%"
499IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
500FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
501cd "%obuild_pwd_snovis_0%"
502SET obuild_pwd_snovis_0=
503IF NOT %obuild_platform_result% == yes GOTO end_if_platform_44
504SET obuild_cxx_linker_debug=/DEBUG
505:end_if_platform_44
506SET obuild_platform_result=
507
508FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
509cd "%obuild_snovis_path%\%obuild_dir_bin%"
510IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
511FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
512cd "%obuild_pwd_snovis_0%"
513SET obuild_pwd_snovis_0=
514IF NOT %obuild_platform_result% == yes GOTO end_if_platform_45
515SET obuild_cxx_linker_options=/nologo
516:end_if_platform_45
517SET obuild_platform_result=
518
519IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_prog_snova_sh_46
520  SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
521  GOTO end_if_db_build_app_prog_snova_sh_46
522:else_if_db_build_app_prog_snova_sh_46
523  SET obuild_cxx_linker_debug_local=
524:end_if_db_build_app_prog_snova_sh_46
525
526IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_prog_snova_sh_47
527  SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
528  GOTO end_if_opt_build_app_prog_snova_sh_47
529:else_if_opt_build_app_prog_snova_sh_47
530  SET obuild_cxx_linker_optimize_local=
531:end_if_opt_build_app_prog_snova_sh_47
532
533SET obuild_linked_libraries=-L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils
534SET obuild_linked_libraries=%obuild_linked_libraries% -L${bhep_home}/Darwin -lbhep
535SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4interfaces
536FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
537cd "%obuild_snovis_path%\%obuild_dir_bin%"
538IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
539FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
540cd "%obuild_pwd_snovis_0%"
541SET obuild_pwd_snovis_0=
542IF NOT %obuild_platform_result% == yes GOTO end_if_platform_51
543SET 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
544:end_if_platform_51
545SET obuild_platform_result=
546FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
547cd "%obuild_snovis_path%\%obuild_dir_bin%"
548IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
549FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
550cd "%obuild_pwd_snovis_0%"
551SET obuild_pwd_snovis_0=
552IF NOT %obuild_platform_result% == yes GOTO end_if_platform_52
553SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
554:end_if_platform_52
555SET obuild_platform_result=
556SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HDF5_path%\%obuild_dir_bin%\osc_HDF5.lib"
557SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
558
559FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
560cd "%obuild_snovis_path%\%obuild_dir_bin%"
561IF EXIST .\app_prog_snova\tmp_objs DEL .\app_prog_snova\tmp_objs
562FOR %%f IN (.\app_prog_snova\*.obj) DO ECHO %%f >> .\app_prog_snova\tmp_objs
563REM # Link prog_snova :
564IF EXIST .\prog_snova.exe DEL .\prog_snova.exe
565@IF %obuild_verbose% == yes @ECHO ON
566%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%
567@IF ERRORLEVEL 1 @GOTO obuild_return
568@IF %obuild_verbose% == yes @ECHO OFF
569
570cd "%obuild_pwd_snovis_0%"
571SET obuild_pwd_snovis_0=
572REM # Some cleanup :
573IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs"
574IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.ilk" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.ilk"
575IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.pdb" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.pdb"
576IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\app_prog_snova\tmp_objs"
577IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\prog_snova.exp"
578
579:obuild_return
580ENDLOCAL
581@ECHO ON
Note: See TracBrowser for help on using the repository browser.