1 | package MEMPHYS |
---|
2 | version v7r0 |
---|
3 | |
---|
4 | #////////////////////////////////////////////////// |
---|
5 | #/// Uses needed to build this package //////////// |
---|
6 | #////////////////////////////////////////////////// |
---|
7 | |
---|
8 | use OpenScientist v16r0 |
---|
9 | |
---|
10 | use Geant4 v2r* Interfaces |
---|
11 | |
---|
12 | #////////////////////////////////////////////////// |
---|
13 | #////////////////////////////////////////////////// |
---|
14 | #////////////////////////////////////////////////// |
---|
15 | |
---|
16 | branches run |
---|
17 | |
---|
18 | build_strategy no_prototypes |
---|
19 | include_path none |
---|
20 | |
---|
21 | include_dirs $(MEMPHYSROOT) |
---|
22 | |
---|
23 | # With Geant4 granular libs : |
---|
24 | #macro MEMPHYS_Geant4_incs "${G4readout_incs} ${G4run_incs} ${G4event_incs} ${G4tracking_incs} ${G4processes_use_incs} ${G4digits_hits_incs} ${G4geometry_incs} ${G4materials_incs} ${G4track_incs} ${G4particles_use_incs} ${G4graphics_reps_incs} ${G4intercoms_incs} ${G4global_incs}" |
---|
25 | #macro MEMPHYS_Geant4_linkopts "${G4readout_linkopts} ${G4run_linkopts} ${G4event_linkopts} ${G4tracking_linkopts} ${G4processes_linkopts} ${G4digits_hits_linkopts} ${G4track_linkopts} ${G4particles_linkopts} ${G4geometry_linkopts} ${G4graphics_reps_linkopts} ${G4materials_linkopts} ${G4intercoms_linkopts} ${G4global_linkopts} ${CLHEP_linkopts}" |
---|
26 | |
---|
27 | # With Geant4 global libs : |
---|
28 | macro MEMPHYS_Geant4_incs "-I${Geant4_include}" WIN32 "/I${Geant4_include}" |
---|
29 | macro MEMPHYS_Geant4_linkopts "-L${Geant4_lib} -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global ${CLHEP_linkopts}" |
---|
30 | |
---|
31 | # Waiting Geant4 DLL on Windows... |
---|
32 | # Darwin : problem too with dylibs. |
---|
33 | macro MEMPHYS_libopts "" WIN32 " -no_share" Darwin " -no_share" |
---|
34 | #macro MEMPHYS_libopts "" WIN32 "" |
---|
35 | |
---|
36 | #////////////////////////////////////////////////// |
---|
37 | #/// Over Geant4 kernel and AIDA interfaces only // |
---|
38 | #////////////////////////////////////////////////// |
---|
39 | |
---|
40 | # Over Geant4 and AIDA only : |
---|
41 | library MEMPHYSCore ${MEMPHYS_libopts} -s=../source *.cxx |
---|
42 | |
---|
43 | #JEC 17/11/05 add the G4readout_incs to manage G4DigiManager |
---|
44 | macro MEMPHYSCore_cppflags "${OSC_AIDA_incs} ${MEMPHYS_Geant4_incs} ${G4readout_incs} ${G4particles_incs} ${G4processes_incs}" |
---|
45 | #macro MEMPHYSCore_shlibflags "${MEMPHYS_Geant4_linkopts}" |
---|
46 | macro MEMPHYSCore_linkopts "-L${MEMPHYSROOT}/$(Platform_bin) -lMEMPHYSCore" WIN32 "${MEMPHYSROOT}\$(Platform_bin)\MEMPHYSCore.lib" |
---|
47 | |
---|
48 | #////////////////////////////////////////////////// |
---|
49 | #/// DLD callbacks //////////////////////////////// |
---|
50 | #////////////////////////////////////////////////// |
---|
51 | |
---|
52 | # Must not use Geant4 singletons if having not Geant4 shared libs. |
---|
53 | macro MEMPHYS_kind "dll" |
---|
54 | library MEMPHYS -s=../source/Callbacks Callbacks.cxx InventorCallbacks.cxx |
---|
55 | #macro MEMPHYS_cppflags "${MEMPHYS_Geant4_incs} ${OSC_OnX_incs}" |
---|
56 | macro MEMPHYS_cppflags "${OSC_Geant4_incs} ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}" |
---|
57 | macro MEMPHYS_shlibflags "${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}" |
---|
58 | |
---|
59 | #////////////////////////////////////////////////// |
---|
60 | #/// Application "a la Geant4 examples" /////////// |
---|
61 | #////////////////////////////////////////////////// |
---|
62 | |
---|
63 | # Over Geant4 and AIDA only : |
---|
64 | application MEMPHYS_batch ../applications/MEMPHYS_batch.cxx use_linkopts='"${MEMPHYSCore_linkopts} ${G4physics_lists_hadronic_linkopts} ${MEMPHYS_Geant4_linkopts} ${OSC_AIDA_linkopts}"' |
---|
65 | macro MEMPHYS_batch_cppflags "${MEMPHYSCore_cppflags} ${G4physics_lists_hadronic_incs}" |
---|
66 | |
---|
67 | # Over AIDA only : |
---|
68 | application MEMPHYS_analysis ../applications/MEMPHYS_analysis.cxx use_linkopts='"$(OSC_AIDA_linkopts)"' |
---|
69 | |
---|
70 | # Over G4Lab : |
---|
71 | application MEMPHYS_session ../applications/MEMPHYS_session.cxx ../applications/HitsCollectionAccessor.cxx use_linkopts='"${MEMPHYSCore_linkopts} ${G4physics_lists_hadronic_linkopts} ${OSC_Geant4_linkopts} ${MEMPHYS_Geant4_linkopts} ${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"' |
---|
72 | macro MEMPHYS_session_cppflags "${MEMPHYS_Geant4_incs} ${MEMPHYS_batch_cppflags}" |
---|
73 | |
---|
74 | application test -group=debug -s=../source test.cxx |
---|
75 | |
---|
76 | #////////////////////////////////////////////////// |
---|
77 | #/// Things using ROOT //////////////////////////// |
---|
78 | #////////////////////////////////////////////////// |
---|
79 | use ROOT v1r* Interfaces |
---|
80 | |
---|
81 | # Example of ROOT program to work on a MEMPHYS.root file : |
---|
82 | application MEMPHYS_analysis_ROOT -group=ROOT ../applications/MEMPHYS_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}"' |
---|
83 | |
---|
84 | # Compiled version of scripts/ROOT/aida.C |
---|
85 | application MEMPHYS_analysis_aida_ROOT -group=ROOT ../applications/MEMPHYS_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}"' |
---|
86 | macro MEMPHYS_analysis_aida_ROOT_cppflags "${OSC_AIDA_incs}" |
---|
87 | |
---|
88 | # Declare AIDA to rootcint. |
---|
89 | # See scripts/ROOT/aida.C for a usage example. |
---|
90 | |
---|
91 | macro MEMPHYS_cint_cintflags "${OSC_AIDA_incs}" |
---|
92 | macro MEMPHYS_cint_LinkDef_h "../source/ROOT/LinkDef.h" |
---|
93 | document rootcint MEMPHYS_rootcint_AIDA -group=ROOT ${MEMPHYSROOT}/source/ROOT/MEMPHYS_cint.h |
---|
94 | |
---|
95 | library MEMPHYSAIDADict -group=ROOT -import=ROOT ${dict}/MEMPHYS_cintDict.cpp |
---|
96 | macro MEMPHYSAIDADict_shlibflags "$(OSC_AIDA_linkopts) ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}" |
---|
97 | |
---|
98 | #////////////////////////////////////////////////// |
---|
99 | #////////////////////////////////////////////////// |
---|
100 | #////////////////////////////////////////////////// |
---|
101 | |
---|
102 | private |
---|
103 | macro build_library_links "true" WIN32 "" |
---|
104 | macro remove_library_links "true" WIN32 "" |
---|
105 | |
---|
106 | # WIN32 : /GR to enable RTTI and dynamic cast. |
---|
107 | # WIN32 : /GX to enable exception handling (for STL). |
---|
108 | macro_append cppflags "" WIN32 " /GX /GR" |
---|
109 | |
---|
110 | # DEBUG : |
---|
111 | #macro_append cflags " -g" WIN32 " /ZI /Od" |
---|
112 | #macro_append cppflags " -g" WIN32 " /ZI /Od" |
---|
113 | #macro_append cpplinkflags " -g" WIN32 " /DEBUG" |
---|
114 | |
---|
115 | # OPTIMIZE : |
---|
116 | macro_append cflags " -O" WIN32 " /O2" |
---|
117 | macro_append cppflags " -O" WIN32 " /O2" |
---|
118 | macro_append cpplinkflags " -O" WIN32 "" |
---|
119 | public |
---|
120 | |
---|
121 | #////////////////////////////////////////////////// |
---|
122 | #// Run time ////////////////////////////////////// |
---|
123 | #////////////////////////////////////////////////// |
---|
124 | |
---|
125 | apply_pattern Platform_paths |
---|
126 | |
---|