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