| [109] | 1 | package snovis
|
|---|
| 2 | version v1r1
|
|---|
| [103] | 3 |
|
|---|
| 4 | #//////////////////////////////////////////////////
|
|---|
| 5 | #/// Uses needed to build this package ////////////
|
|---|
| 6 | #//////////////////////////////////////////////////
|
|---|
| 7 |
|
|---|
| [109] | 8 | use OpenScientist v16r* cmt
|
|---|
| [103] | 9 |
|
|---|
| [109] | 10 | use snova v2r*
|
|---|
| [103] | 11 |
|
|---|
| 12 | set G4RADIOACTIVEDATA "${OSC_G4RADIOACTIVEDATA}"
|
|---|
| 13 | set G4LEVELGAMMADATA "${OSC_G4LEVELGAMMADATA}"
|
|---|
| 14 | set G4LEDATA "${OSC_G4LEDATA}"
|
|---|
| 15 | set NeutronHPCrossSections "${OSC_NeutronHPCrossSections}"
|
|---|
| 16 |
|
|---|
| 17 | #////////////////////////////////////////////////////////////
|
|---|
| 18 | #////////////////////////////////////////////////////////////
|
|---|
| [109] | 19 | #////////////////////////////////////////////////////////////
|
|---|
| [103] | 20 |
|
|---|
| 21 | # Darwin : to build dlls properly :
|
|---|
| [109] | 22 | macro make_shlib "$(make_shlib)" Darwin "$(SNOVISROOT)/cmt/cmt_make_shlib_common.sh extract"
|
|---|
| [103] | 23 |
|
|---|
| 24 | #//////////////////////////////////////////////////
|
|---|
| 25 | #//////////////////////////////////////////////////
|
|---|
| 26 | #//////////////////////////////////////////////////
|
|---|
| 27 |
|
|---|
| 28 | branches run
|
|---|
| 29 |
|
|---|
| 30 | build_strategy no_prototypes
|
|---|
| 31 | include_path none
|
|---|
| 32 |
|
|---|
| [109] | 33 | include_dirs $(SNOVISROOT)
|
|---|
| [103] | 34 |
|
|---|
| 35 | # With Geant4 global libs :
|
|---|
| [109] | 36 | macro snovis_Geant4_incs "${OSC_Geant4_incs}"
|
|---|
| 37 | macro snovis_Geant4_linkopts "-L${OSC_Geant4_lib} -lG4physicslists -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global -lCLHEP"
|
|---|
| [103] | 38 |
|
|---|
| 39 | # Waiting Geant4 DLL on Windows...
|
|---|
| 40 | # Darwin : problem too with dylibs.
|
|---|
| [109] | 41 | macro snovis_libopts "" WIN32 " -no_share" Darwin " -no_share"
|
|---|
| 42 | #macro snovis_libopts "" WIN32 ""
|
|---|
| [103] | 43 |
|
|---|
| 44 | #//////////////////////////////////////////////////
|
|---|
| 45 | #/// DLD callbacks ////////////////////////////////
|
|---|
| 46 | #//////////////////////////////////////////////////
|
|---|
| 47 |
|
|---|
| 48 | # Must not use Geant4 singletons if having not Geant4 shared libs.
|
|---|
| [109] | 49 | macro snovis_kind "dll"
|
|---|
| 50 | library snovis ../source/*.cxx
|
|---|
| 51 | #macro snovis_cppflags "${snovis_Geant4_incs} ${OSC_OnX_incs}"
|
|---|
| 52 | macro snovis_cppflags "${OSC_G4Lab_incs} ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}"
|
|---|
| 53 | macro snovis_shlibflags "${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"
|
|---|
| [103] | 54 |
|
|---|
| 55 | #//////////////////////////////////////////////////
|
|---|
| [109] | 56 | #/// Applications /////////////////////////////////
|
|---|
| [103] | 57 | #//////////////////////////////////////////////////
|
|---|
| 58 |
|
|---|
| [109] | 59 | application prog_snova ../applications/prog_snova2.cxx use_linkopts='"${snova_linkopts} ${snvertex_linkopts} ${sngeom_linkopts} ${geomutils_linkopts} ${bhep_linkopts} ${Geant4_linkopts} ${CLHEP_linkopts}"'
|
|---|
| 60 | #macro prog_snova_cppflags "${snova_cppflags}"
|
|---|
| [103] | 61 |
|
|---|
| 62 | # Over G4Lab :
|
|---|
| [109] | 63 | application snovis_session ../applications/snovis_session.cc use_linkopts='"${snova_linkopts} ${snvertex_linkopts} ${sngeom_linkopts} ${geomutils_linkopts} ${bhep_linkopts} ${OSC_G4Lab_linkopts} ${snovis_Geant4_linkopts} ${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"'
|
|---|
| 64 | macro snovis_session_cppflags "${snovis_Geant4_incs} ${snovis_batch_cppflags}"
|
|---|
| [103] | 65 |
|
|---|
| 66 | #//////////////////////////////////////////////////
|
|---|
| 67 | #//////////////////////////////////////////////////
|
|---|
| 68 | #//////////////////////////////////////////////////
|
|---|
| 69 |
|
|---|
| 70 | private
|
|---|
| 71 | macro build_library_links "true" WIN32 ""
|
|---|
| 72 | macro remove_library_links "true" WIN32 ""
|
|---|
| 73 |
|
|---|
| 74 | # WIN32 : /GR to enable RTTI and dynamic cast.
|
|---|
| 75 | # WIN32 : /GX to enable exception handling (for STL).
|
|---|
| 76 | macro_append cppflags "" WIN32 " /GX /GR"
|
|---|
| 77 |
|
|---|
| 78 | # DEBUG :
|
|---|
| 79 | #macro_append cflags " -g" WIN32 " /ZI /Od"
|
|---|
| 80 | #macro_append cppflags " -g" WIN32 " /ZI /Od"
|
|---|
| 81 | #macro_append cpplinkflags " -g" WIN32 " /DEBUG"
|
|---|
| 82 |
|
|---|
| 83 | # OPTIMIZE :
|
|---|
| 84 | macro_append cflags " -O" WIN32 " /O2"
|
|---|
| 85 | macro_append cppflags " -O" WIN32 " /O2"
|
|---|
| 86 | macro_append cpplinkflags " -O" WIN32 ""
|
|---|
| 87 | public
|
|---|
| 88 |
|
|---|
| 89 | #//////////////////////////////////////////////////
|
|---|
| 90 | #// Run time //////////////////////////////////////
|
|---|
| 91 | #//////////////////////////////////////////////////
|
|---|
| 92 |
|
|---|
| [109] | 93 | apply_pattern setup_paths
|
|---|
| [103] | 94 |
|
|---|