Removing AliMCProcess and AliMC
[u/mrichter/AliRoot.git] / conf / Geant4.gmk
1 # $Id$
2  
3 ################### Geant4 specific definitions ################################
4
5 # include $(G4INSTALL)/config/architecture.gmk
6
7 #
8 # C++ compilation flags
9 #
10
11 ifeq ($(ALICE_TARGET),Linux)
12
13 # Redefinition of -Wall option 
14 # in order to exclude warnings from G4 
15 # excluded for Geant4: -Wswitch -Wunused
16
17 #  CXXOPTS := $(filter-out -Wall,$(CXXOPTS))
18 #  CXXOPTS += -Wimplicit-int -Wimplicit-function-declaration\
19 #            -Wimplicit -Wmain -Wreturn-type -Wcomment \
20 #            -Wtrigraphs -Wformat -Wchar-subscripts \
21 #            -Wparentheses              
22 #  CXXOPTS := $(patsubst -O%,-O% -Wuninitialized,$(CXXOPTS))
23
24 #####  CXXOPTS += -ansi -pedantic -fno-for-scope -DGNU_GCC
25   CXXOPTS += -fno-for-scope -DGNU_GCC
26
27 # Motif, Xt libraries
28   G4GLIBS := -L/usr/lib/Motif1.2_R6 -lXm -L/usr/lib -lXt
29 endif
30
31 ifeq ($(ALICE_TARGET),HP-UX.aCC)
32
33 # Adding options: 
34 # +Onolimit - excludes warnings from G4 
35 # +DAportable - necessary (if not set, run time error from object space)                         
36
37   CXXOPTS := $(patsubst -O%,-O% +Onolimit,$(CXXOPTS))
38   CXXOPTS := $(patsubst +O%,+O% +Onolimit,$(CXXOPTS))
39   CXXOPTS += +DAportable
40
41 # Motif, Xt libraries
42   G4GLIBS := -L/usr/lib/Motif1.2_R6 -lXm -L/usr/lib -lXt                   
43 endif  
44  
45 ifeq ($(ALICE_TARGET),OSF1)
46
47   CXXOPTS := $(filter-out -nostdnew,$(CXXOPTS))
48   CXXOPTS := $(filter-out -nortti,$(CXXOPTS))
49   CXXOPTS += -ieee -timplicit_local
50   ifndef G4NO_STD_NAMESPACE
51     G4USE_STD_NAMESPACE := yes
52     CXXOPTS += -std strict_ansi
53   endif
54
55 endif  
56
57 ifeq ($(ALICE_TARGET),SunOS)
58
59   # Excluded of +w option 
60   # in order to exclude warnings from G4 
61   CXXOPTS := $(filter-out +w,$(CXXOPTS))
62
63 endif  
64
65 #
66 # Geant4 include paths
67 #
68
69 include $(G4INSTALL)/config/G4UI_USE.gmk
70 include $(G4INSTALL)/config/G4VIS_USE.gmk
71 include $(G4INSTALL)/config/interactivity.gmk
72 ifndef INCFLAGS
73   INCFLAGS := \
74               -I$(G4BASE)/global/management/include \
75               -I$(G4BASE)/global/HEPRandom/include \
76               -I$(G4BASE)/global/HEPGeometry/include \
77               -I$(G4BASE)/global/HEPNumerics/include \
78               -I$(G4BASE)/run/include \
79               -I$(G4BASE)/materials/include \
80               -I$(G4BASE)/particles/management/include \
81               -I$(G4BASE)/particles/bosons/include \
82               -I$(G4BASE)/particles/leptons/include \
83               -I$(G4BASE)/particles/hadrons/barions/include \
84               -I$(G4BASE)/particles/hadrons/ions/include \
85               -I$(G4BASE)/particles/hadrons/mesons/include \
86               -I$(G4BASE)/particles/shortlived/include \
87               -I$(G4BASE)/processes/management/include \
88               -I$(G4BASE)/processes/general/include \
89               -I$(G4BASE)/processes/decay/include \
90               -I$(G4BASE)/processes/optical/include \
91               -I$(G4BASE)/processes/transportation/include \
92               -I$(G4BASE)/processes/parameterisation/include \
93               -I$(G4BASE)/processes/electromagnetic/standard/include \
94               -I$(G4BASE)/processes/electromagnetic/muons/include \
95               -I$(G4BASE)/processes/electromagnetic/utils/include \
96               -I$(G4BASE)/processes/electromagnetic/xrays/include \
97               -I$(G4BASE)/processes/electromagnetic/lowenergy/include \
98               -I$(G4BASE)/processes/hadronic/management/include \
99               -I$(G4BASE)/processes/hadronic/processes/include \
100               -I$(G4BASE)/processes/hadronic/util/include \
101               -I$(G4BASE)/processes/hadronic/cross_sections/include \
102               -I$(G4BASE)/processes/hadronic/models/generator/de_excitation/include \
103               -I$(G4BASE)/processes/hadronic/models/generator/diffractive_string/include \
104               -I$(G4BASE)/processes/hadronic/models/generator/high_energy/include \
105               -I$(G4BASE)/processes/hadronic/models/generator/kinetic_model/include \
106               -I$(G4BASE)/processes/hadronic/models/generator/management/include \
107               -I$(G4BASE)/processes/hadronic/models/generator/pre_equilibrium/include \
108               -I$(G4BASE)/processes/hadronic/models/generator/quark_gluon_string/include \
109               -I$(G4BASE)/processes/hadronic/models/generator/string_common/include \
110               -I$(G4BASE)/processes/hadronic/models/generator/string_fragmentation/include \
111               -I$(G4BASE)/processes/hadronic/models/generator/util/include \
112               -I$(G4BASE)/processes/hadronic/models/high_energy/include \
113               -I$(G4BASE)/processes/hadronic/models/low_energy/include \
114               -I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
115               -I$(G4BASE)/processes/hadronic/models/isotope_production/include \
116               -I$(G4BASE)/processes/hadronic/stopping/include \
117               -I$(G4BASE)/geometry/management/include \
118               -I$(G4BASE)/geometry/solids/CSG/include \
119               -I$(G4BASE)/geometry/solids/specific/include \
120               -I$(G4BASE)/geometry/solids/BREPS/include \
121               -I$(G4BASE)/geometry/solids/Boolean/include \
122               -I$(G4BASE)/geometry/solids/STEP/include \
123               -I$(G4BASE)/geometry/solids/STEPinterface/include \
124               -I$(G4BASE)/geometry/volumes/include \
125               -I$(G4BASE)/geometry/magneticfield/include \
126               -I$(G4BASE)/track/include \
127               -I$(G4BASE)/tracking/include \
128               -I$(G4BASE)/digits+hits/detector/include \
129               -I$(G4BASE)/digits+hits/hits/include \
130               -I$(G4BASE)/digits+hits/digits/include \
131               -I$(G4BASE)/readout/include \
132               -I$(G4BASE)/event/include \
133               -I$(G4BASE)/graphics_reps/include \
134               -I$(G4BASE)/intercoms/include \
135               -I$(G4BASE)/g3tog4/include
136
137 endif
138 CPPFLAGS += $(INCFLAGS)
139
140 #
141 # Geant4 libraries
142 #
143
144 ifdef NEED_G4_LIBS
145
146 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
147 G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
148 LDFLAGS += -L$(G4LIBDIR) -L$(CLHEP_LIB_DIR)
149
150 ifdef LDLIBS
151   USER_DEFINED_LDLIBS := 1
152 endif
153
154 # Because of the script for granular libraries which replaces part of LDLIBS
155 # and because of the way user defined LDLIBS was augmented historically I
156 # have split LDLIBS into 4 parts...
157 #
158
159 ifndef USER_DEFINED_LDLIBS
160
161 # LDLIBS1 contains the very high level libraries...
162 #
163 ifdef G4EXLIB
164   LDLIBS1 := -l$(G4TARGET)
165 endif
166   LDLIBS1 += $(EXTRALIBS)
167   LDLIBS1 += $(VISLIBS) $(UILIBS)
168
169 # test if global libraries are present
170 GLOBALLIBS := $(shell test -f $(G4LIBDIR)/libG4global.$(SL) && echo yes)
171
172 ifdef GLOBALLIBS
173   LDLIBS2 := \
174         -lG4readout \
175         -lG4run \
176         -lG4event \
177         -lG4tracking \
178         -lG4processes \
179         -lG4particles \
180         -lG4digits+hits \
181         -lG4track \
182         -lG4materials \
183         -lG4geometry \
184         -lG4geometry \
185         -lG4graphics_reps \
186         -lG4intercoms \
187         -lG4global 
188 else
189 ###  DUMMY := $(shell \
190 ###        if [ ! \( -f $(G4INSTALL)/lib/$(G4SYSTEM)/list \) ]; then \
191 ###     $(G4INSTALL)/lib/$(G4SYSTEM)/liblist  \
192 ###     -d $(G4INSTALL)/tmp/$(G4SYSTEM) \
193 ###     < $(G4INSTALL)/lib/$(G4SYSTEM)/libname.map \
194 ###     > $(G4INSTALL)/lib/$(G4SYSTEM)/list; fi )
195 # Extra libraries to resolve remaining circular dependencies...    
196 ###  LDLIBS2 := $(shell cat $(G4INSTALL)/lib/$(G4SYSTEM)/list)
197         
198 ### The list generated by liblist program is incomplete;
199 #   the libraries are listed explicitely here
200
201 LDLIBS2 = -lG4brep -lG4geomBoolean -lG4step -lG4emstandard -lG4muons \
202           -lG4decay -lG4parameterisation -lG4vis_management \
203           -lG4hadronic_hetcpp_utils -lG4hadronic_stringfrag \
204           -lG4hadronic_string_common -lG4hadronic_body_ci \
205           -lG4shortlived -lG4hadronic_neu -lG4hadronic_deex \
206           -lG4hadronic_HE -lG4hadronic_util_gen -lG4modeling \
207           -lG4hadronic_proc -lG4hadronic_man_gen -lG4hadronic_LE \
208           -lG4hadronic_mgt -lG4hadronic_xsect -lG4hadronic_util \
209           -lG4hadronic_stop -lG4optical -lG4xrays -lG4ions -lG4mesons \
210           -lG4baryons -lG4run -lG4event -lG4bosons -lG4tracking \
211           -lG4transportation -lG4emutils -lG4detector -lG4hits \
212           -lG4leptons -lG4procman -lG4volumes -lG4digits -lG4geomver \
213           -lG4track -lG4UIcommon -lG4partman -lG4specsolids -lG4csg \
214           -lG4hepnumerics -lG4magneticfield -lG4geometrymng \
215           -lG4materials -lG4intercoms -lG4graphics_reps -lG4geombias -lG4globman
216 #  LDLIBS2 += -lG4xrays -lG4optical -lG4muons
217 endif   
218
219 # Warning: do not add to LDLIBS2 with += becuase this causes it to be
220 # expanded too soon.  Hence extra libraries must have a different name...
221 # Extra libraries to resolve remaining circular dependencies...
222 #  LDLIBS2EXTRA = 
223
224 # LDLIBS3 contains the first set of low level libraries...
225 #
226   LDLIBS3 += $(INTYLIBS) $(G4GLIBS)
227
228 endif # ifndef USER_DEFINED_LDLIBS
229
230 # LDLIBS4 contains the next set of low level libraries which historically
231 # (why?) the user is not supposed to be able to define...
232 #
233 ifdef G4USE_OSPACE
234   LDLIBS4 += $(OSPACELIBS)
235 endif
236
237   LDLIBS4 += $(LOADLIBS)
238
239 # Finally assemble libraries...
240 #
241 ifdef USER_DEFINED_LDLIBS
242   LDLIBS_PREFINAL := $(LDLIBS)
243 else
244   LDLIBS_PREFINAL = $(LDLIBS1) -lG3toG4 $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
245 endif
246   LDLIBS_PREFINAL += $(LDLIBS4)
247
248 LDLIBS = $(LDLIBS_PREFINAL)
249
250 G4LDLIBS = $(LDLIBS)
251
252 endif #ifdef NEED_G4_LIBS
253