]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/Makefile.arch
Do not set default CDB storage, if not defined, but return Fatal.
[u/mrichter/AliRoot.git] / HLT / PHOS / Makefile.arch
1 # -*- mode: makefile -*-
2 #
3 # Makefile containing platform dependencies for ROOT based projects.
4 #
5 # Copyright (c) 2000 Rene Brun and Fons Rademakers
6 #
7 # Author: Fons Rademakers, 29/2/2000
8
9 ROOTCONFIG   := root-config
10
11 ARCH         := $(shell $(ROOTCONFIG) --arch)
12 PLATFORM     := $(shell $(ROOTCONFIG) --platform)
13
14 CXX           =
15 ObjSuf        = o
16 SrcSuf        = cxx
17 ExeSuf        =
18 DllSuf        = so
19 OutPutOpt     = -o # keep whitespace after "-o"
20
21 ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
22 ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
23 ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
24 ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
25 HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
26
27 ifeq ($(ARCH),linux)
28 # Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
29
30 CXX           = g++
31 #CXXFLAGS      = -O9 -Wall -fPIC
32
33 #CXXFLAGS      = -O9 -Wall -fPIC -g
34 #CXXFLAGS      = -O9 -Wall 
35 CXXFLAGS      = -O9 -g -Wall 
36 #CXXFLAGS      = -g -Wall 
37
38 LD            = g++
39 LDFLAGS       = -O
40 SOFLAGS       = -shared
41 endif
42
43 ifeq ($(ARCH),hpuxacc)
44 # HP-UX 10.x with aCC
45 CXX           = aCC
46 CXXFLAGS      = -O +Z
47 LD            = aCC
48 LDFLAGS       = -O -z
49 SOFLAGS       = -b
50 endif
51
52 ifeq ($(ARCH),hpuxia64acc)
53 # HP-UX 11i 1.5 (IA-64) with aCC
54 CXX           = aCC
55 CXXFLAGS      = +DD64 -O +Z
56 LD            = aCC
57 LDFLAGS       = +DD64 -O -z
58 SOFLAGS       = -b
59 endif
60
61 ifeq ($(ARCH),hpuxgcc)
62 # HP-UX 10.x with g++
63 CXXFLAGS      = -O -fPIC
64 CXX           = g++
65 LD            = g++
66 LDFLAGS       = -O
67 SOFLAGS       = -fPIC -shared
68 endif
69
70 ifeq ($(ARCH),hurddeb)
71 # GNU/Hurd
72 CXX           = g++
73 CXXFLAGS      = -O2 -Wall -fPIC
74 LD            = g++
75 LDFLAGS       = -O2
76 SOFLAGS       = -shared
77 endif
78
79 ifeq ($(ARCH),aix)
80 # IBM AIX xlC 4.x
81 CXX           = xlC
82 CXXFLAGS      = -O
83 LD            = xlC
84 LDFLAGS       = -O
85 SOFLAGS       =
86 DllSuf        = a
87 endif
88
89 ifeq ($(ARCH),aix5)
90 # IBM AIX xlC 5.x
91 CXX           = xlC
92 CXXFLAGS      = -O
93 LD            = xlC
94 LDFLAGS       = -O
95 SOFLAGS       =
96 DllSuf        = a
97 endif
98
99 ifeq ($(ARCH),aixgcc)
100 # IBM AIX with GCC
101 CXX           = g++
102 CXXFLAGS      = -O
103 LD            = g++
104 LDFLAGS       = -O
105 SOFLAGS       = -shared
106 DllSuf        = a
107 EXPLLINKLIBS  = $(ROOTLIBS) $(ROOTGLIBS)
108 endif
109
110 ifeq ($(ARCH),solaris)
111 # Solaris CC
112 CXX           = /opt/SUNWspro/bin/CC
113 CXXFLAGS      = -O -KPIC
114 LD            = /opt/SUNWspro/bin/CC
115 LDFLAGS       = -O
116 SOFLAGS       = -G
117 endif
118
119 ifeq ($(ARCH),solarisCC5)
120 # Solaris CC 5.0
121 CXX           = CC
122 CXXFLAGS      = -O -KPIC
123 LD            = CC
124 LDFLAGS       = -O
125 SOFLAGS       = -G
126 endif
127
128 ifeq ($(ARCH),solarisgcc)
129 # Solaris gcc
130 CXX           = g++
131 CXXFLAGS      = -O -fPIC
132 LD            = g++
133 LDFLAGS       = -O
134 SOFLAGS       = -shared
135 endif
136
137 ifeq ($(ARCH),solariskcc)
138 # Solaris kcc
139 CXX           = KCC --one_instantiation_per_object
140 CXXFLAGS      = -O4 -KPIC
141 LD            = KCC
142 LDFLAGS       = -O4
143 SOFLAGS       =
144 endif
145
146 ifeq ($(ARCH),solarisx86)
147 # Solaris CC on Intel
148 CXX           = CC
149 CXXFLAGS      = -O -KPIC
150 LD            = CC
151 LDFLAGS       = -O
152 SOFLAGS       = -G
153 endif
154
155 ifeq ($(ARCH),sgicc)
156 # SGI
157 CXX           = CC -n32  -I/usr/include/CC.sgi
158 CXXFLAGS      = -O
159 LD            = CC -n32 -LANG:std  -I/usr/include/CC.sgi
160 LDFLAGS       = -O
161 SOFLAGS       = -shared
162 endif
163
164 ifeq ($(ARCH),sgicc64)
165 # SGI
166 CXX           = CC -64  -I/usr/include/CC.sgi
167 CXXFLAGS      = -O
168 LD            = CC -64 -LANG:std -I/usr/include/CC.sgi
169 LDFLAGS       = -O
170 SOFLAGS       = -shared
171 endif
172
173 ifeq ($(ARCH),sgigcc)
174 # SGI 6.x with gcc
175 CXX           = g++
176 CXXFLAGS      = -O -Wall -fPIC
177 LD            = g++
178 LDFLAGS       = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
179 SOFLAGS       = -shared
180 endif
181
182 ifeq ($(ARCH),sgin32gcc)
183 # SGI 6.x with gcc for n32 ABI
184 CXX           = g++
185 CXXFLAGS      = -O -Wall -fPIC
186 LD            = g++
187 LDFLAGS       = -O -L/usr/lib32 -Wl,-woff,134 -lgen
188 SOFLAGS       = -shared
189 endif
190
191 ifeq ($(ARCH),sgikcc)
192 # SGI with KCC
193 CXX           = KCC -n32 --one_instantiation_per_object
194 CXXFLAGS      = -O
195 LD            = KCC -n32
196 LDFLAGS       = -O
197 SOFLAGS       =
198 endif
199
200 ifeq ($(ARCH),alphagcc)
201 # Alpha/OSF with gcc
202 CXX           = g++
203 CXXFLAGS      = -O2 -Wall -fPIC
204 LD            = g++
205 LDFLAGS       = -O2
206 SOFLAGS       = -Wl,-expect_unresolved,* -shared
207 endif
208
209 ifeq ($(ARCH),alphakcc)
210 # Alpha/OSF with kai compiler (not yet valid)
211 CXX           = KCC --one_instantiation_per_object
212 CXXFLAGS      = -O -fPIC
213 LD            = KCC
214 LDFLAGS       = -O
215 SOFLAGS       = -Wl,-expect_unresolved,* -shared
216 endif
217
218 ifeq ($(ARCH),alphacxx6)
219 # Alpha/OSF with cxx6
220 CXX           = cxx
221 CXXFLAGS      = -O
222 LD            = cxx
223 LDFLAGS       = -O
224 SOFLAGS       = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
225 endif
226
227 ifeq ($(ARCH),linuxrh51)
228 # Linux with gcc 2.7.2.x
229 CXX           = g++
230 CXXFLAGS      = -O2 -Wall -fPIC
231 LD            = g++
232 LDFLAGS       = -O2
233 SOFLAGS       = -shared
234 endif
235
236 ifeq ($(ARCH),linuxrh42)
237 # Linux with gcc 2.7.2.x (RedHat 4.2)
238 CXX           = g++
239 CXXFLAGS      = -O2 -Wall -fPIC
240 LD            = g++
241 LDFLAGS       = -O2
242 SOFLAGS       = -shared
243 endif
244
245 ifeq ($(ARCH),linuxdeb)
246 # Linux with gcc 2.7.2.x
247 CXX           = g++
248 CXXFLAGS      = -O1 -Wall -fPIC
249 LD            = g++
250 LDFLAGS       = -O1
251 SOFLAGS       = -shared
252 endif
253
254 ifeq ($(ARCH),linuxdeb2ppc)
255 # Debian/Linux on the PowerPC
256 CXX           = g++
257 CXXFLAGS      = -O2 -Wall -fPIC
258 LD            = g++
259 LDFLAGS       = -O2
260 SOFLAGS       = -shared
261 endif
262
263 ifeq ($(ARCH),linuxsuse6)
264 # Linux with gcc 2.7.2.x
265 CXX           = g++
266 CXXFLAGS      = -O2 -Wall -fPIC
267 LD            = g++
268 LDFLAGS       = -O2
269 SOFLAGS       = -shared
270 endif
271
272 ifeq ($(ARCH),linuxkcc)
273 # Linux with the KAI compiler
274 CXX           = KCC --one_instantiation_per_object
275 CXXFLAGS      = -O -fPIC +K0
276 LD            = KCC
277 LDFLAGS       = -O $(shell $(ROOTCONFIG) --cflags)
278 SOFLAGS       =
279 endif
280
281 ifeq ($(ARCH),linuxicc)
282 # Linux with Intel icc compiler
283 ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
284                 cut -d'.' -f1)
285 ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
286                 cut -d'.' -f2)
287 CXX           = icc
288 CXXFLAGS      = -O -fPIC -wd1476
289 LD            = icpc
290 LDFLAGS       = -O
291 SOFLAGS       = -shared
292 ifeq ($(ICC_MAJOR),8)
293 ifneq ($(ICC_MINOR),0)
294 CXXFLAGS     += -wd1572
295 endif
296 endif
297 endif
298
299 ifeq ($(ARCH),linuxppcgcc)
300 # MkLinux with gcc and glibc
301 CXX           = g++
302 CXXFLAGS      = -O2 -Wall -fPIC
303 LD            = g++
304 LDFLAGS       = -O2
305 SOFLAGS       = -shared
306 endif
307
308 ifeq ($(ARCH),linuxia64gcc)
309 # Itanium Linux with gcc 2.9x
310 CXX           = g++
311 CXXFLAGS      = -O2 -Wall -fPIC
312 LD            = g++
313 LDFLAGS       = -O2
314 SOFLAGS       = -shared
315 endif
316
317 ifeq ($(ARCH),linuxia64sgi)
318 # Itanium Linux with sgiCC
319 CXX           = sgiCC
320 CXXFLAGS      = -O -Wall -fPIC
321 LD            = gsgiCC
322 LDFLAGS       = -O
323 SOFLAGS       = -shared
324 endif
325
326 ifeq ($(ARCH),linuxia64ecc)
327 # Itanium Linux with Intel icc (was ecc)
328 ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
329                 cut -d'.' -f1)
330 ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
331                 cut -d'.' -f2)
332 CXX           = icc
333 CXXFLAGS      = -O -fPIC -wd1476
334 LD            = icpc
335 LDFLAGS       = -O
336 SOFLAGS       = -shared
337 ifeq ($(ICC_MAJOR),8)
338 ifneq ($(ICC_MINOR),0)
339 CXXFLAGS     += -wd1572
340 endif
341 endif
342 endif
343
344 ifeq ($(ARCH),linuxx8664gcc)
345 # AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
346 CXX           = g++
347 CXXFLAGS      = -O2 -Wall -fPIC
348 LD            = g++
349 LDFLAGS       = -O2
350 SOFLAGS       = -shared
351 endif
352
353 ifeq ($(ARCH),linuxppc64gcc)
354 # PPC64 Linux with gcc 3.x
355 CXX           = g++
356 CXXFLAGS      = -O -Wall -fPIC
357 LD            = g++
358 LDFLAGS       = -O
359 SOFLAGS       = -shared
360 endif
361
362 ifeq ($(ARCH),linuxx8664icc)
363 # AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
364 CXX           = icc
365 CXXFLAGS      = -O -fPIC -wd1476 -wd1572
366 LD            = icpc
367 LDFLAGS       = -O
368 SOFLAGS       = -shared
369 endif
370
371 ifeq ($(ARCH),linuxalphagcc)
372 # Alpha Linux with gcc
373 CXX           = g++
374 CXXFLAGS      = -O2 -Wall -fPIC
375 LD            = g++
376 LDFLAGS       = -O2
377 SOFLAGS       = -shared
378 endif
379
380 ifeq ($(ARCH),linuxarm)
381 # ARM Linux with egcs
382 CXX           = g++
383 CXXFLAGS      = -O -Wall -fPIC
384 LD            = g++
385 LDFLAGS       = -O
386 SOFLAGS       = -shared
387 endif
388
389 ifeq ($(ARCH),mklinux)
390 # MkLinux with libc5
391 CXX           = g++
392 CXXFLAGS      = -O2 -Wall -fPIC
393 LD            = g++
394 LDFLAGS       = -O2
395 SOFLAGS       = -shared
396 endif
397
398 ifeq ($(ARCH),freebsd)
399 # FreeBSD with libc5
400 CXX           = g++
401 CXXFLAGS      = -O -pipe -W -Wall -fPIC
402 LD            = g++
403 LDFLAGS       = -O
404 SOFLAGS       = -shared -Wl,-x
405 endif
406
407 ifeq ($(ARCH),freebsd4)
408 # FreeBSD with glibc
409 CXXFLAGS     += -W -Wall -fPIC
410 LD            = $(CXX)
411 SOFLAGS       = -shared -Wl,-x
412 endif
413
414 ifeq ($(ARCH),freebsd5)
415 # FreeBSD with glibc
416 CXXFLAGS     += -W -Wall -fPIC
417 LD            = $(CXX)
418 endif
419
420 ifeq ($(ARCH),openbsd)
421 # OpenBSD with libc
422 CXX           = g++
423 CXXFLAGS      = -O -pipe -W -Wall -fPIC
424 LD            = g++
425 LDFLAGS       = -O
426 SOFLAGS       = -shared -Wl,-x
427 endif
428
429 ifeq ($(ARCH),macosx)
430 # MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
431 MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
432 CXX           = c++
433 CXXFLAGS      = -O2 -pipe -Wall -W -Woverloaded-virtual
434 LDFLAGS       = -O2 -bind_at_load
435 # The SOFLAGS will be used to create the .dylib,
436 # the .so will be created separately
437 DllSuf        = dylib
438 ifeq ($(MACOSX_MINOR),4)
439 UNDEFOPT      = dynamic_lookup
440 LD            = MACOSX_DEPLOYMENT_TARGET=10.4 c++
441 else
442 ifeq ($(MACOSX_MINOR),3)
443 UNDEFOPT      = dynamic_lookup
444 LD            = MACOSX_DEPLOYMENT_TARGET=10.3 c++
445 else
446 UNDEFOPT      = suppress
447 LD            = c++
448 endif
449 endif
450 SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
451 endif
452
453 ifeq ($(ARCH),macosxicc)
454 # MacOS X with Intel icc compiler
455 MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
456 CXX           = icc
457 CXXFLAGS      = -O -fPIC -wd1476
458 LDFLAGS       = -O
459 # The SOFLAGS will be used to create the .dylib,
460 # the .so will be created separately
461 DllSuf        = dylib
462 ifeq ($(MACOSX_MINOR),4)
463 LD            = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
464 endif
465 SOFLAGS       = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
466 endif
467
468 ifeq ($(ARCH),macosx64)
469 # MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
470 # Only specific option (-m64) comes from root-config
471 MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
472 CXX           = c++
473 CXXFLAGS      = -O2 -pipe -Wall -W -Woverloaded-virtual
474 LDFLAGS       = -O2 -bind_at_load
475 # The SOFLAGS will be used to create the .dylib,
476 # the .so will be created separately
477 DllSuf        = dylib
478 LD            = MACOSX_DEPLOYMENT_TARGET=10.4 c++
479 SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
480 endif
481
482 ifeq ($(ARCH),macosxxlc)
483 # MacOS X with IBM xlC compiler
484 MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
485 CXX           = xlC
486 CXXFLAGS      = -O
487 LDFLAGS       = -O -Wl,-bind_at_load
488 # The SOFLAGS will be used to create the .dylib,
489 # the .so will be created separately
490 DllSuf        = dylib
491 ifeq ($(MACOSX_MINOR),4)
492 UNDEFOPT      = dynamic_lookup
493 LD            = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
494 else
495 ifeq ($(MACOSX_MINOR),3)
496 UNDEFOPT      = dynamic_lookup
497 LD            = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
498 else
499 UNDEFOPT      = suppress
500 LD            = xlC
501 endif
502 endif
503 SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
504 endif
505
506 ifeq ($(ARCH),win32)
507 # Windows with the VC++ compiler
508 VC_MAJOR     := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
509                 cut -d'.' -f1)
510 ObjSuf        = obj
511 SrcSuf        = cxx
512 ExeSuf        = .exe
513 DllSuf        = dll
514 OutPutOpt     = -out:
515 CXX           = cl
516 CXXOPT        = -O2
517 #CXXOPT        = -Z7
518 CXXFLAGS      = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
519 LD            = link
520 LDOPT         = -opt:ref
521 #LDOPT         = -debug
522 LDFLAGS       = $(LDOPT) -pdb:none -nologo
523 SOFLAGS       = -DLL
524
525 EXPLLINKLIBS  = $(ROOTLIBS) $(ROOTGLIBS)
526 endif
527
528 ifeq ($(ARCH),win32old)
529 # Windows with the VC++ compiler
530 ObjSuf        = obj
531 SrcSuf        = cxx
532 ExeSuf        = .exe
533 DllSuf        = dll
534 OutPutOpt     = -out:
535 CXX           = cl
536 CXXOPT        = -O2
537 #CXXOPT        = -Z7
538 CXXFLAGS      = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
539                 -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
540 LD            = link
541 LDOPT         = -opt:ref
542 #LDOPT         = -debug
543 LDFLAGS       = $(LDOPT) -pdb:none -nologo
544 SOFLAGS       = -DLL
545
546 EXPLLINKLIBS  = $(ROOTLIBS) $(ROOTGLIBS)
547 endif
548
549 ifeq ($(ARCH),win32gcc)
550 # Windows with gcc
551 DllSuf        = dll
552 ExeSuf        = .exe
553 CXX           = g++
554 CXXFLAGS      = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
555 LD            = g++
556 LDFLAGS       = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
557                 -L/usr/X11R6/lib 
558 SOFLAGS       = -shared -D_DLL -Wl,--export-all-symbols
559 EXPLLINKLIBS  = $(ROOTLIBS) $(ROOTGLIBS)
560 endif
561
562 ifeq ($(CXX),)
563 $(error $(ARCH) invalid architecture)
564 endif
565
566 CXXFLAGS     += $(ROOTCFLAGS)
567 LDFLAGS      += $(ROOTLDFLAGS)
568 LIBS          = $(ROOTLIBS) $(SYSLIBS)
569 GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
570
571 GLIBS         = $(ROOTGLIBS) $(SYSLIBS)