]> git.uio.no Git - u/mrichter/AliRoot.git/blame - cmake/modules/ALICEMacros.cmake
Incremented class version
[u/mrichter/AliRoot.git] / cmake / modules / ALICEMacros.cmake
CommitLineData
e969a926 1# -*- mode: cmake -*-
2#_______________________________________________________________________________
3Macro(CHANGE_FILE_EXTENSION OLD_EXT NEW_EXT RESULT LIST)
4
5# This is probably an obsolete Macro
6
7 If (${OLD_EXT} MATCHES "^[*][.]+.*$")
8 String(REGEX REPLACE "^[*]+([.].*)$" "\\1" OLD_EXT1 ${OLD_EXT})
9 Endif (${OLD_EXT} MATCHES "^[*][.]+.*$")
10
11 If (${NEW_EXT} MATCHES "^[*][.]+.*$")
12 String(REGEX REPLACE "^[*]+([.].*)" "\\1" NEW_EXT1 ${NEW_EXT})
13 Endif (${NEW_EXT} MATCHES "^[*][.]+.*$")
14
15 Set(FLIST)
16 Foreach (_current_FILE ${LIST})
17
18 String(REGEX REPLACE "^(.*)${OLD_EXT1}$" "\\1${NEW_EXT1}" res ${_current_FILE})
19 Set (FLIST ${FLIST} ${res})
20
21 Endforeach (_current_FILE ${LIST})
22 Set(${RESULT} ${FLIST})
23
24Endmacro (CHANGE_FILE_EXTENSION)
25
26#_______________________________________________________________________________
27Macro (CHECK_OUT_OF_SOURCE_BUILD)
28
29# Checks that the binary is built outside the source
30
31 String(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
32 If(insource)
33 File(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/Testing)
34 File(REMOVE ${CMAKE_SOURCE_DIR}/DartConfiguration.tcl)
35 Message(FATAL_ERROR "ALIROOT should be installed as an out of source build, to keep the source directory clean. Please create a extra build directory and run the command 'cmake path_to_source_dir' in this newly created directory. You have also to delete the directory CMakeFiles and the file CMakeCache.txt in the source directory. Otherwise cmake will complain even if you run it from an out-of-source directory.")
36 Endif(insource)
37
38EndMacro (CHECK_OUT_OF_SOURCE_BUILD)
39
40#_______________________________________________________________________________
41Function (AddLibrary LIB SRCS DHDRS)
42
43# Adds an AliRoot library as a target
44
ffeaf110 45 Set(_path)
46 List(LENGTH SRCS _len)
47 If(_len GREATER 0)
48 List(GET SRCS 0 _file)
49 Get_filename_component(_path ${_file} PATH)
50# Message(STATUS Debug ${_file} ${_path})
51 Endif(_len GREATER 0)
52
53 Set(LDEF)
54 If(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIB}LinkDef.h)
55 Set(LDEF "${LIB}LinkDef.h")
56 Endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIB}LinkDef.h)
57
58 If(_path)
59 If(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_path}/${LIB}LinkDef.h)
60 Set(LDEF "${_path}/${LIB}LinkDef.h")
61 Endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_path}/${LIB}LinkDef.h)
62 Endif(_path)
63
e969a926 64 Set(DICT)
ffeaf110 65 If(LDEF)
e969a926 66# even with no cxx files, one may want to build an empty lib as a placeholder
67# in AliRoot this is signalled by the existence of an (empty) ${LIB}LinkDef.h
68 Set(DICT "G__${LIB}.cxx")
69 Set(ASRCS ${SRCS} ${DICT})
70 Root_Generate_Dictionary("${DHDRS}" "${LDEF}" "${DICT}" "${INCLUDE_DIRECTORIES}")
ffeaf110 71 Else(LDEF)
72 Message(STATUS "${LIB}LinkDef.h not found... probably building empty lib")
e969a926 73 Set(ASRCS ${SRCS})
ffeaf110 74 Endif(LDEF)
e969a926 75
76 Add_Library(${LIB} SHARED ${ASRCS})
77 Target_Link_Libraries(${LIB} ${ALIROOT_LIBRARIES})
78 Set_Target_Properties(${LIB} PROPERTIES ${ALIROOT_LIBRARY_PROPERTIES})
79
80 Install(TARGETS ${LIB} DESTINATION ${ALIROOT_INSTALL_DIR}/lib
81 COMPONENT shared)
82
83 If(ALICE_STATIC_BUILD)
84 Add_Library(${LIB}_a STATIC ${ASRCS})
85 Install(TARGETS ${LIB}_a DESTINATION ${ALIROOT_INSTALL_DIR}/lib/static)
86 EndIf(ALICE_STATIC_BUILD)
87
88 If(ARGV3)
89 Install(FILES ${ARGV3} DESTINATION ${ALIROOT_INSTALL_DIR}/include)
90 Endif(ARGV3)
91
92 CheckViols(${LIB} "${SRCS}")
93
94EndFunction (AddLibrary)
95
96#_______________________________________________________________________________
97Macro (SetModule)
98
99String(REGEX REPLACE "${ALICE_ROOT}/?([^/]*)/?$" "\\1" ALIROOT_MODULE "${CMAKE_CURRENT_SOURCE_DIR}")
100Add_Definitions(-D_MODULE_=\"${ALIROOT_MODULE}\")
101
102EndMacro(SetModule)
103
104
105#_______________________________________________________________________________
106Function (AddExecutable BIN SRCS LIBS)
107
108# Adds an AliRoot executable as a target
109
110 Add_Executable(${BIN} ${SRCS})
111 Target_Link_Libraries(${BIN} ${ROOT_LIBRARIES} ${LIBS})
112 Install(TARGETS ${BIN} DESTINATION ${ALIROOT_INSTALL_DIR}/bin)
113
114 If(ALICE_STATIC_BUILD)
115 Add_Executable(${BIN}_a ${SRCS})
116 Set(_ar_libs)
117 Foreach(_lib ${LIBS})
118 Set(_ar_libs ${_ar_libs} ${_lib}_a)
119 EndForeach(_lib ${LIBS})
120 Foreach(_lib ${LIBS})
121 Set(_ar_libs ${_ar_libs} ${_lib}_a)
122 EndForeach(_lib ${LIBS})
123 Target_Link_Libraries(${BIN}_a ${ROOT_LIBRARIES} ${_ar_libs})
124 Install(TARGETS ${BIN}_a DESTINATION ${ALIROOT_INSTALL_DIR}/bin)
125 EndIf(ALICE_STATIC_BUILD)
126
127 CheckViols(${BIN} "${SRCS}")
128
129EndFunction (AddExecutable)
130
131#_______________________________________________________________________________
132Macro (SetupSystem)
133
134# Set up all system dependencies of AliRoot
135
136Message(STATUS "Setting up system dependent parameters for ${ALICE_TARGET}" )
137
138If(ALICE_TARGET STREQUAL macosx64)
139
140 Execute_process(
141 COMMAND sw_vers -productVersion
142 OUTPUT_VARIABLE MACOSX
143 OUTPUT_STRIP_TRAILING_WHITESPACE)
144
145 String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\1" MACOSX_MAJOR "${MACOSX}")
146 String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\2" MACOSX_MINOR "${MACOSX}")
147
148 Message(STATUS "Mac OS X ${MACOSX_MAJOR}.${MACOSX_MINOR}")
149
150 Find_Package(fink)
151
84641bd5 152# Set(CMAKE_CXX_COMPILER g++)
153# Set(CMAKE_C_COMPILER gcc)
e969a926 154# I found no way to make this work...
155# Set(CMAKE_CXX_LINK_EXECUTABLE
156# "MACOSX_DEPLOYMENT_TARGET=${MACOSX_MAJOR}.${MACOSX_MINOR} ${CMAKE_CXX_LINK_EXECUTABLE}")
157
158 Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -flat_namespace -single_module -undefined dynamic_lookup -m64")
159
160 Set(CMAKE_Fortran_FLAGS "-fno-second-underscore -m64")
161
162 Set(CLIBDEFS "-DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
163
164 Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
165 Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")
166
167 If(CMAKE_Fortran_COMPILER MATCHES g95)
168 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95")
169 Execute_process(COMMAND svn info $ENV{ALICE_ROOT}
170 COMMAND g95 --print-search-dirs
171 OUTPUT_VARIABLE _out)
172 String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
173 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
174 Else(CMAKE_Fortran_COMPILER MATCHES g95)
175 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DFORTRAN_GFORTRAN")
176 Execute_process(
177 COMMAND gfortran -m64 -print-file-name=libgfortran.dylib
178 OUTPUT_VARIABLE FLIB
179 OUTPUT_STRIP_TRAILING_WHITESPACE)
180 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
181 Execute_process(
182 COMMAND gfortran -m64 -print-file-name=libgfortranbegin.a
183 OUTPUT_VARIABLE FLIB
184 OUTPUT_STRIP_TRAILING_WHITESPACE)
185 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
186 Endif(CMAKE_Fortran_COMPILER MATCHES g95)
187
188 Set(LINK_FLAGS "${LINK_FLAGS} -m64")
189
190# I think this is useless
191# Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES} -L/usr/X11R6/lib -lX11")
192 Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
193
194# Would like to use this, but did not manage on the Mac
195#Include(FindOpenGL)
196#Set(ROOT_LIBRARIES ${ROOT_LIBRARIES} ${OPENGL_LIBRARIES})
197#Set(ROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
198# Poor man's version of the above
199 Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
200
201 Set(LINK_FLAGS "${LINK_FLAGS} -bind_at_load")
202
203#
204# LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
205# unset LD_PREBIND ; \
206# g++
207# ALLD = ar
208# ALFLAGS = cr
209# ALLIB =
210# AEXT = a
211#
212
213Endif(ALICE_TARGET STREQUAL macosx64)
214
215EndMacro (SetupSystem)
216
217# ../build/Makefile.alphacxx6
218# # -*- mode: makefile -*-
219# # Makefile to build AliRoot for Alpha OSF1
220#
221# # System dependent commands
222#
223# XARGS = xargs
224#
225# # The compilers
226# CXX = cxx
227# F77 = f77
228#
229# # Global optimisation
230# OPT = -O
231# NOOPT = -O0
232#
233# CXXOPT = $(OPT)
234# CXXNOOPT = $(NOOPT)
235# COPT = $(OPT)
236# FOPT = $(OPT)
237#
238# # CERNLIB defines
239# CLIBDEFS = -DCERNLIB_DECS -DCERNLIB_BLDLIB -DCERNLIB_CZ
240# CLIBCXXOPTS =
241# CLIBCOPT =
242# CLIBFOPT = -I. $(CLIBDEFS)
243#
244# # Compiler flags
245# CXXFLAGS = $(CXXOPT) -nostdnew -rtti -taso
246# CXXFLAGSNO = $(CXXNOOPT) -nostdnew -rtti -taso
247# CFLAGS = $(COPT) -fPIC -pipe -mcpu=ev5 -D__osf__ -D__alpha
248# FFLAGS = $(FOPT) -nofor_main -warn noinformational -taso $(CLIBFOPT)
249# # rmkdepend flags for building dependencies of FORTRAN files
250# DEPENDFFLAGS = $(filter-out -warn noinformational,$(FFLAGS))
251#
252# # rootcint flags
253# CINTFLAGS = -D__DECCXX
254#
255# LD = cxx
256# LDFLAGS =
257#
258# SHLD = ld
259# SOFLAGS = -L/usr/lib/cmplrs/cxx -rpath /usr/lib/cmplrs/cxx \
260# -expect_unresolved "*" -msym -shared -taso \
261# /usr/lib/cmplrs/cc/crt0.o /usr/lib/cmplrs/cxx/_main.o
262#
263# SHLIB = -lUfor -lfor -lFutil
264# SOEXT = so
265#
266# #System libraries
267#
268# # Flags for static libraries
269# AFLAGS = $(filter-out -rpath /usr/lib/cmplrs/cxx -msym -shared /usr/lib/cmplrs/cc/crt0.o,$(SOFLAGS))
270# AFLAGS += $(SHLIB)
271#
272# # Additional flags and libraries for building aliroot executable
273# SYSLIBS := -lXm -lXt -lX11 -lPW -lUfor -lfor -lFutil -lots -taso -lbsd
274#
275# # Cure funny problem
276# # sometimes in dependencies system include files of the sort
277# # /usr/.../filename AND /usr/.../filename.cc are present
278# # DEC believes that /usr/.../filename is the executable to be
279# # built from /usr/.../filename.cc
280# # Just avoid this to happen
281#
282# % : %.cc
283# @;
284#
285#
286#
287#
288#
289#
290#
291#
292#
293# ../build/Makefile.hpuxacc
294# # -*- mode: makefile -*-
295# # Makefile to build AliRoot on HP-UX
296#
297# # System dependent commands
298#
299# XARGS = xargs
300#
301# # The compilers
302# CXX = aCC
303# F77 = f77
304# CC = cc
305#
306# # Global optimisation
307# OPT = -g -O
308# NOOPT = -g
309#
310# CXXOPT = $(OPT)
311# CXXNOOPT = $(NOOPT)
312# COPT = $(OPT)
313# FOPT = $(OPT)
314#
315# # CERNLIB defines
316# CLIBDEFS = -DCERNLIB_HPUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
317# CLIBCXXOPTS =
318# CLIBCOPT = +z -Ae
319# CLIBFOPT = $(CLIBDEFS) -WF,-P
320#
321# CXXFLAGS = $(CXXOPT) -Wc,-ansi_for_scope,on +Z -z +W70,495,740,749,823,829 -Dextname
322# CXXFLAGSNO = $(CXXNOOPT) -Wc,-ansi_for_scope,on +Z -z +W70,495,740,749,823,829 -Dextname
323# CFLAGS = $(COPT) +Z -Ae
324# FFLAGS = $(CLIBFOPT) $(FOPT) +ppu +Z
325# # rmkdepend flags for building dependencies of FORTRAN files
326# DEPENDFFLAGS = $(FFLAGS)
327#
328# # rootcint flags
329# CINTFLAGS =
330#
331# LD = aCC
332# LDFLAGS = $(OPT) -z -Wl,+s -Wl,-E
333#
334# SHLD = $(LD)
335# SOFLAGS = -b /usr/lib/libm.sl
336#
337# SOEXT = sl
338#
339# # additional ROOT libraries
340# SYSLIBS := -lcrypt -L/usr/lib/X11R6 -lX11
341#
342#
343#
344#
345#
346# ../build/Makefile.linux
347# # -*- mode: makefile -*-
348# # Makefile to build AliRoot for Linux
349#
350# # System dependent commands
351#
352# XARGS = xargs -r
353#
354# # The compilers
355# CXX = g++
356# CC = gcc
357# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
358# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
359# F77 = $(shell root-config --f77)
360#
361# # Global optimisation
362# OPT = -O -g
363# NOOPT = -g
364#
365# CXXOPT = $(OPT)
366# CXXNOOPT = $(NOOPT)
367# COPT = $(OPT)
368# FOPT = $(OPT)
369#
370# # CERNLIB defines
371# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
372# CLIBCXXOPTS =
373# CLIBCOPT =
374# CLIBFOPT = $(CLIBDEFS)
375#
376# # Compiler flags
377# ifeq ($(CCMAJORV),2)
378# CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe
379# CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe
380# else
381# ifeq ($(CCMAJORV),3)
382# CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
383# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
384# else
385# ifeq ($(CCMAJORV),4)
386# CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
387# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
388# else
389# CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
390# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
391# endif
392# endif
393# endif
394# CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
395# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
396#
397# ifeq (g95,$(F77))
398# FFLAGS +=-DFORTRAN_G95
399# else
400# ifeq (gfortran,$(F77))
401# FFLAGS +=-DFORTRAN_GFORTRAN
402# else
403# FFLAGS +=
404# endif
405# endif
406#
407# # rmkdepend flags for building dependencies of FORTRAN files
408# DEPENDFFLAGS = $(FFLAGS)
409#
410# # rootcint flags
411# CINTFLAGS =
412#
413# LD = g++
414# LDFLAGS = $(OPT)
415#
416# SHLD = $(LD)
417# SOFLAGS = $(OPT) -shared -Wl
418# SOEXT = so
419#
420# #System libraries
421# SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
422#
423# ifeq (g95,$(F77))
424# SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
425# else
426# ifeq (gfortran,$(F77))
427# SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
428# SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
429# SYSLIBS += $(SHLIB)
430# else
431# SHLIB = -lg2c
432# SYSLIBS += -lg2c
433# endif
434# endif
435#
436# ALLD = ar
437# ALFLAGS = cr
438# ALLIB =
439# AEXT = a
440#
441# # additional ROOT libraries
442#
443#
444#
445#
446#
447#
448# ../build/Makefile.linuxalphagcc
449# # -*- mode: makefile -*-
450# # Makefile to build AliRoot for Linux on alpha
451#
452# # System dependent commands
453#
454# XARGS = xargs -r
455#
456# # The compilers
457# CXX = g++
458# F77 = g77
459# CC = gcc
460# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
461# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
462#
463# # Global optimisation
464# OPT = -O -g -mieee -mno-soft-float
465# NOOPT = -g -mieee -mno-soft-float
466#
467# CXXOPT = $(OPT)
468# CXXNOOPT = $(NOOPT)
469# COPT = $(OPT)
470# FOPT = $(OPT)
471#
472# # CERNLIB defines
473# CLIBDEFS = -DCERNLIB_UNIX -DCERNLIB_DECS -DCERNLIB_BLDLIB -DCERNLIB_CZ
474# CLIBCXXOPTS =
475# CLIBCOPT =
476# CLIBFOPT = $(CLIBDEFS)
477#
478# # Compiler flags
479#
480# CXXFLAGS = $(OPT) -Wall -fPIC -pipe
481# CXXFLAGSNO = $(NOOPT) -Wall -fPIC -pipe
482# CFLAGS = $(OPT) -Wall -fPIC -pipe -ansi
483# FFLAGS = $(CLIBFOPT) $(FOPT) -Wall -fPIC -pipe -fno-second-underscore
484# # rmkdepend flags for building dependencies of FORTRAN files
485# DEPENDFFLAGS = $(FFLAGS)
486#
487# # rootcint flags
488# CINTFLAGS =
489#
490# LD = g++
491# LDFLAGS = $(OPT)
492#
493# SHLD = $(LD)
494# SOFLAGS = $(OPT) -Wall -fPIC -pipe -shared -Wl
495# SHLIB = -lg2c
496# SOEXT = so
497#
498# ALLD = ar
499# ALFLAGS = cr
500# ALLIB =
501# AEXT = a
502#
503# #System libraries
504# SYSLIBS := -ldl -lg2c -lcrypt -L/usr/X11R6/lib -lX11
505#
506#
507#
508#
509#
510# ../build/Makefile.linuxia64ecc
511# # -*- mode: makefile -*-
512# # Makefile for AliRoot for Itanium/Linux with Intel icc compiler
513#
514# # System dependent commands
515#
516# XARGS = xargs -r
517#
518# # The compilers
519# CXX = icc
520# F77 = ifort
521# CC = icc
522#
523# # Global optimisation
524# OPT = -g #-O
525# NOOPT = -g
526#
527# CXXOPT = $(OPT)
528# CXXNOOPT = $(OPT)
529# COPT = $(OPT)
530# FOPT = $(OPT)
531#
532# # CERNLIB defines
533# CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
534# CLIBCXXOPTS =
535# CLIBCOPT =
536# CLIBFOPT = $(CLIBDEFS)
537#
538# # Compiler flags
539# CXXFLAGS = $(CXXOPT)
540# CXXFLAGSNO = $(CXXNOOPT)
541# CFLAGS = $(COPT)
542# FFLAGS = $(CLIBFOPT) $(FOPT)
543# # rmkdepend flags for building dependencies of FORTRAN files
544# DEPENDFFLAGS = $(FFLAGS)
545#
546# # rootcint flags
547# CINTFLAGS =
548#
549# LD = icpc
550# LDFLAGS = $(OPT)
551#
552# SHLD = $(LD)
553# SOFLAGS = -Wl,-soname,$$TMPLIB -shared -O
554# SHLIB =
555# SOEXT = so
556#
557# ALLD = ar
558# ALFLAGS = cr
559# ALLIB =
560# AEXT = a
561#
562# # additional ROOT libraries
563#
564# LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
565#
566# SYSLIBS := $(LIBNOVER) -lcrypt -L/usr/local/lib -lXt -lCEPCF90 -lF90 \
567# -lPEPCF90 -lintrins -L/usr/X11R6/lib -lX11
568# ../build/Makefile.linuxia64gcc
569# # -*- mode: makefile -*-
570# # Makefile for AliRoot for Itanium/Linux with gcc
571#
572# # System dependent commands
573#
574# XARGS = xargs -r
575#
576# # The compilers
577# CXX = g++
578# F77 = g77
579# CC = gcc
580#
581# # Global optimisation
582# OPT = -g -O
583# NOOPT = -g
584#
585# CXXOPT = $(OPT)
586# CXXNOOPT = $(NOOPT)
587# COPT = $(OPT)
588# FOPT = $(OPT)
589#
590# # CERNLIB defines
591# CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
592# CLIBCXXOPTS =
593# CLIBCOPT =
594# CLIBFOPT = $(CLIBDEFS)
595#
596# # Compiler flags
597# CXXFLAGS = $(CXXOPT) -Wall -Weffc++ -fPIC -pipe
598# CXXFLAGSNO = $(CXXNOOPT) -Wall -Weffc++ -fPIC -pipe
599# CFLAGS = -Wall -fPIC -pipe
600# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
601# # rmkdepend flags for building dependencies of FORTRAN files
602# DEPENDFFLAGS = $(FFLAGS)
603#
604# # rootcint flags
605# CINTFLAGS =
606#
607# LD = g++
608# LDFLAGS = $(OPT) -Wl,-Map -Wl,$@.map
609#
610# SHLD = $(LD)
611# SOFLAGS = -shared -Wl -O2
612# SOEXT = so
613#
614# ALLD = ar
615# ALFLAGS = cr
616# ALLIB =
617# AEXT = a
618#
619# # additional ROOT libraries
620#
621# LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
622#
623# #System libraries
624# SYSLIBS := -ldl -lbsd -lg2c -L/usr/X11R6/lib -lX11 $(LIBNOVER)
625#
626#
627#
628#
629#
630# ../build/Makefile.linuxicc
631# # -*- mode: makefile -*-
632# # Makefile for AliRoot for Linux with the Intel icc compiler
633#
634# # System dependent commands
635#
636# XARGS = xargs -r
637#
638# # The compilers
639# CXX = icc
640# CC = icc
641#
642# # Compiler version:
643# ICC_MAJOR := $(shell $(CXX) -V 2>&1 | awk '{ if (NR==1) print $$8 }' | \
644# cut -d'.' -f1)
645# ICC_MINOR := $(shell $(CXX) -V 2>&1 | awk '{ if (NR==1) print $$8 }' | \
646# cut -d'.' -f2)
647#
648# F77 = ifort
649#
650# # Global optimisation
651# OPT = -O -ip
652# NOOPT = -O0
653#
654# CXXOPT = $(OPT)
655# CXXNOOPT = $(NOOPT)
656# COPT = $(OPT)
657# FOPT = $(OPT)
658#
659# # CERNLIB defines
660# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
661# CLIBCXXOPTS =
662# CLIBCOPT =
663# CLIBFOPT = $(CLIBDEFS)
664#
665# # Compiler flags
666# CXXFLAGS = $(CXXOPT)
667# CXXFLAGSNO = $(CXXNOOPT)
668# CFLAGS = $(COPT)
669# FFLAGS = $(CLIBFOPT) $(FOPT)
670# # rmkdepend flags for building dependencies of FORTRAN files
671# DEPENDFFLAGS = $(FFLAGS)
672#
673# # rootcint flags
674# CINTFLAGS =
675#
676# LD = icpc
677# LDFLAGS = $(OPT)
678#
679# SHLD = $(LD)
680# SOFLAGS = -Wl,-soname,$$TMPLIB -shared $(OPT)
681# SHLIB =
682# SOEXT = so
683#
684# ALLD = ar
685# ALFLAGS = cr
686# ALLIB =
687# AEXT = a
688#
689# # additional ROOT libraries
690#
691# LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
692#
693# #System libraries
694# SYSLIBS := -lcrypt -L/usr/X11R6/lib -lX11 $(LIBNOVER) -L/usr/local/lib \
695# -lXt -L$(shell which ifort | sed -e 's|bin/ifort|lib|') \
696# -lifcore -lifport
697# ../build/Makefile.linuxx8664gcc
698# # -*- mode: makefile -*-
699# # Makefile to build AliRoot for Linux
700#
701# # System dependent commands
702#
703# XARGS = xargs -r
704#
705# # The compilers
706# CXX = g++
707# CC = gcc
708# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
709# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
710# F77 = $(shell root-config --f77)
711#
712# # Global optimisation
713# OPT = -O0 -g
714# NOOPT = -g
715#
716# CXXOPT = $(OPT)
717# CXXNOOPT = $(NOOPT)
718# COPT = $(OPT)
719# FOPT = $(OPT)
720#
721# # CERNLIB defines
722# CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
723# CLIBCXXOPTS =
724# CLIBCOPT =
725# CLIBFOPT = $(CLIBDEFS)
726#
727# # Compiler flags
728# ifeq ($(CCMAJORV),2)
729# CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe -m64
730# CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe -m64
731# else
732# ifeq ($(CCMAJORV),3)
733# CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -m64
734# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
735# else
736# ifeq ($(CCMAJORV),4)
737# CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -m64
738# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
739# else
740# CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux -m64
741# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -m64
742# endif
743# endif
744# endif
745# CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi -m64
746# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC -fno-f2c -m64
747#
748# ifeq (g95,$(F77))
749# FFLAGS +=-DFORTRAN_G95
750# else
751# ifeq (gfortran,$(F77))
752# FFLAGS +=-DFORTRAN_GFORTRAN
753# else
754# FFLAGS +=
755# endif
756# endif
757#
758# # rmkdepend flags for building dependencies of FORTRAN files
759# DEPENDFFLAGS = $(FFLAGS)
760#
761# # rootcint flags
762# CINTFLAGS =
763#
764# LD = g++
765# LDFLAGS = $(OPT)
766#
767# SHLD = $(LD)
768# SOFLAGS = $(OPT) -shared -Wl
769# SOEXT = so
770#
771# #System libraries
772# LIBNOVER = `find /lib64 -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib64/ -l/'`
773#
774# SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib64 -lX11 $(LIBNOVER)
775#
776# ifeq (g95,$(F77))
777# SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
778# else
779# ifeq (gfortran,$(F77))
780# SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
781# SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
782# else
783# SHLIB = -lg2c
784# SYSLIBS += -lg2c
785# endif
786# endif
787#
788# ALLD = ar
789# ALFLAGS = cr
790# ALLIB =
791# AEXT = a
792#
793#
794#
795#
796#
797#
798#
799#
800#
801# ../build/Makefile.macosx
802# # -*- mode: makefile -*-
803# # Makefile for AliRoot for MacOS X with gcc
804#
805# XARGS = xargs
806#
807# # OS version
808# MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
809# MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
810#
811# # fink directories
812# FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
813# ifeq (,$(FINK_ROOT))
814# # No fink, build will probably fail, but we try a guess
815# FINK_ROOT=/usr/local
816# endif
817#
818# # The compilers
819# CXX = g++
820# CC = gcc
821# F77 = $(shell root-config --f77)
822#
823# # Global optimisation
824# OPT = -O -g
825# NOOPT = -O0 -g
826#
827# CXXOPT = $(OPT)
828# CXXNOOPT = $(NOOPT)
829# COPT = $(OPT)
830# FOPT = $(OPT) -fno-second-underscore
831# ifeq (g95,$(F77))
832# FOPT += -fbounds-check
833# endif
834#
835# # CERNLIB defines
836# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
837# CLIBCXXOPTS =
838# CLIBCOPT =
839# CLIBFOPT = $(CLIBDEFS)
840#
841# CXXSTF = -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
842#
843# # Compiler flags
844# CXXFLAGS = $(CXXOPT) $(CXXSTF)
845#
846# CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
847#
848# CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
849#
850# FFLAGS = $(CLIBFOPT) $(FOPT)
851# ifeq (g95,$(F77))
852# FFLAGS += -ftrace=full
853# FFLAGS +=-DFORTRAN_G95
854# else
855# FFLAGS +=-DFORTRAN_GFORTRAN
856# endif
857#
858# # rmkdepend flags for building dependencies of FORTRAN files
859# DEPENDFFLAGS = $(FFLAGS)
860#
861# # rootcint flags
862# CINTFLAGS =
863#
864# LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
865# unset LD_PREBIND ; \
866# g++
867# LDFLAGS = $(OPT) $(DICTLOAD)
868#
869# SHLD := $(LD)
870# SOFLAGS := -bundle -undefined dynamic_lookup
871# SHLIB :=
872# SOEXT := so
873#
874# DYLD := $(LD)
875# DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
876# DYLIB :=
877# DYEXT := dylib
878#
879# ALLD = ar
880# ALFLAGS = cr
881# ALLIB =
882# AEXT = a
883#
884# DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
885#
886# SYSLIBS := -L/usr/X11R6/lib -lX11
887#
888# EXEFLAGS := -bind_at_load
889#
890# #System libraries
891#
892# ifeq (g95,$(F77))
893# SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
894# DYLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
895# else
896# SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
897# SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
898# endif
899# ../build/Makefile.macosxicc
900# # -*- mode: makefile -*-
901# # Makefile for AliRoot for MacOS X with gcc
902#
903# XARGS = xargs
904#
905# # fink directories
906# FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
907# ifeq (,$(FINK_ROOT))
908# # No fink, build will probably fail, but we try a guess
909# FINK_ROOT=/usr/local
910# endif
911#
912# # The compilers
913# CXX = icc
914# CC = icc
915#
916# F77 = ifort
917#
918# # Global optimisation
919# OPT = -O -g
920# NOOPT = -g
921#
922# CXXOPT = $(OPT)
923# CXXNOOPT = $(NOOPT)
924# COPT = $(OPT)
925# FOPT = $(OPT)
926#
927# # CERNLIB defines
928# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
929# CLIBCXXOPTS =
930# CLIBCOPT =
931# CLIBFOPT = $(CLIBDEFS)
932#
933# # Compiler flags
934# CXXFLAGS = $(CXXOPT) -fPIC -wd1476 -I/usr/X11R6/include -I$(FINK_ROOT)/include
935#
936# CXXFLAGSNO = $(CXXNOOPT)
937#
938# CFLAGS = $(COPT) -fPIC -restrict -I$(FINK_ROOT)/include
939#
940# FFLAGS = $(CLIBFOPT) $(FOPT)
941# # rmkdepend flags for building dependencies of FORTRAN files
942# DEPENDFFLAGS = $(FFLAGS)
943#
944# # rootcint flags
945# CINTFLAGS =
946#
947# LD = icpc
948# LDFLAGS = $(OPT) $(DICTLOAD)
949#
950# SHLD := $(LD)
951# SOFLAGS := $(OPT) -dynamiclib -undefined dynamic_lookup -single_module
952# SHLIB :=
953# SOEXT := so
954#
955# DYLD := $(LD)
956# DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
957# DYLIB :=
958# DYEXT := dylib
959#
960# ALLD = ar
961# ALFLAGS = cr
962# ALLIB =
963# AEXT = a
964#
965# DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
966#
967# EXEFLAGS := -bind_at_load
968#
969# #System libraries
970#
971# SYSLIBS := -L/usr/X11R6/lib -lX11 -lGL $(LIBNOVER) -L/usr/local/lib \
972# -lXt -L$(shell which ifort | sed -e 's|bin/ifort|lib|') \
973# -lifcore -lifport
974#
975#
976# ../build/Makefile.macosxxlc
977# # -*- mode: makefile -*-
978# # Makefile for AliRoot for MacOS X using the IBM xlc compiler
979#
980# # The compilers
981# CXX = xlC
982# F77 = xlf
983# CC = xlc
984#
985# # Global optimisation
986# OPT = -qnoopt #-O3 -g
987# NOOPT = -qnoopt
988#
989# CXXOPT = $(OPT)
990# CXXNOOPT = $(NOOPT)
991# COPT = $(OPT)
992# FOPT = $(OPT)
993#
994# # CERNLIB defines
995# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
996# CLIBCXXOPTS =
997# CLIBCOPT =
998# CLIBFOPT = $(shell echo $(CLIBDEFS) | sed -e's/-D/-WF,-D/g')
999#
1000# # Compiler flags
1001# CXXFLAGS = $(CXXOPT) -qpic -I/sw/include \
1002# -qflttrap=overflow:zerodivide:invalid:inexact:enable
1003# CXXFLAGSNO = $(CXXNOOPT) -qpic -I/sw/include \
1004# -qflttrap=overflow:zerodivide:invalid:inexact:enable
1005# CFLAGS = -qpic -qextname -I/sw/include \
1006# -qflttrap=overflow:zerodivide:invalid:inexact:enable
1007# FFLAGS = $(CLIBFOPT) $(FOPT) -qpic \
1008# -qflttrap=overflow:zerodivide:invalid:inexact:enable
1009# # rmkdepend flags for building dependencies
1010# DEPENDFFLAGS = $(FFLAGS)
1011# DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
1012#
1013# # rootcint flags
1014# CINTFLAGS =
1015#
1016# LD = xlC
1017# LDFLAGS = $(OPT)
1018#
1019# SHLD := export MACOSX_DEPLOYMENT_TARGET=10.3 ; \
1020# unset LD_PREBIND ; \
1021# xlC
1022# SOFLAGS := -bundle -undefined dynamic_lookup
1023# #SHLIB := -lg2c
1024# SHLIB :=
1025# SOEXT := so
1026#
1027# DYLD := export MACOSX_DEPLOYMENT_TARGET=10.3 ; \
1028# unset LD_PREBIND ; \
1029# xlC
1030# DYFLAGS = -qmkshrobj -undefined dynamic_lookup -single_module
1031# DYLIB :=
1032# DYEXT := dylib
1033#
1034# ALLD = ar
1035# ALFLAGS = cr
1036# ALLIB =
1037# AEXT = a
1038#
1039#
1040# #System libraries
1041# SYSLIBS := -ldl -L/usr/X11R6/lib -lX11
1042#
1043# EXEFLAGS := -Wl,-bind_at_load
1044#
1045#
1046#
1047#
1048# ../build/Makefile.solarisCC5
1049# # -*- mode: makefile -*-
1050# # Makefile to build ALIROOT for SunOS
1051#
1052# # System dependent commands
1053#
1054# XARGS = xargs
1055#
1056# # The compilers
1057# CXX = /opt/SUNWspro/bin/CC
1058# CC = /opt/SUNWspro/bin/cc
1059# F77 = /opt/SUNWspro/bin/f77
1060#
1061# # Global optimisation
1062# OPT = -g -O
1063# NOOPT = -g
1064#
1065# CXXOPT = $(OPT)
1066# CXXNOOPT = $(NOOPT)
1067# COPT = $(OPT)
1068# FOPT = $(OPT)
1069#
1070# # CERNLIB defines
1071# CLIBDEFS = -DCERNLIB_SUN -DCERNLIB_BLDLIB -DCERNLIB_CZ
1072# CLIBCXXOPTS =
1073# CLIBCOPT =
1074# CLIBFOPT = $(CLIBDEFS) -xpp=cpp
1075#
1076# # Compiler flags
1077# CXXFLAGS = $(CXXOPT) +w -KPIC -features=rtti -D_XOPEN_SOURCE -D_XOPEN_VERSION=4 -D__EXTENSIONS__
1078# CXXFLAGSNO = $(CXXNOOPT) +w -KPIC -features=rtti
1079# CFLAGS = $(COPT) -KPIC -erroff=%none
1080# FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS) -KPIC
1081# # rmkdepend flags for building dependencies of FORTRAN files
1082# DEPENDFFLAGS = $(FFLAGS)
1083#
1084# # rootcint flags
1085# CINTFLAGS =
1086#
1087# SHLIB =
1088# SOEXT = so
1089#
1090# LD = /opt/SUNWspro/bin/CC
1091# LDFLAGS = $(OPT) -Qoption ld -t
1092#
1093# SHLD = $(LD)
1094# SOFLAGS = -G $(LDFLAGS) $(SHLIB)
1095#
1096# SYSLIBS := -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt \
1097# -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl
1098#
1099# # Additional flags and libraries for building aliroot executable
1100#
1101# EXEFLAGS := -O -Qoption ld -t
1102#
1103#
1104#
1105#
1106#
1107# ../build/Makefile.win32gcc
1108# # -*- mode: makefile -*-
1109# # Makefile to build AliRoot for Linux
1110#
1111# # System dependent commands
1112#
1113# XARGS = xargs -r
1114#
1115# # The compilers
1116# CXX = g++
1117# F77 = g77
1118# CC = gcc
1119# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
1120# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
1121#
1122# # Global optimisation
1123# OPT = -O -g
1124# NOOPT = -g
1125#
1126# CXXOPT = $(OPT)
1127# CXXNOOPT = $(NOOPT)
1128# COPT = $(OPT)
1129# FOPT = $(OPT)
1130#
1131# # CERNLIB defines
1132# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
1133# CLIBCXXOPTS =
1134# CLIBCOPT =
1135# CLIBFOPT = $(CLIBDEFS)
1136#
1137# # Compiler flags
1138# CXXFLAGS = $(OPT) -Wall -pipe -Woverloaded-virtual -Weffc++ -D_DLL
1139# CXXFLAGSNO = $(NOOPT) -Wall -pipe -Woverloaded-virtual -Weffc++ -D_DLL
1140# CFLAGS = $(OPT) -Wall -D_DLL
1141# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
1142# # rmkdepend flags for building dependencies of FORTRAN files
1143# DEPENDFFLAGS = $(FFLAGS)
1144#
1145# # rootcint flags
1146# CINTFLAGS =
1147#
1148# LD = g++
1149# LDFLAGS = $(OPT)
1150#
1151# SHLD = $(LD)
1152# SOFLAGS = $(OPT) -shared -Wl,--export-all-symbols -Wl,-soname=$$TMPLIB -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc
1153# SHLIB = $(shell root-config --libs) -lg2c
1154# SOEXT = dll
1155#
1156# ALLD = ar
1157# ALFLAGS = cr
1158# ALLIB =
1159# AEXT = a
1160#
1161# # additional ROOT libraries
1162#
1163# #System libraries
1164# SYSLIBS := -ldl -lg2c -lcrypt -L/usr/X11R6/lib -lX11
1165#
1166#
1167#
1168#
1169#
1170
1171
1172
1173
1174
1175