Moved from AliTransbit to AliL3Transbit.
[u/mrichter/AliRoot.git] / conf / Fluka.gmk
1 # $Id$
2  
3 ################### Geant4 specific definitions ################################
4
5 # include $(FLUGGINSTALL)/config/architecture.gmk
6
7 ifdef G4GEOMETRY_DEBUG
8   CPPFLAGS += -DG4GEOMETRY_DEBUG
9 endif  
10
11 #
12 # C++ compilation flags
13 #
14
15 ifeq ($(ALICE_TARGET),Linux)
16
17 # Redefinition of -Wall option 
18 # in order to exclude warnings from G4 
19 # excluded for Geant4: -Wswitch -Wunused
20
21   CXXOPTS := $(filter-out -Wall,$(CXXOPTS))
22   CXXOPTS += -Wimplicit-int -Wimplicit-function-declaration\
23              -Wimplicit -Wmain -Wreturn-type -Wcomment \
24              -Wtrigraphs -Wformat -Wchar-subscripts \
25              -Wparentheses              
26   CXXOPTS := $(patsubst -O%,-O% -Wuninitialized,$(CXXOPTS))
27 endif
28
29 ifeq ($(ALICE_TARGET),HP-UX.aCC)
30
31 # Adding options: 
32 # +Onolimit - excludes warnings from G4 
33 # +DAportable - necessary (if not set, run time error from object space)                         
34
35   CXXOPTS := $(patsubst -O%,-O% +Onolimit,$(CXXOPTS))
36   CXXOPTS := $(patsubst +O%,+O% +Onolimit,$(CXXOPTS))
37   CXXOPTS += +DAportable
38 endif  
39  
40 ifeq ($(ALICE_TARGET),OSF1)
41
42   CXXOPTS := $(filter-out -nostdnew,$(CXXOPTS))
43   CXXOPTS := $(filter-out -nortti,$(CXXOPTS))
44   CXXOPTS += -ieee -timplicit_local
45   ifndef G4NO_STD_NAMESPACE
46     G4USE_STD_NAMESPACE := yes
47     CXXOPTS += -std strict_ansi
48   endif
49
50 endif  
51
52 ifeq ($(ALICE_TARGET),SunOS)
53
54   # Excluded of +w option 
55   # in order to exclude warnings from G4 
56   CXXOPTS := $(filter-out +w,$(CXXOPTS))
57
58 endif  
59
60 #
61 # Geant4 include paths
62 #
63
64 #include $(G4INSTALL)/config/G4UI_USE.gmk
65 #include $(G4INSTALL)/config/G4VIS_USE.gmk
66 #include $(G4INSTALL)/config/interactivity.gmk
67 ifndef INCFLAGS
68   INCFLAGS := \
69               -I$(G4BASE_G4)/global/management/include \
70               -I$(G4BASE_G4)/global/STLInterface \
71               -I$(G4BASE_G4)/global/HEPRandom/include \
72               -I$(G4BASE_G4)/global/HEPGeometry/include \
73               -I$(G4BASE_G4)/global/HEPNumerics/include \
74               -I$(G4BASE_G4)/materials/include \
75               -I$(G4BASE_G4)/geometry/management/include \
76               -I$(G4BASE_G4)/geometry/solids/CSG/include \
77               -I$(G4BASE_G4)/geometry/solids/specific/include \
78               -I$(G4BASE_G4)/geometry/solids/BREPS/include \
79               -I$(G4BASE_G4)/geometry/solids/Boolean/include \
80               -I$(G4BASE_G4)/geometry/solids/STEP/include \
81               -I$(G4BASE_G4)/geometry/solids/STEPinterface/include \
82               -I$(G4BASE_G4)/geometry/volumes/include \
83               -I$(G4BASE_G4)/geometry/magneticfield/include \
84               -I$(G4BASE_G4)/graphics_reps/include \
85               -I$(G4BASE_G4)/intercoms/include \
86               -I$(G4BASE_G4)/source/g3tog4/include \
87               -I$(G4BASE)/dummyG4/include \
88               -I$(G4BASE)/Wrappers/include
89 endif
90 CPPFLAGS += $(INCFLAGS)
91 LDFLAGS += -L$(G4LIBDIR) 
92
93 # Addded for FLUGG: fortan and fluka libraries path
94 LDFLAGS += -L$(FORLIB) -L/lib -L$(FLUKA)
95
96 #
97 # Geant4 libraries
98 #
99
100 ifdef NEED_G4_LIBS
101
102 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
103 G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
104 G4LIBDIR_G4 := $(G4LIB_G4)/$(G4SYSTEM)
105 LDFLAGS += -L$(G4LIBDIR) -L$(G4LIBDIR_G4) -L$(CLHEP_LIB_DIR)
106
107 ifdef LDLIBS
108   USER_DEFINED_LDLIBS := 1
109 endif
110
111 # Because of the script for granular libraries which replaces part of LDLIBS
112 # and because of the way user defined LDLIBS was augmented historically I
113 # have split LDLIBS into 4 parts...
114 #
115
116 ifndef USER_DEFINED_LDLIBS
117
118 # LDLIBS1 contains the very high level libraries...
119 #
120 ifdef G4EXLIB
121   LDLIBS1 := -l$(G4TARGET)
122 endif
123   LDLIBS1 += $(EXTRALIBS)
124   LDLIBS1 += $(VISLIBS) $(UILIBS)
125
126 # test if global libraries are present
127 GLOBALLIBS := $(shell test -f $(G4LIBDIR)/libG4global.$(SL) && echo yes)
128
129 ifdef GLOBALLIBS
130   LDLIBS2 := \
131         -lG4geometry \
132         -lG4materials \
133         -lG4graphics_reps \
134         -lG4intercoms \
135         -lG4dummy \
136         -lG4global
137 else
138   LDLIBS2 := \
139         -lFggWrappers \
140         -lG4geometrymng \
141         -lG4volumes \
142         -lG4csg \
143         -lG4specsolids \
144         -lG4geomBoolean \
145         -lG4brep \
146         -lG4step \
147         -lG4stepinterface \
148         -lG4geomver \
149         -lG4magneticfield \
150         -lG4materials \
151         -lG4graphics_reps \
152         -lG4intercoms \
153         -lG4dummy \
154         -lG4hepnumerics \
155         -lG4globman
156 endif   
157
158 # Warning: do not add to LDLIBS2 with += becuase this causes it to be
159 # expanded too soon.  Hence extra libraries must have a different name...
160 # Extra libraries to resolve remaining circular dependencies...
161 #  LDLIBS2EXTRA = 
162
163 # LDLIBS3 contains the first set of low level libraries...
164 #
165   LDLIBS3 += $(INTYLIBS)
166
167 endif # ifndef USER_DEFINED_LDLIBS
168
169 # LDLIBS4 contains the next set of low level libraries which historically
170 # (why?) the user is not supposed to be able to define...
171 #
172 ifdef G4USE_OSPACE
173   LDLIBS4 += $(OSPACELIBS)
174 endif
175
176   LDLIBS4 += $(LOADLIBS)
177
178 # Finally assemble libraries...
179 #
180 ifdef USER_DEFINED_LDLIBS
181   LDLIBS_PREFINAL := $(LDLIBS)
182 else
183   LDLIBS_PREFINAL = $(LDLIBS1) -lG3toG4 $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
184 endif
185   LDLIBS_PREFINAL += $(LDLIBS4)
186
187 LDLIBS = $(LDLIBS_PREFINAL)
188
189 # Addded for FLUGG: fortan and fluka libraries
190 LDLIBS += -lc
191 LDLIBS += -lflukahp
192 LDLIBS += -lg2c -lstdc++
193
194 G4LDLIBS = $(LDLIBS)
195
196 endif #ifdef NEED_G4_LIBS
197