]>
Commit | Line | Data |
---|---|---|
a4c95ff7 | 1 | # $Id$ |
2 | ||
3 | ################### Geant4 specific definitions ################################ | |
4 | ||
5 | # include $(G4INSTALL)/config/architecture.gmk | |
6 | ||
7 | # Alice options flags | |
8 | ifdef AG4_VISUALIZE | |
9 | CPPFLAGS += -DALICE_VISUALIZE | |
10 | endif | |
11 | ||
12 | ifdef AG4_STACKING | |
13 | CPPFLAGS += -DALICE_STACKING | |
14 | endif | |
15 | ||
16 | ifdef AG4_NOPHYSICS | |
17 | CPPFLAGS += -DALICE_EMPTY_PHYSICS_LIST | |
18 | endif | |
19 | ||
20 | # | |
21 | # C++ compilation flags | |
22 | # | |
23 | ||
24 | ifeq ($(ALICE_TARGET),Linux) | |
25 | ||
26 | # Redefinition of -Wall option | |
27 | # in order to exclude warnings from G4 | |
28 | # excluded for Geant4: -Wswitch -Wunused | |
29 | ||
30 | CXXOPTS := $(filter-out -Wall,$(CXXOPTS)) | |
31 | CXXOPTS += -Wimplicit-int -Wimplicit-function-declaration\ | |
32 | -Wimplicit -Wmain -Wreturn-type -Wcomment \ | |
33 | -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized \ | |
34 | -Wparentheses | |
35 | endif | |
36 | ||
37 | # | |
38 | # Geant4 include paths | |
39 | # | |
40 | ||
41 | include $(G4INSTALL)/config/G4UI_USE.gmk | |
42 | include $(G4INSTALL)/config/G4VIS_USE.gmk | |
43 | include $(G4INSTALL)/config/interactivity.gmk | |
44 | ifndef INCFLAGS | |
45 | INCFLAGS := \ | |
46 | -I$(G4BASE)/global/management/include \ | |
47 | -I$(G4BASE)/global/HEPRandom/include \ | |
48 | -I$(G4BASE)/global/HEPGeometry/include \ | |
49 | -I$(G4BASE)/global/HEPNumerics/include \ | |
50 | -I$(G4BASE)/run/include \ | |
51 | -I$(G4BASE)/materials/include \ | |
52 | -I$(G4BASE)/particles/management/include \ | |
53 | -I$(G4BASE)/particles/bosons/include \ | |
54 | -I$(G4BASE)/particles/leptons/include \ | |
55 | -I$(G4BASE)/particles/hadrons/barions/include \ | |
56 | -I$(G4BASE)/particles/hadrons/ions/include \ | |
57 | -I$(G4BASE)/particles/hadrons/mesons/include \ | |
58 | -I$(G4BASE)/particles/shortlived/include \ | |
59 | -I$(G4BASE)/processes/management/include \ | |
60 | -I$(G4BASE)/processes/general/include \ | |
61 | -I$(G4BASE)/processes/decay/include \ | |
62 | -I$(G4BASE)/processes/optical/include \ | |
63 | -I$(G4BASE)/processes/transportation/include \ | |
64 | -I$(G4BASE)/processes/parameterisation/include \ | |
65 | -I$(G4BASE)/processes/electromagnetic/standard/include \ | |
66 | -I$(G4BASE)/processes/electromagnetic/muons/include \ | |
67 | -I$(G4BASE)/processes/electromagnetic/utils/include \ | |
68 | -I$(G4BASE)/processes/electromagnetic/xrays/include \ | |
69 | -I$(G4BASE)/processes/electromagnetic/lowenergy/include \ | |
70 | -I$(G4BASE)/processes/hadronic/management/include \ | |
71 | -I$(G4BASE)/processes/hadronic/processes/include \ | |
72 | -I$(G4BASE)/processes/hadronic/util/include \ | |
73 | -I$(G4BASE)/processes/hadronic/cross_sections/include \ | |
74 | -I$(G4BASE)/processes/hadronic/models/generator/de_excitation/include \ | |
75 | -I$(G4BASE)/processes/hadronic/models/generator/diffractive_string/include \ | |
76 | -I$(G4BASE)/processes/hadronic/models/generator/high_energy/include \ | |
77 | -I$(G4BASE)/processes/hadronic/models/generator/kinetic_model/include \ | |
78 | -I$(G4BASE)/processes/hadronic/models/generator/management/include \ | |
79 | -I$(G4BASE)/processes/hadronic/models/generator/pre_equilibrium/include \ | |
80 | -I$(G4BASE)/processes/hadronic/models/generator/quark_gluon_string/include \ | |
81 | -I$(G4BASE)/processes/hadronic/models/generator/string_common/include \ | |
82 | -I$(G4BASE)/processes/hadronic/models/generator/string_fragmentation/include \ | |
83 | -I$(G4BASE)/processes/hadronic/models/generator/util/include \ | |
84 | -I$(G4BASE)/processes/hadronic/models/high_energy/include \ | |
85 | -I$(G4BASE)/processes/hadronic/models/low_energy/include \ | |
86 | -I$(G4BASE)/processes/hadronic/models/neutron_hp/include \ | |
87 | -I$(G4BASE)/processes/hadronic/models/isotope_production/include \ | |
88 | -I$(G4BASE)/processes/hadronic/stopping/include \ | |
89 | -I$(G4BASE)/geometry/management/include \ | |
90 | -I$(G4BASE)/geometry/solids/CSG/include \ | |
91 | -I$(G4BASE)/geometry/solids/specific/include \ | |
92 | -I$(G4BASE)/geometry/solids/BREPS/include \ | |
93 | -I$(G4BASE)/geometry/solids/Boolean/include \ | |
94 | -I$(G4BASE)/geometry/solids/STEP/include \ | |
95 | -I$(G4BASE)/geometry/solids/STEPinterface/include \ | |
96 | -I$(G4BASE)/geometry/volumes/include \ | |
97 | -I$(G4BASE)/geometry/magneticfield/include \ | |
98 | -I$(G4BASE)/track/include \ | |
99 | -I$(G4BASE)/tracking/include \ | |
100 | -I$(G4BASE)/digits+hits/detector/include \ | |
101 | -I$(G4BASE)/digits+hits/hits/include \ | |
102 | -I$(G4BASE)/digits+hits/digits/include \ | |
103 | -I$(G4BASE)/readout/include \ | |
104 | -I$(G4BASE)/event/include \ | |
105 | -I$(G4BASE)/graphics_reps/include \ | |
106 | -I$(G4BASE)/intercoms/include \ | |
107 | -I$(G4BASE)/g3tog4/include | |
108 | ||
109 | endif | |
110 | CPPFLAGS += $(INCFLAGS) | |
111 | ||
112 | # | |
113 | # Geant4 libraries | |
114 | # | |
115 | ||
116 | ifdef NEED_G4_LIBS | |
117 | ||
118 | G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET) | |
119 | G4LIBDIR := $(G4LIB)/$(G4SYSTEM) | |
120 | LDFLAGS += -L$(G4LIBDIR) | |
121 | ||
122 | ifdef LDLIBS | |
123 | USER_DEFINED_LDLIBS := 1 | |
124 | endif | |
125 | ||
126 | # Because of the script for granular libraries which replaces part of LDLIBS | |
127 | # and because of the way user defined LDLIBS was augmented historically I | |
128 | # have split LDLIBS into 4 parts... | |
129 | # | |
130 | ||
131 | ifndef USER_DEFINED_LDLIBS | |
132 | ||
133 | # LDLIBS1 contains the very high level libraries... | |
134 | # | |
135 | ifdef G4EXLIB | |
136 | LDLIBS1 := -l$(G4TARGET) | |
137 | endif | |
138 | LDLIBS1 += $(EXTRALIBS) | |
139 | LDLIBS1 += $(VISLIBS) $(UILIBS) | |
140 | ||
141 | # test if global libraries are present | |
142 | GLOBALLIBS := $(shell test -f $(G4LIBDIR)/libG4global.$(SL) && echo yes) | |
143 | ||
144 | ifdef GLOBALLIBS | |
145 | LDLIBS2 := \ | |
146 | -lG4readout \ | |
147 | -lG4run \ | |
148 | -lG4event \ | |
149 | -lG4tracking \ | |
150 | -lG4processes \ | |
151 | -lG4particles \ | |
152 | -lG4digits+hits \ | |
153 | -lG4track \ | |
154 | -lG4materials \ | |
155 | -lG4geometry \ | |
156 | -lG4geometry \ | |
157 | -lG4graphics_reps \ | |
158 | -lG4intercoms \ | |
159 | -lG4global | |
160 | else | |
161 | DUMMY := $(shell \ | |
162 | if [ ! \( -f $(G4INSTALL)/lib/$(G4SYSTEM)/list \) ]; then \ | |
163 | $(G4INSTALL)/lib/$(G4SYSTEM)/liblist \ | |
164 | -d $(G4INSTALL)/tmp/$(G4SYSTEM) \ | |
165 | < $(G4INSTALL)/lib/$(G4SYSTEM)/libname.map \ | |
166 | > $(G4INSTALL)/lib/$(G4SYSTEM)/list; fi ) | |
167 | # Extra libraries to resolve remaining circular dependencies... | |
168 | LDLIBS2 := $(shell cat $(G4INSTALL)/lib/$(G4SYSTEM)/list) | |
169 | LDLIBS2 += -lG4xrays -lG4optical -lG4muons | |
170 | endif | |
171 | ||
172 | # Warning: do not add to LDLIBS2 with += becuase this causes it to be | |
173 | # expanded too soon. Hence extra libraries must have a different name... | |
174 | # Extra libraries to resolve remaining circular dependencies... | |
175 | # LDLIBS2EXTRA = | |
176 | ||
177 | # LDLIBS3 contains the first set of low level libraries... | |
178 | # | |
179 | LDLIBS3 += $(INTYLIBS) | |
180 | ||
181 | endif # ifndef USER_DEFINED_LDLIBS | |
182 | ||
183 | # LDLIBS4 contains the next set of low level libraries which historically | |
184 | # (why?) the user is not supposed to be able to define... | |
185 | # | |
186 | ifdef G4USE_OSPACE | |
187 | LDLIBS4 += $(OSPACELIBS) | |
188 | endif | |
189 | ||
190 | LDLIBS4 += $(LOADLIBS) | |
191 | ||
192 | # Finally assemble libraries... | |
193 | # | |
194 | ifdef USER_DEFINED_LDLIBS | |
195 | LDLIBS_PREFINAL := $(LDLIBS) | |
196 | else | |
197 | LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3) | |
198 | endif | |
199 | LDLIBS_PREFINAL += $(LDLIBS4) | |
200 | ||
201 | LDLIBS = $(LDLIBS_PREFINAL) | |
202 | ||
203 | G4LDLIBS = $(LDLIBS) -lG3toG4 | |
204 | ||
205 | endif #ifdef NEED_G4_LIBS | |
206 |