[286] | 1 | package ELYSE |
---|
| 2 | version v7r0 |
---|
| 3 | |
---|
| 4 | #////////////////////////////////////////////////// |
---|
| 5 | #/// Uses needed to build this package //////////// |
---|
| 6 | #////////////////////////////////////////////////// |
---|
| 7 | |
---|
| 8 | use OpenScientist v16r0 Interfaces |
---|
| 9 | |
---|
| 10 | #use Geant4 v2r* Interfaces |
---|
| 11 | |
---|
| 12 | set G4RADIOACTIVEDATA "${OSC_G4RADIOACTIVEDATA}" |
---|
| 13 | set G4LEVELGAMMADATA "${OSC_G4LEVELGAMMADATA}" |
---|
| 14 | set G4LEDATA "${OSC_G4LEDATA}" |
---|
| 15 | set NeutronHPCrossSections "${OSC_NeutronHPCrossSections}" |
---|
| 16 | |
---|
| 17 | #//////////////////////////////////////////////////////////// |
---|
| 18 | #/// From Interfaces/Platform /////////////////////////////// |
---|
| 19 | #//////////////////////////////////////////////////////////// |
---|
| 20 | |
---|
| 21 | macro Platform_bin "${CMTCONFIG}" |
---|
| 22 | #set PLATFORMBIN "${Platform_bin}" |
---|
| 23 | |
---|
| 24 | pattern Platform_paths \ |
---|
| 25 | path_remove LD_LIBRARY_PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "" Darwin "" ;\ |
---|
| 26 | path_append LD_LIBRARY_PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "" Darwin "" ;\ |
---|
| 27 | path_remove DYLD_LIBRARY_PATH "" Darwin "$(<PACKAGE>ROOT)/$(Platform_bin)" ;\ |
---|
| 28 | path_append DYLD_LIBRARY_PATH "" Darwin "$(<PACKAGE>ROOT)/$(Platform_bin)" ;\ |
---|
| 29 | path_remove PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "$(<PACKAGE>ROOT)\$(Platform_bin)" ;\ |
---|
| 30 | path_append PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "$(<PACKAGE>ROOT)\$(Platform_bin)" |
---|
| 31 | |
---|
| 32 | # Darwin : to build dlls properly : |
---|
| 33 | macro make_shlib "$(make_shlib)" Darwin "$(ELYSEROOT)/cmt/cmt_make_shlib_common.sh extract" |
---|
| 34 | |
---|
| 35 | #////////////////////////////////////////////////// |
---|
| 36 | #////////////////////////////////////////////////// |
---|
| 37 | #////////////////////////////////////////////////// |
---|
| 38 | |
---|
| 39 | branches run |
---|
| 40 | |
---|
| 41 | build_strategy no_prototypes |
---|
| 42 | include_path none |
---|
| 43 | |
---|
| 44 | include_dirs $(ELYSEROOT) |
---|
| 45 | |
---|
| 46 | # With Geant4 global libs : |
---|
| 47 | macro ELYSE_Geant4_incs "${OSC_Geant4_incs}" |
---|
| 48 | macro ELYSE_Geant4_linkopts "-L${OSC_Geant4_lib} -lG4physicslists -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global -lCLHEP" |
---|
| 49 | |
---|
| 50 | # Waiting Geant4 DLL on Windows... |
---|
| 51 | # Darwin : problem too with dylibs. |
---|
| 52 | macro ELYSE_libopts "" WIN32 " -no_share" Darwin " -no_share" |
---|
| 53 | #macro ELYSE_libopts "" WIN32 "" |
---|
| 54 | |
---|
| 55 | #////////////////////////////////////////////////// |
---|
| 56 | #/// Over Geant4 kernel and AIDA interfaces only // |
---|
| 57 | #////////////////////////////////////////////////// |
---|
| 58 | |
---|
| 59 | # Over Geant4 and AIDA only : |
---|
| 60 | library ELYSECore ${ELYSE_libopts} -s=../source *.cxx |
---|
| 61 | |
---|
| 62 | #JEC 17/11/05 add the G4readout_incs to manage G4DigiManager |
---|
| 63 | macro ELYSECore_cppflags "${OSC_AIDA_incs} ${ELYSE_Geant4_incs}" |
---|
| 64 | #macro ELYSECore_shlibflags "${ELYSE_Geant4_linkopts}" |
---|
| 65 | macro ELYSECore_linkopts "-L${ELYSEROOT}/$(Platform_bin) -lELYSECore" WIN32 "${ELYSEROOT}\$(Platform_bin)\ELYSECore.lib" |
---|
| 66 | |
---|
| 67 | #////////////////////////////////////////////////// |
---|
| 68 | #/// DLD callbacks //////////////////////////////// |
---|
| 69 | #////////////////////////////////////////////////// |
---|
| 70 | |
---|
| 71 | # Must not use Geant4 singletons if having not Geant4 shared libs. |
---|
| 72 | macro ELYSE_kind "dll" |
---|
| 73 | library ELYSE -s=../source/Callbacks Callbacks.cxx InventorCallbacks.cxx |
---|
| 74 | #macro ELYSE_cppflags "${ELYSE_Geant4_incs} ${OSC_OnX_incs}" |
---|
| 75 | macro ELYSE_cppflags "${OSC_G4Lab_incs} ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}" |
---|
| 76 | macro ELYSE_shlibflags "${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}" |
---|
| 77 | |
---|
| 78 | #////////////////////////////////////////////////// |
---|
| 79 | #/// Application "a la Geant4 examples" /////////// |
---|
| 80 | #////////////////////////////////////////////////// |
---|
| 81 | |
---|
| 82 | # Over Geant4 and AIDA only : |
---|
| 83 | application ELYSE_batch ../applications/ELYSE_batch.cxx use_linkopts='"${ELYSECore_linkopts} ${ELYSE_Geant4_linkopts} ${OSC_AIDA_linkopts}"' |
---|
| 84 | #macro ELYSE_batch_cppflags "${ELYSECore_cppflags} " |
---|
| 85 | macro ELYSE_batch_cppflags "${ELYSECore_cppflags}" |
---|
| 86 | |
---|
| 87 | # Over AIDA only : |
---|
| 88 | application ELYSE_analysis ../applications/ELYSE_analysis.cxx use_linkopts='"$(OSC_AIDA_linkopts)"' |
---|
| 89 | |
---|
| 90 | # Over G4Lab : |
---|
| 91 | application ELYSE_session ../applications/ELYSE_session.cxx ../applications/HitsCollectionAccessor.cxx use_linkopts='"${ELYSECore_linkopts} ${OSC_G4Lab_linkopts} ${ELYSE_Geant4_linkopts} ${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"' |
---|
| 92 | macro ELYSE_session_cppflags "${ELYSE_Geant4_incs} ${ELYSE_batch_cppflags}" |
---|
| 93 | |
---|
| 94 | application test -group=debug -s=../source test.cxx |
---|
| 95 | |
---|
| 96 | #////////////////////////////////////////////////// |
---|
| 97 | #/// Things using ROOT //////////////////////////// |
---|
| 98 | #////////////////////////////////////////////////// |
---|
| 99 | use ROOT v1r* Interfaces |
---|
| 100 | |
---|
| 101 | # Example of ROOT program to work on a ELYSE.root file : |
---|
| 102 | application ELYSE_analysis_ROOT -group=ROOT ../applications/ELYSE_analysis_ROOT.cxx use_linkopts='"${ROOT_Gpad_linkopts} ${ROOT_freetype_linkopts} ${ROOT_Graf_linkopts} ${ROOT_Tree_linkopts} ${ROOT_Hist_linkopts} ${ROOT_Matrix_linkopts} ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}"' |
---|
| 103 | |
---|
| 104 | # Compiled version of scripts/ROOT/aida.C |
---|
| 105 | application ELYSE_analysis_aida_ROOT -group=ROOT ../applications/ELYSE_analysis_aida_ROOT.cxx use_linkopts='"${OSC_AIDA_linkopts} ${ROOT_Gpad_linkopts} ${ROOT_freetype_linkopts} ${ROOT_Graf_linkopts} ${ROOT_Hist_linkopts} ${ROOT_Matrix_linkopts} ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}"' |
---|
| 106 | macro ELYSE_analysis_aida_ROOT_cppflags "${OSC_AIDA_incs}" |
---|
| 107 | |
---|
| 108 | # Declare AIDA to rootcint. |
---|
| 109 | # See scripts/ROOT/aida.C for a usage example. |
---|
| 110 | |
---|
| 111 | macro ELYSE_cint_cintflags "${OSC_AIDA_incs}" |
---|
| 112 | macro ELYSE_cint_LinkDef_h "../source/ROOT/LinkDef.h" |
---|
| 113 | document rootcint ELYSE_rootcint_AIDA -group=ROOT ${ELYSEROOT}/source/ROOT/ELYSE_cint.h |
---|
| 114 | |
---|
| 115 | library ELYSEAIDADict -group=ROOT -import=ROOT ${dict}/ELYSE_cintDict.cpp |
---|
| 116 | macro ELYSEAIDADict_shlibflags "$(OSC_AIDA_linkopts) ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}" |
---|
| 117 | |
---|
| 118 | #////////////////////////////////////////////////// |
---|
| 119 | #////////////////////////////////////////////////// |
---|
| 120 | #////////////////////////////////////////////////// |
---|
| 121 | |
---|
| 122 | private |
---|
| 123 | macro build_library_links "true" WIN32 "" |
---|
| 124 | macro remove_library_links "true" WIN32 "" |
---|
| 125 | |
---|
| 126 | # WIN32 : /GR to enable RTTI and dynamic cast. |
---|
| 127 | # WIN32 : /GX to enable exception handling (for STL). |
---|
| 128 | macro_append cppflags "" WIN32 " /GX /GR" |
---|
| 129 | |
---|
| 130 | # DEBUG : |
---|
| 131 | #macro_append cflags " -g" WIN32 " /ZI /Od" |
---|
| 132 | #macro_append cppflags " -g" WIN32 " /ZI /Od" |
---|
| 133 | #macro_append cpplinkflags " -g" WIN32 " /DEBUG" |
---|
| 134 | |
---|
| 135 | # OPTIMIZE : |
---|
| 136 | macro_append cflags " -O" WIN32 " /O2" |
---|
| 137 | macro_append cppflags " -O" WIN32 " /O2" |
---|
| 138 | macro_append cpplinkflags " -O" WIN32 "" |
---|
| 139 | public |
---|
| 140 | |
---|
| 141 | #////////////////////////////////////////////////// |
---|
| 142 | #// Run time ////////////////////////////////////// |
---|
| 143 | #////////////////////////////////////////////////// |
---|
| 144 | |
---|
| 145 | apply_pattern Platform_paths |
---|
| 146 | |
---|