source: snovis/head/obuild/sh/build_app_snovis_session @ 92

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