1 | #!/bin/sh -f |
---|
2 | |
---|
3 | # |
---|
4 | # File produced by the obuild tool version 1.0 |
---|
5 | # for the package snovis with version v1r0. |
---|
6 | # |
---|
7 | |
---|
8 | #//////////////////////////////////////////////// |
---|
9 | # Usage : |
---|
10 | # UNIX> cd some_path/pack/version/obuild |
---|
11 | # ( UNIX> chmod a+x sh/build_snovis_session ) |
---|
12 | # UNIX> sh/build_snovis_session |
---|
13 | # |
---|
14 | #//////////////////////////////////////////////// |
---|
15 | |
---|
16 | obuild_verbose=no |
---|
17 | obuild_debug=no |
---|
18 | obuild_optimize=yes |
---|
19 | obuild_do_not_compile=no |
---|
20 | obuild_dir_bin_o_cleanup=yes |
---|
21 | |
---|
22 | obuild_set_x=no |
---|
23 | while test $# -ge 1 ; do |
---|
24 | case $1 in |
---|
25 | -h) |
---|
26 | echo "Options :" |
---|
27 | echo " -v : verbose." |
---|
28 | echo " -d : build in debug mode." |
---|
29 | echo " -g : build in debug mode." |
---|
30 | echo " -x : execute script with set -x." |
---|
31 | echo " -l : link only, do not (re)compile." |
---|
32 | echo " -k : do not remove result of compilations (.o, .obj)." |
---|
33 | echo "" |
---|
34 | exit ;; |
---|
35 | -v) obuild_verbose=yes ;; |
---|
36 | -x) obuild_set_x=yes ;; |
---|
37 | -d) obuild_debug=yes ;; |
---|
38 | -g) obuild_debug=yes ;; |
---|
39 | -l) obuild_do_not_compile=yes ;; |
---|
40 | -k) obuild_dir_bin_o_cleanup=no ;; |
---|
41 | *) echo "unknown option : $1";exit ;; |
---|
42 | esac |
---|
43 | shift |
---|
44 | done |
---|
45 | |
---|
46 | if [ ${obuild_set_x} = yes ] ; then |
---|
47 | set -x |
---|
48 | fi |
---|
49 | |
---|
50 | if [ ${obuild_debug} = yes ] ; then |
---|
51 | obuild_optimize=no |
---|
52 | fi |
---|
53 | |
---|
54 | if [ "${OBUILD_PLATFORM}" = "" ] ; then |
---|
55 | obuild_platform=`uname` |
---|
56 | else |
---|
57 | obuild_platform=${OBUILD_PLATFORM} |
---|
58 | fi |
---|
59 | |
---|
60 | if [ "${obuild_platform}" = "" ] ; then |
---|
61 | echo "obuild_platform variable not defined." |
---|
62 | exit |
---|
63 | fi |
---|
64 | |
---|
65 | if [ "${OBUILD_DIR_BIN}" = "" ] ; then |
---|
66 | obuild_dir_bin=${obuild_platform}_obuild |
---|
67 | else |
---|
68 | obuild_dir_bin=${OBUILD_DIR_BIN} |
---|
69 | fi |
---|
70 | |
---|
71 | if [ "${obuild_dir_bin}" = "" ] ; then |
---|
72 | echo "obuild_dir_bin variable not defined." |
---|
73 | exit |
---|
74 | fi |
---|
75 | |
---|
76 | obuild_pwd=`pwd` |
---|
77 | obuild_snovis_path=`dirname "${obuild_pwd}"` |
---|
78 | unset obuild_pwd |
---|
79 | |
---|
80 | # Create the bin directory : |
---|
81 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
82 | |
---|
83 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then |
---|
84 | if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then |
---|
85 | echo "Program source obuild_platform.cpp not found." |
---|
86 | exit |
---|
87 | fi |
---|
88 | if [ "${obuild_cxx_command}" = "" ] ; then |
---|
89 | if [ "${OBUILD_CXX}" != "" ] ; then |
---|
90 | obuild_platform_compiler=${OBUILD_CXX} |
---|
91 | else |
---|
92 | obuild_platform_compiler=c++ |
---|
93 | fi |
---|
94 | else |
---|
95 | obuild_platform_compiler=${obuild_cxx_command} |
---|
96 | fi |
---|
97 | ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" |
---|
98 | unset obuild_platform_compiler |
---|
99 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then |
---|
100 | echo "Program obuild_platform not found." |
---|
101 | exit |
---|
102 | fi |
---|
103 | fi |
---|
104 | obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" |
---|
105 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
106 | echo "Variable obuild_platform_exe not defined." |
---|
107 | exit |
---|
108 | fi |
---|
109 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
110 | if [ ${obuild_platform_result} = yes ] ; then |
---|
111 | bhep_home="/Users/barrand/dev/exp/nemo/bhep/v1r4p2" |
---|
112 | fi |
---|
113 | unset obuild_platform_result |
---|
114 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
115 | echo "Variable obuild_platform_exe not defined." |
---|
116 | exit |
---|
117 | fi |
---|
118 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
119 | if [ ${obuild_platform_result} = yes ] ; then |
---|
120 | bhep_platform="Darwin" |
---|
121 | fi |
---|
122 | unset obuild_platform_result |
---|
123 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
124 | echo "Variable obuild_platform_exe not defined." |
---|
125 | exit |
---|
126 | fi |
---|
127 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
128 | if [ ${obuild_platform_result} = yes ] ; then |
---|
129 | snova_home="/Users/barrand/dev/exp/nemo/snova/v2r0p0" |
---|
130 | fi |
---|
131 | unset obuild_platform_result |
---|
132 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
133 | echo "Variable obuild_platform_exe not defined." |
---|
134 | exit |
---|
135 | fi |
---|
136 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
137 | if [ ${obuild_platform_result} = yes ] ; then |
---|
138 | snova_platform="Darwin" |
---|
139 | fi |
---|
140 | unset obuild_platform_result |
---|
141 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
142 | echo "Variable obuild_platform_exe not defined." |
---|
143 | exit |
---|
144 | fi |
---|
145 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
146 | if [ ${obuild_platform_result} = yes ] ; then |
---|
147 | CLHEP_home="/usr/local/CLHEP/2.0.3.1" |
---|
148 | fi |
---|
149 | unset obuild_platform_result |
---|
150 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
151 | echo "Variable obuild_platform_exe not defined." |
---|
152 | exit |
---|
153 | fi |
---|
154 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
155 | if [ ${obuild_platform_result} = yes ] ; then |
---|
156 | Geant4_home="/usr/local/geant4/8.2" |
---|
157 | fi |
---|
158 | unset obuild_platform_result |
---|
159 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
160 | echo "Variable obuild_platform_exe not defined." |
---|
161 | exit |
---|
162 | fi |
---|
163 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
164 | if [ ${obuild_platform_result} = yes ] ; then |
---|
165 | obuild_cxx_command="c++" |
---|
166 | fi |
---|
167 | unset obuild_platform_result |
---|
168 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
169 | echo "Variable obuild_platform_exe not defined." |
---|
170 | exit |
---|
171 | fi |
---|
172 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
173 | if [ ${obuild_platform_result} = yes ] ; then |
---|
174 | obuild_cxx_command="c++" |
---|
175 | fi |
---|
176 | unset obuild_platform_result |
---|
177 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
178 | echo "Variable obuild_platform_exe not defined." |
---|
179 | exit |
---|
180 | fi |
---|
181 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'` |
---|
182 | if [ ${obuild_platform_result} = yes ] ; then |
---|
183 | obuild_cxx_command="cxx" |
---|
184 | fi |
---|
185 | unset obuild_platform_result |
---|
186 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
187 | echo "Variable obuild_platform_exe not defined." |
---|
188 | exit |
---|
189 | fi |
---|
190 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
191 | if [ ${obuild_platform_result} = yes ] ; then |
---|
192 | obuild_cxx_command="cl.exe" |
---|
193 | fi |
---|
194 | unset obuild_platform_result |
---|
195 | if [ "${obuild_cxx_command}" = "" ] ; then |
---|
196 | echo "Variable obuild_cxx_command not defined." |
---|
197 | exit |
---|
198 | fi |
---|
199 | |
---|
200 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
201 | echo "Variable obuild_platform_exe not defined." |
---|
202 | exit |
---|
203 | fi |
---|
204 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
205 | if [ ${obuild_platform_result} = yes ] ; then |
---|
206 | obuild_cxx_optimize="-O" |
---|
207 | fi |
---|
208 | unset obuild_platform_result |
---|
209 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
210 | echo "Variable obuild_platform_exe not defined." |
---|
211 | exit |
---|
212 | fi |
---|
213 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
214 | if [ ${obuild_platform_result} = yes ] ; then |
---|
215 | obuild_cxx_optimize="-O" |
---|
216 | fi |
---|
217 | unset obuild_platform_result |
---|
218 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
219 | echo "Variable obuild_platform_exe not defined." |
---|
220 | exit |
---|
221 | fi |
---|
222 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'` |
---|
223 | if [ ${obuild_platform_result} = yes ] ; then |
---|
224 | obuild_cxx_optimize="-O" |
---|
225 | fi |
---|
226 | unset obuild_platform_result |
---|
227 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
228 | echo "Variable obuild_platform_exe not defined." |
---|
229 | exit |
---|
230 | fi |
---|
231 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
232 | if [ ${obuild_platform_result} = yes ] ; then |
---|
233 | obuild_cxx_optimize="/O2" |
---|
234 | fi |
---|
235 | unset obuild_platform_result |
---|
236 | |
---|
237 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
238 | echo "Variable obuild_platform_exe not defined." |
---|
239 | exit |
---|
240 | fi |
---|
241 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
242 | if [ ${obuild_platform_result} = yes ] ; then |
---|
243 | obuild_cxx_debug="-g" |
---|
244 | fi |
---|
245 | unset obuild_platform_result |
---|
246 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
247 | echo "Variable obuild_platform_exe not defined." |
---|
248 | exit |
---|
249 | fi |
---|
250 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
251 | if [ ${obuild_platform_result} = yes ] ; then |
---|
252 | obuild_cxx_debug="-g" |
---|
253 | fi |
---|
254 | unset obuild_platform_result |
---|
255 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
256 | echo "Variable obuild_platform_exe not defined." |
---|
257 | exit |
---|
258 | fi |
---|
259 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'` |
---|
260 | if [ ${obuild_platform_result} = yes ] ; then |
---|
261 | obuild_cxx_debug="-g" |
---|
262 | fi |
---|
263 | unset obuild_platform_result |
---|
264 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
265 | echo "Variable obuild_platform_exe not defined." |
---|
266 | exit |
---|
267 | fi |
---|
268 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
269 | if [ ${obuild_platform_result} = yes ] ; then |
---|
270 | obuild_cxx_debug="/ZI /Od" |
---|
271 | fi |
---|
272 | unset obuild_platform_result |
---|
273 | |
---|
274 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
275 | echo "Variable obuild_platform_exe not defined." |
---|
276 | exit |
---|
277 | fi |
---|
278 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
279 | if [ ${obuild_platform_result} = yes ] ; then |
---|
280 | obuild_cxx_options="-fPIC" |
---|
281 | fi |
---|
282 | unset obuild_platform_result |
---|
283 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
284 | echo "Variable obuild_platform_exe not defined." |
---|
285 | exit |
---|
286 | fi |
---|
287 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
288 | if [ ${obuild_platform_result} = yes ] ; then |
---|
289 | obuild_cxx_options="/nologo /DWIN32 /MD /GX /GR /W3" |
---|
290 | fi |
---|
291 | unset obuild_platform_result |
---|
292 | |
---|
293 | if [ ${obuild_debug} = yes ] ; then |
---|
294 | obuild_cxx_debug_local=${obuild_cxx_debug} |
---|
295 | else |
---|
296 | obuild_cxx_debug_local= |
---|
297 | fi |
---|
298 | |
---|
299 | if [ ${obuild_optimize} = yes ] ; then |
---|
300 | obuild_cxx_optimize_local=${obuild_cxx_optimize} |
---|
301 | else |
---|
302 | obuild_cxx_optimize_local= |
---|
303 | fi |
---|
304 | |
---|
305 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then |
---|
306 | if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then |
---|
307 | echo "Program source obuild_find.cpp not found." |
---|
308 | exit |
---|
309 | fi |
---|
310 | if [ "${obuild_cxx_command}" = "" ] ; then |
---|
311 | if [ "${OBUILD_CXX}" != "" ] ; then |
---|
312 | obuild_find_compiler=${OBUILD_CXX} |
---|
313 | else |
---|
314 | obuild_find_compiler=c++ |
---|
315 | fi |
---|
316 | else |
---|
317 | obuild_find_compiler=${obuild_cxx_command} |
---|
318 | fi |
---|
319 | ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" |
---|
320 | unset obuild_find_compiler |
---|
321 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then |
---|
322 | echo "Program obuild_find not found." |
---|
323 | exit |
---|
324 | fi |
---|
325 | fi |
---|
326 | obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" |
---|
327 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
328 | echo "Variable obuild_find_exe not defined." |
---|
329 | exit |
---|
330 | fi |
---|
331 | obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'` |
---|
332 | if [ "${obuild_HDF5_path}" = "" ] ; then |
---|
333 | echo "Can't find HDF5 package." |
---|
334 | exit |
---|
335 | fi |
---|
336 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
337 | echo "Variable obuild_find_exe not defined." |
---|
338 | exit |
---|
339 | fi |
---|
340 | obuild_AIDA_path=`"${obuild_find_exe}" AIDA 'v3r2p1'` |
---|
341 | if [ "${obuild_AIDA_path}" = "" ] ; then |
---|
342 | echo "Can't find AIDA package." |
---|
343 | exit |
---|
344 | fi |
---|
345 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
346 | echo "Variable obuild_find_exe not defined." |
---|
347 | exit |
---|
348 | fi |
---|
349 | obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'` |
---|
350 | if [ "${obuild_G4Lab_path}" = "" ] ; then |
---|
351 | echo "Can't find G4Lab package." |
---|
352 | exit |
---|
353 | fi |
---|
354 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
355 | echo "Variable obuild_find_exe not defined." |
---|
356 | exit |
---|
357 | fi |
---|
358 | obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'` |
---|
359 | if [ "${obuild_Lib_path}" = "" ] ; then |
---|
360 | echo "Can't find Lib package." |
---|
361 | exit |
---|
362 | fi |
---|
363 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
364 | echo "Variable obuild_find_exe not defined." |
---|
365 | exit |
---|
366 | fi |
---|
367 | obuild_Slash_path=`"${obuild_find_exe}" Slash 'v1r*'` |
---|
368 | if [ "${obuild_Slash_path}" = "" ] ; then |
---|
369 | echo "Can't find Slash package." |
---|
370 | exit |
---|
371 | fi |
---|
372 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
373 | echo "Variable obuild_find_exe not defined." |
---|
374 | exit |
---|
375 | fi |
---|
376 | obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'` |
---|
377 | if [ "${obuild_OnX_path}" = "" ] ; then |
---|
378 | echo "Can't find OnX package." |
---|
379 | exit |
---|
380 | fi |
---|
381 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
382 | echo "Variable obuild_find_exe not defined." |
---|
383 | exit |
---|
384 | fi |
---|
385 | obuild_HDF5_path=`"${obuild_find_exe}" HDF5 'v1r*'` |
---|
386 | if [ "${obuild_HDF5_path}" = "" ] ; then |
---|
387 | echo "Can't find HDF5 package." |
---|
388 | exit |
---|
389 | fi |
---|
390 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
391 | echo "Variable obuild_find_exe not defined." |
---|
392 | exit |
---|
393 | fi |
---|
394 | obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'` |
---|
395 | if [ "${obuild_G4Lab_path}" = "" ] ; then |
---|
396 | echo "Can't find G4Lab package." |
---|
397 | exit |
---|
398 | fi |
---|
399 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
400 | echo "Variable obuild_find_exe not defined." |
---|
401 | exit |
---|
402 | fi |
---|
403 | obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'` |
---|
404 | if [ "${obuild_G4Lab_path}" = "" ] ; then |
---|
405 | echo "Can't find G4Lab package." |
---|
406 | exit |
---|
407 | fi |
---|
408 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
409 | echo "Variable obuild_find_exe not defined." |
---|
410 | exit |
---|
411 | fi |
---|
412 | obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'` |
---|
413 | if [ "${obuild_Lib_path}" = "" ] ; then |
---|
414 | echo "Can't find Lib package." |
---|
415 | exit |
---|
416 | fi |
---|
417 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
418 | echo "Variable obuild_find_exe not defined." |
---|
419 | exit |
---|
420 | fi |
---|
421 | obuild_expat_path=`"${obuild_find_exe}" expat 'v1r*'` |
---|
422 | if [ "${obuild_expat_path}" = "" ] ; then |
---|
423 | echo "Can't find expat package." |
---|
424 | exit |
---|
425 | fi |
---|
426 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
427 | echo "Variable obuild_find_exe not defined." |
---|
428 | exit |
---|
429 | fi |
---|
430 | obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'` |
---|
431 | if [ "${obuild_Lib_path}" = "" ] ; then |
---|
432 | echo "Can't find Lib package." |
---|
433 | exit |
---|
434 | fi |
---|
435 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
436 | echo "Variable obuild_find_exe not defined." |
---|
437 | exit |
---|
438 | fi |
---|
439 | obuild_zlib_path=`"${obuild_find_exe}" zlib 'v1r*'` |
---|
440 | if [ "${obuild_zlib_path}" = "" ] ; then |
---|
441 | echo "Can't find zlib package." |
---|
442 | exit |
---|
443 | fi |
---|
444 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
445 | echo "Variable obuild_find_exe not defined." |
---|
446 | exit |
---|
447 | fi |
---|
448 | obuild_Lib_path=`"${obuild_find_exe}" Lib 'v8r*'` |
---|
449 | if [ "${obuild_Lib_path}" = "" ] ; then |
---|
450 | echo "Can't find Lib package." |
---|
451 | exit |
---|
452 | fi |
---|
453 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
454 | echo "Variable obuild_find_exe not defined." |
---|
455 | exit |
---|
456 | fi |
---|
457 | obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'` |
---|
458 | if [ "${obuild_HEPVis_path}" = "" ] ; then |
---|
459 | echo "Can't find HEPVis package." |
---|
460 | exit |
---|
461 | fi |
---|
462 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
463 | echo "Variable obuild_find_exe not defined." |
---|
464 | exit |
---|
465 | fi |
---|
466 | obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'` |
---|
467 | if [ "${obuild_HEPVis_path}" = "" ] ; then |
---|
468 | echo "Can't find HEPVis package." |
---|
469 | exit |
---|
470 | fi |
---|
471 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
472 | echo "Variable obuild_find_exe not defined." |
---|
473 | exit |
---|
474 | fi |
---|
475 | obuild_jpeg_path=`"${obuild_find_exe}" jpeg 'v1r*'` |
---|
476 | if [ "${obuild_jpeg_path}" = "" ] ; then |
---|
477 | echo "Can't find jpeg package." |
---|
478 | exit |
---|
479 | fi |
---|
480 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
481 | echo "Variable obuild_find_exe not defined." |
---|
482 | exit |
---|
483 | fi |
---|
484 | obuild_dvi2bitmap_path=`"${obuild_find_exe}" dvi2bitmap 'v1r*'` |
---|
485 | if [ "${obuild_dvi2bitmap_path}" = "" ] ; then |
---|
486 | echo "Can't find dvi2bitmap package." |
---|
487 | exit |
---|
488 | fi |
---|
489 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
490 | echo "Variable obuild_find_exe not defined." |
---|
491 | exit |
---|
492 | fi |
---|
493 | obuild_freetype2_path=`"${obuild_find_exe}" freetype2 'v1r*'` |
---|
494 | if [ "${obuild_freetype2_path}" = "" ] ; then |
---|
495 | echo "Can't find freetype2 package." |
---|
496 | exit |
---|
497 | fi |
---|
498 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
499 | echo "Variable obuild_find_exe not defined." |
---|
500 | exit |
---|
501 | fi |
---|
502 | obuild_CoinGL_path=`"${obuild_find_exe}" CoinGL 'v1r*'` |
---|
503 | if [ "${obuild_CoinGL_path}" = "" ] ; then |
---|
504 | echo "Can't find CoinGL package." |
---|
505 | exit |
---|
506 | fi |
---|
507 | |
---|
508 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
509 | echo "Variable obuild_platform_exe not defined." |
---|
510 | exit |
---|
511 | fi |
---|
512 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
513 | if [ ${obuild_platform_result} = yes ] ; then |
---|
514 | obuild_cxx_includes="-I${snova_home}" |
---|
515 | fi |
---|
516 | unset obuild_platform_result |
---|
517 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
518 | echo "Variable obuild_platform_exe not defined." |
---|
519 | exit |
---|
520 | fi |
---|
521 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
522 | if [ ${obuild_platform_result} = yes ] ; then |
---|
523 | obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/GeomUtils/include" |
---|
524 | fi |
---|
525 | unset obuild_platform_result |
---|
526 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
527 | echo "Variable obuild_platform_exe not defined." |
---|
528 | exit |
---|
529 | fi |
---|
530 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
531 | if [ ${obuild_platform_result} = yes ] ; then |
---|
532 | obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/SNgeom2/include" |
---|
533 | fi |
---|
534 | unset obuild_platform_result |
---|
535 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
536 | echo "Variable obuild_platform_exe not defined." |
---|
537 | exit |
---|
538 | fi |
---|
539 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
540 | if [ ${obuild_platform_result} = yes ] ; then |
---|
541 | obuild_cxx_includes="${obuild_cxx_includes} -I${snova_home}/source/SNvertex/include" |
---|
542 | fi |
---|
543 | unset obuild_platform_result |
---|
544 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
545 | echo "Variable obuild_platform_exe not defined." |
---|
546 | exit |
---|
547 | fi |
---|
548 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
549 | if [ ${obuild_platform_result} = yes ] ; then |
---|
550 | obuild_cxx_includes="${obuild_cxx_includes} -I${bhep_home}" |
---|
551 | fi |
---|
552 | unset obuild_platform_result |
---|
553 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
554 | echo "Variable obuild_platform_exe not defined." |
---|
555 | exit |
---|
556 | fi |
---|
557 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
558 | if [ ${obuild_platform_result} = yes ] ; then |
---|
559 | obuild_cxx_includes="${obuild_cxx_includes} -I${CLHEP_home}/include" |
---|
560 | fi |
---|
561 | unset obuild_platform_result |
---|
562 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
563 | echo "Variable obuild_platform_exe not defined." |
---|
564 | exit |
---|
565 | fi |
---|
566 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
567 | if [ ${obuild_platform_result} = yes ] ; then |
---|
568 | obuild_cxx_includes="${obuild_cxx_includes} -I${Geant4_home}/include" |
---|
569 | fi |
---|
570 | unset obuild_platform_result |
---|
571 | obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_HDF5_path}/include\"" |
---|
572 | obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_AIDA_path}/src/cpp\"" |
---|
573 | obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_G4Lab_path}/include\"" |
---|
574 | obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_Lib_path}/include\"" |
---|
575 | obuild_cxx_includes="${obuild_cxx_includes} -I\"${obuild_Slash_path}\"" |
---|
576 | |
---|
577 | if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then |
---|
578 | /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/app_snovis_session" |
---|
579 | fi |
---|
580 | |
---|
581 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/app_snovis_session" |
---|
582 | |
---|
583 | # Compile snovis_session files : |
---|
584 | if [ ${obuild_do_not_compile} = no ] ; then |
---|
585 | |
---|
586 | if [ ${obuild_verbose} = yes ] ; then set -x;fi |
---|
587 | cd "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
588 | eval ${obuild_cxx_command} -c ${obuild_cxx_debug_local} ${obuild_cxx_optimize_local} ${obuild_cxx_options} ${obuild_cxx_macros} ${obuild_cxx_includes} -o ./app_snovis_session/snovis_session.o \"../applications/snovis_session.cc\" |
---|
589 | obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi |
---|
590 | cd "${obuild_snovis_path}/obuild" |
---|
591 | |
---|
592 | if [ ${obuild_verbose} = yes ] ; then set +x;fi |
---|
593 | |
---|
594 | fi #do_not_compile |
---|
595 | |
---|
596 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
597 | echo "Variable obuild_platform_exe not defined." |
---|
598 | exit |
---|
599 | fi |
---|
600 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
601 | if [ ${obuild_platform_result} = yes ] ; then |
---|
602 | obuild_cxx_linker_command="c++" |
---|
603 | fi |
---|
604 | unset obuild_platform_result |
---|
605 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
606 | echo "Variable obuild_platform_exe not defined." |
---|
607 | exit |
---|
608 | fi |
---|
609 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
610 | if [ ${obuild_platform_result} = yes ] ; then |
---|
611 | obuild_cxx_linker_command="c++" |
---|
612 | fi |
---|
613 | unset obuild_platform_result |
---|
614 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
615 | echo "Variable obuild_platform_exe not defined." |
---|
616 | exit |
---|
617 | fi |
---|
618 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'` |
---|
619 | if [ ${obuild_platform_result} = yes ] ; then |
---|
620 | obuild_cxx_linker_command="cxx" |
---|
621 | fi |
---|
622 | unset obuild_platform_result |
---|
623 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
624 | echo "Variable obuild_platform_exe not defined." |
---|
625 | exit |
---|
626 | fi |
---|
627 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
628 | if [ ${obuild_platform_result} = yes ] ; then |
---|
629 | obuild_cxx_linker_command="link.exe" |
---|
630 | fi |
---|
631 | unset obuild_platform_result |
---|
632 | if [ "${obuild_cxx_linker_command}" = "" ] ; then |
---|
633 | echo "Variable obuild_cxx_linker_command not defined." |
---|
634 | exit |
---|
635 | fi |
---|
636 | |
---|
637 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
638 | echo "Variable obuild_platform_exe not defined." |
---|
639 | exit |
---|
640 | fi |
---|
641 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
642 | if [ ${obuild_platform_result} = yes ] ; then |
---|
643 | obuild_cxx_linker_debug="-g" |
---|
644 | fi |
---|
645 | unset obuild_platform_result |
---|
646 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
647 | echo "Variable obuild_platform_exe not defined." |
---|
648 | exit |
---|
649 | fi |
---|
650 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
651 | if [ ${obuild_platform_result} = yes ] ; then |
---|
652 | obuild_cxx_linker_debug="-g" |
---|
653 | fi |
---|
654 | unset obuild_platform_result |
---|
655 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
656 | echo "Variable obuild_platform_exe not defined." |
---|
657 | exit |
---|
658 | fi |
---|
659 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'` |
---|
660 | if [ ${obuild_platform_result} = yes ] ; then |
---|
661 | obuild_cxx_linker_debug="-g" |
---|
662 | fi |
---|
663 | unset obuild_platform_result |
---|
664 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
665 | echo "Variable obuild_platform_exe not defined." |
---|
666 | exit |
---|
667 | fi |
---|
668 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
669 | if [ ${obuild_platform_result} = yes ] ; then |
---|
670 | obuild_cxx_linker_debug="/DEBUG" |
---|
671 | fi |
---|
672 | unset obuild_platform_result |
---|
673 | |
---|
674 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
675 | echo "Variable obuild_platform_exe not defined." |
---|
676 | exit |
---|
677 | fi |
---|
678 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
679 | if [ ${obuild_platform_result} = yes ] ; then |
---|
680 | obuild_cxx_linker_options="/nologo" |
---|
681 | fi |
---|
682 | unset obuild_platform_result |
---|
683 | |
---|
684 | if [ ${obuild_debug} = yes ] ; then |
---|
685 | obuild_cxx_linker_debug_local=${obuild_cxx_linker_debug} |
---|
686 | else |
---|
687 | obuild_cxx_linker_debug_local= |
---|
688 | fi |
---|
689 | |
---|
690 | if [ ${obuild_optimize} = yes ] ; then |
---|
691 | obuild_cxx_linker_optimize_local=${obuild_cxx_linker_optimize} |
---|
692 | else |
---|
693 | obuild_cxx_linker_optimize_local= |
---|
694 | fi |
---|
695 | obuild_linked_paths="-L\"${obuild_OnX_path}/${obuild_dir_bin}\"" |
---|
696 | obuild_linked_libraries=" -lOnXCore" |
---|
697 | obuild_linked_libraries="${obuild_linked_libraries} -L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils" |
---|
698 | obuild_linked_libraries="${obuild_linked_libraries} -L${bhep_home}/Darwin -lbhep" |
---|
699 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HDF5_path}/${obuild_dir_bin}\"" |
---|
700 | obuild_linked_libraries="${obuild_linked_libraries} -losc_HDF5" |
---|
701 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_G4Lab_path}/${obuild_dir_bin}\"" |
---|
702 | obuild_linked_libraries="${obuild_linked_libraries} -lG4LabUIOnX" |
---|
703 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_G4Lab_path}/${obuild_dir_bin}\"" |
---|
704 | obuild_linked_libraries="${obuild_linked_libraries} -lG4LabCore" |
---|
705 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
706 | echo "Variable obuild_platform_exe not defined." |
---|
707 | exit |
---|
708 | fi |
---|
709 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
710 | if [ ${obuild_platform_result} = yes ] ; then |
---|
711 | 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" |
---|
712 | fi |
---|
713 | unset obuild_platform_result |
---|
714 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
715 | echo "Variable obuild_platform_exe not defined." |
---|
716 | exit |
---|
717 | fi |
---|
718 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
719 | if [ ${obuild_platform_result} = yes ] ; then |
---|
720 | obuild_linked_libraries="${obuild_linked_libraries} -L${CLHEP_home}/lib -lCLHEP" |
---|
721 | fi |
---|
722 | unset obuild_platform_result |
---|
723 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\"" |
---|
724 | obuild_linked_libraries="${obuild_linked_libraries} -lLibXML" |
---|
725 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_expat_path}/${obuild_dir_bin}\"" |
---|
726 | obuild_linked_libraries="${obuild_linked_libraries} -losc_expat" |
---|
727 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\"" |
---|
728 | obuild_linked_libraries="${obuild_linked_libraries} -lLibZip" |
---|
729 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_zlib_path}/${obuild_dir_bin}\"" |
---|
730 | obuild_linked_libraries="${obuild_linked_libraries} -losc_z" |
---|
731 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_Lib_path}/${obuild_dir_bin}\"" |
---|
732 | obuild_linked_libraries="${obuild_linked_libraries} -lLibUtils" |
---|
733 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HEPVis_path}/${obuild_dir_bin}\"" |
---|
734 | obuild_linked_libraries="${obuild_linked_libraries} -lHEPVisGeometry" |
---|
735 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_HEPVis_path}/${obuild_dir_bin}\"" |
---|
736 | obuild_linked_libraries="${obuild_linked_libraries} -lHEPVisUtils" |
---|
737 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_jpeg_path}/${obuild_dir_bin}\"" |
---|
738 | obuild_linked_libraries="${obuild_linked_libraries} -losc_jpeg" |
---|
739 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_dvi2bitmap_path}/${obuild_dir_bin}\"" |
---|
740 | obuild_linked_libraries="${obuild_linked_libraries} -losc_dvi2bitmap" |
---|
741 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_freetype2_path}/${obuild_dir_bin}\"" |
---|
742 | obuild_linked_libraries="${obuild_linked_libraries} -losc_freetype2" |
---|
743 | obuild_linked_paths="${obuild_linked_paths} -L\"${obuild_CoinGL_path}/${obuild_dir_bin}\"" |
---|
744 | obuild_linked_libraries="${obuild_linked_libraries} -losc_Coin" |
---|
745 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
746 | echo "Variable obuild_platform_exe not defined." |
---|
747 | exit |
---|
748 | fi |
---|
749 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
750 | if [ ${obuild_platform_result} = yes ] ; then |
---|
751 | obuild_linked_libraries="${obuild_linked_libraries} -framework OpenGL -framework AGL" |
---|
752 | fi |
---|
753 | unset obuild_platform_result |
---|
754 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
755 | echo "Variable obuild_platform_exe not defined." |
---|
756 | exit |
---|
757 | fi |
---|
758 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'` |
---|
759 | if [ ${obuild_platform_result} = yes ] ; then |
---|
760 | obuild_linked_libraries="${obuild_linked_libraries} -framework ApplicationServices" |
---|
761 | fi |
---|
762 | unset obuild_platform_result |
---|
763 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
764 | echo "Variable obuild_platform_exe not defined." |
---|
765 | exit |
---|
766 | fi |
---|
767 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'` |
---|
768 | if [ ${obuild_platform_result} = yes ] ; then |
---|
769 | obuild_linked_libraries="${obuild_linked_libraries} -L/usr/lib -lGLU -lGL -lm" |
---|
770 | fi |
---|
771 | unset obuild_platform_result |
---|
772 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
773 | echo "Variable obuild_platform_exe not defined." |
---|
774 | exit |
---|
775 | fi |
---|
776 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Windows_NT'` |
---|
777 | if [ ${obuild_platform_result} = yes ] ; then |
---|
778 | obuild_linked_libraries="${obuild_linked_libraries} glu32.lib opengl32.lib gdi32.lib user32.lib" |
---|
779 | fi |
---|
780 | unset obuild_platform_result |
---|
781 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
782 | echo "Variable obuild_platform_exe not defined." |
---|
783 | exit |
---|
784 | fi |
---|
785 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'OSF1'` |
---|
786 | if [ ${obuild_platform_result} = yes ] ; then |
---|
787 | obuild_linked_libraries="${obuild_linked_libraries} -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm" |
---|
788 | fi |
---|
789 | unset obuild_platform_result |
---|
790 | if [ "${obuild_platform_exe}" = "" ] ; then |
---|
791 | echo "Variable obuild_platform_exe not defined." |
---|
792 | exit |
---|
793 | fi |
---|
794 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'` |
---|
795 | if [ ${obuild_platform_result} = yes ] ; then |
---|
796 | obuild_linked_libraries="${obuild_linked_libraries} -lpthread" |
---|
797 | fi |
---|
798 | unset obuild_platform_result |
---|
799 | |
---|
800 | # Link snovis_session : |
---|
801 | cd "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
802 | obuild_objs=`find ./app_snovis_session -name '*.o' -print` |
---|
803 | /bin/rm -f ./snovis_session |
---|
804 | if [ ${obuild_verbose} = yes ] ; then set -x;fi |
---|
805 | eval ${obuild_cxx_linker_command} ${obuild_cxx_linker_debug_local} ${obuild_cxx_linker_optimize_local} ${obuild_cxx_linker_options} -o \"${obuild_snovis_path}/${obuild_dir_bin}/snovis_session\" ${obuild_objs} ${obuild_linked_paths} ${obuild_linked_libraries} |
---|
806 | obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi |
---|
807 | if [ ${obuild_verbose} = yes ] ; then set +x;fi |
---|
808 | cd "${obuild_snovis_path}/obuild" |
---|
809 | |
---|
810 | # Some cleanup : |
---|
811 | if [ ${obuild_dir_bin_o_cleanup} = yes ] ; then |
---|
812 | /bin/rm -R -f "${obuild_snovis_path}/${obuild_dir_bin}/app_snovis_session" |
---|
813 | fi |
---|
814 | /bin/rm -f "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" |
---|
815 | |
---|