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