| 1 | package snovis
|
|---|
| 2 | version v1r1
|
|---|
| 3 |
|
|---|
| 4 | #//////////////////////////////////////////////////
|
|---|
| 5 | #/// Uses needed to build this package ////////////
|
|---|
| 6 | #//////////////////////////////////////////////////
|
|---|
| 7 |
|
|---|
| 8 | use OpenScientist v1r16p0 Interfaces
|
|---|
| 9 |
|
|---|
| 10 | use snova v2r*
|
|---|
| 11 |
|
|---|
| 12 | #////////////////////////////////////////////////////////////
|
|---|
| 13 | #////////////////////////////////////////////////////////////
|
|---|
| 14 | #////////////////////////////////////////////////////////////
|
|---|
| 15 |
|
|---|
| 16 | # Darwin : to build dlls properly :
|
|---|
| 17 | macro make_shlib "$(make_shlib)" Darwin "$(SNOVISROOT)/cmt/cmt_make_shlib_common.sh extract"
|
|---|
| 18 |
|
|---|
| 19 | #//////////////////////////////////////////////////
|
|---|
| 20 | #//////////////////////////////////////////////////
|
|---|
| 21 | #//////////////////////////////////////////////////
|
|---|
| 22 |
|
|---|
| 23 | build_strategy no_prototypes
|
|---|
| 24 | include_path none
|
|---|
| 25 |
|
|---|
| 26 | include_dirs $(SNOVISROOT)
|
|---|
| 27 |
|
|---|
| 28 | #//////////////////////////////////////////////////
|
|---|
| 29 | #/// G4Lab ////////////////////////////////////////
|
|---|
| 30 | #//////////////////////////////////////////////////
|
|---|
| 31 |
|
|---|
| 32 | # Over Geant4, HEPVis and Inventor :
|
|---|
| 33 | library G4LabCore -s=../source/G4Lab/cxx \
|
|---|
| 34 | Transform3D.cxx \
|
|---|
| 35 | Polyhedron.cxx \
|
|---|
| 36 | GeometryVisitor.cxx \
|
|---|
| 37 | Tree.cxx \
|
|---|
| 38 | Trajectory.cxx \
|
|---|
| 39 | State.cxx \
|
|---|
| 40 | SteppingAction.cxx \
|
|---|
| 41 | TrackingAction.cxx \
|
|---|
| 42 | SoG4RunManager.cxx \
|
|---|
| 43 | SoVisitedVolume.cxx \
|
|---|
| 44 | SoG4Trajectories.cxx \
|
|---|
| 45 | PhysicalVolumeAccessor.cxx \
|
|---|
| 46 | TrajectoryContainerAccessor.cxx \
|
|---|
| 47 | TrajectoryAccessor.cxx \
|
|---|
| 48 | PhysicsTableAccessor.cxx \
|
|---|
| 49 | HitsCollectionAccessor.cxx \
|
|---|
| 50 | DigitsCollectionAccessor.cxx \
|
|---|
| 51 | Manager.cxx
|
|---|
| 52 | macro G4LabCore_cppflags "-I../source ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}"
|
|---|
| 53 | macro G4LabCore_linkopts "-L${SNOVISROOT}/$(CMTCONFIG) -lG4LabCore" WIN32 "${SNOVISROOT}\$(CMTCONFIG)\G4LabCore.lib"
|
|---|
| 54 |
|
|---|
| 55 | # G4LabUIOnX :
|
|---|
| 56 | # A Geant4 G4UISession for OnX.
|
|---|
| 57 | # It needs OnX. Avoid establishing a relationship with G4interfaces
|
|---|
| 58 | # that may be reconstructed with various GUI drivers.
|
|---|
| 59 | library G4LabUIOnX ../source/G4Lab/cxx/UIOnX.cxx
|
|---|
| 60 | macro G4LabUIOnX_cppflags "-I../source ${OSC_OnX_incs} ${Geant4_include}"
|
|---|
| 61 | macro G4LabUIOnX_linkopts "-L${SNOVISROOT}/$(CMTCONFIG) -lG4LabUIOnX" WIN32 "${SNOVISROOT}\$(CMTCONFIG)\G4LabUIOnX.lib"
|
|---|
| 62 |
|
|---|
| 63 | # DLD callbacks :
|
|---|
| 64 | # Over Lib only :
|
|---|
| 65 | macro G4Lab_kind "dll"
|
|---|
| 66 | library G4Lab ../source/G4Lab/cxx/Callbacks.cxx
|
|---|
| 67 | macro lib_G4Lab_cppflags "-I../source ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}"
|
|---|
| 68 | macro G4Lab_shlibflags "${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"
|
|---|
| 69 |
|
|---|
| 70 | #//////////////////////////////////////////////////
|
|---|
| 71 | #/// DLD callbacks ////////////////////////////////
|
|---|
| 72 | #//////////////////////////////////////////////////
|
|---|
| 73 |
|
|---|
| 74 | # Must not use Geant4 singletons if having not Geant4 shared libs.
|
|---|
| 75 | macro snovis_kind "dll"
|
|---|
| 76 | library snovis ../source/*.cxx
|
|---|
| 77 | macro snovis_cppflags "-I../source ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}"
|
|---|
| 78 | macro snovis_shlibflags "${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"
|
|---|
| 79 |
|
|---|
| 80 | #//////////////////////////////////////////////////
|
|---|
| 81 | #/// Applications /////////////////////////////////
|
|---|
| 82 | #//////////////////////////////////////////////////
|
|---|
| 83 |
|
|---|
| 84 | # debug :
|
|---|
| 85 | #application prog_snova ../applications/prog_snova2.cxx use_linkopts='"${snova_ui_linkopts} ${snova_linkopts} ${Geant4_interfaces_linkopts} ${Geant4_vis_management_linkopts} ${Geant4_modeling_linkopts} ${Geant4_Tree_linkopts} ${Geant4_linkopts} ${snvertex_linkopts} ${sngeom_linkopts} ${geomutils_linkopts} ${bhep_linkopts} ${CLHEP_linkopts}"'
|
|---|
| 86 |
|
|---|
| 87 | # Over G4Lab :
|
|---|
| 88 | application prog_snovis ../applications/snovis_session.cc use_linkopts='"${snova_linkopts} ${snvertex_linkopts} ${sngeom_linkopts} ${geomutils_linkopts} ${bhep_linkopts} ${G4LabUIOnX_linkopts} ${G4LabCore_linkopts} ${Geant4_linkopts} ${CLHEP_linkopts} ${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"'
|
|---|
| 89 | macro prog_snovislinkopts "" Darwin "-bind_at_load"
|
|---|
| 90 |
|
|---|
| 91 | #//////////////////////////////////////////////////
|
|---|
| 92 | #//////////////////////////////////////////////////
|
|---|
| 93 | #//////////////////////////////////////////////////
|
|---|
| 94 |
|
|---|
| 95 | private
|
|---|
| 96 | macro build_library_links "true" WIN32 ""
|
|---|
| 97 | macro remove_library_links "true" WIN32 ""
|
|---|
| 98 |
|
|---|
| 99 | # WIN32 : /GR to enable RTTI and dynamic cast.
|
|---|
| 100 | # WIN32 : /GX to enable exception handling (for STL).
|
|---|
| 101 | macro_append cppflags "" WIN32 " /GX /GR"
|
|---|
| 102 |
|
|---|
| 103 | # DEBUG :
|
|---|
| 104 | #macro_append cflags " -g" WIN32 " /ZI /Od"
|
|---|
| 105 | #macro_append cppflags " -g" WIN32 " /ZI /Od"
|
|---|
| 106 | #macro_append cpplinkflags " -g" WIN32 " /DEBUG"
|
|---|
| 107 |
|
|---|
| 108 | # OPTIMIZE :
|
|---|
| 109 | macro_append cflags " -O" WIN32 " /O2"
|
|---|
| 110 | macro_append cppflags " -O" WIN32 " /O2"
|
|---|
| 111 | macro_append cpplinkflags " -O" WIN32 ""
|
|---|
| 112 | public
|
|---|
| 113 |
|
|---|
| 114 | #//////////////////////////////////////////////////
|
|---|
| 115 | #// Run time //////////////////////////////////////
|
|---|
| 116 | #//////////////////////////////////////////////////
|
|---|
| 117 |
|
|---|
| 118 | set G4LABROOT "$(SNOVISROOT)/Resources/G4Lab" WIN32 ""
|
|---|
| 119 |
|
|---|
| 120 | apply_pattern setup_paths
|
|---|
| 121 |
|
|---|