Updated list of classes
[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)
46e443ec 72 Message(STATUS "No ${LIB}LinkDef.h found... building lib with no ROOT dict")
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
3c34a311 138# macosx64
e969a926 139If(ALICE_TARGET STREQUAL macosx64)
140
141 Execute_process(
142 COMMAND sw_vers -productVersion
143 OUTPUT_VARIABLE MACOSX
144 OUTPUT_STRIP_TRAILING_WHITESPACE)
145
146 String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\1" MACOSX_MAJOR "${MACOSX}")
147 String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\2" MACOSX_MINOR "${MACOSX}")
148
149 Message(STATUS "Mac OS X ${MACOSX_MAJOR}.${MACOSX_MINOR}")
150
151 Find_Package(fink)
152
84641bd5 153# Set(CMAKE_CXX_COMPILER g++)
154# Set(CMAKE_C_COMPILER gcc)
e969a926 155# I found no way to make this work...
156# Set(CMAKE_CXX_LINK_EXECUTABLE
157# "MACOSX_DEPLOYMENT_TARGET=${MACOSX_MAJOR}.${MACOSX_MINOR} ${CMAKE_CXX_LINK_EXECUTABLE}")
158
159 Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -flat_namespace -single_module -undefined dynamic_lookup -m64")
160
161 Set(CMAKE_Fortran_FLAGS "-fno-second-underscore -m64")
162
163 Set(CLIBDEFS "-DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
164
165 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")
166 Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")
167
168 If(CMAKE_Fortran_COMPILER MATCHES g95)
169 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95")
3c34a311 170 Execute_process(COMMAND g95 --print-search-dirs
e969a926 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
3c34a311 215# linuxx8664gcc
e2d7359f 216If(ALICE_TARGET STREQUAL linuxx8664gcc)
217
218
219 Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -shared -Wl")
220
221 Set(CMAKE_Fortran_FLAGS "-fno-second-underscore -m64")
222
223 Set(CLIBDEFS "-DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ")
224
225 Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -pipe -W -Wall -Weffc++ -Woverloaded-virtual -fmessage-length=0 -Wno-long-long -Dlinux -I/usr/X11R6/include")
226 Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -Wall -W -pipe")
227
228 If(CMAKE_Fortran_COMPILER MATCHES g95)
229 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95")
3c34a311 230 Execute_process(COMMAND g95 --print-search-dirs
e2d7359f 231 OUTPUT_VARIABLE _out)
232 String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
233 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
234 Else(CMAKE_Fortran_COMPILER MATCHES g95)
235 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DFORTRAN_GFORTRAN")
236 Execute_process(
237 COMMAND gfortran -m64 -print-file-name=libgfortran.so
238 OUTPUT_VARIABLE FLIB
239 OUTPUT_STRIP_TRAILING_WHITESPACE)
240 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
241 Execute_process(
242 COMMAND gfortran -m64 -print-file-name=libgfortranbegin.a
243 OUTPUT_VARIABLE FLIB
244 OUTPUT_STRIP_TRAILING_WHITESPACE)
245 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
246 Endif(CMAKE_Fortran_COMPILER MATCHES g95)
247
248 Set(LINK_FLAGS "${LINK_FLAGS} -m64")
249
250 Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
251
252 Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
253
254 Set(LINK_FLAGS "${LINK_FLAGS}")
255
256Endif(ALICE_TARGET STREQUAL linuxx8664gcc)
257
3c34a311 258# macosx
259If(ALICE_TARGET STREQUAL macosx)
260
261 Execute_process(
262 COMMAND sw_vers -productVersion
263 OUTPUT_VARIABLE MACOSX
264 OUTPUT_STRIP_TRAILING_WHITESPACE)
265
266 String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\1" MACOSX_MAJOR "${MACOSX}")
267 String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\2" MACOSX_MINOR "${MACOSX}")
268
269 Message(STATUS "Mac OS X ${MACOSX_MAJOR}.${MACOSX_MINOR}")
270
271 Find_Package(fink)
272
273 Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -flat_namespace -single_module -undefined dynamic_lookup -m32")
274
275 Set(CMAKE_Fortran_FLAGS "-fno-second-underscore -m32")
276
277 Set(CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
278
279 Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -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")
280 Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")
281
282 If(CMAKE_Fortran_COMPILER MATCHES g95)
283 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95 -single_module")
284 Execute_process(COMMAND g95 --print-search-dirs
285 OUTPUT_VARIABLE _out)
286 String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
287 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
288 Else(CMAKE_Fortran_COMPILER MATCHES g95)
289 Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DFORTRAN_GFORTRAN")
290 Execute_process(
291 COMMAND gfortran -m32 -print-file-name=libgfortran.dylib
292 OUTPUT_VARIABLE FLIB
293 OUTPUT_STRIP_TRAILING_WHITESPACE)
294 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
295 Execute_process(
296 COMMAND gfortran -m32 -print-file-name=libgfortranbegin.a
297 OUTPUT_VARIABLE FLIB
298 OUTPUT_STRIP_TRAILING_WHITESPACE)
299 Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
300 Endif(CMAKE_Fortran_COMPILER MATCHES g95)
301
302 Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
303
304 Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
305
306 Set(LINK_FLAGS "${LINK_FLAGS} -bind_at_load -single_module")
307
308Endif(ALICE_TARGET STREQUAL macosx)
309
e969a926 310EndMacro (SetupSystem)
311
312# ../build/Makefile.alphacxx6
313# # -*- mode: makefile -*-
314# # Makefile to build AliRoot for Alpha OSF1
315#
316# # System dependent commands
317#
318# XARGS = xargs
319#
320# # The compilers
321# CXX = cxx
322# F77 = f77
323#
324# # Global optimisation
325# OPT = -O
326# NOOPT = -O0
327#
328# CXXOPT = $(OPT)
329# CXXNOOPT = $(NOOPT)
330# COPT = $(OPT)
331# FOPT = $(OPT)
332#
333# # CERNLIB defines
334# CLIBDEFS = -DCERNLIB_DECS -DCERNLIB_BLDLIB -DCERNLIB_CZ
335# CLIBCXXOPTS =
336# CLIBCOPT =
337# CLIBFOPT = -I. $(CLIBDEFS)
338#
339# # Compiler flags
340# CXXFLAGS = $(CXXOPT) -nostdnew -rtti -taso
341# CXXFLAGSNO = $(CXXNOOPT) -nostdnew -rtti -taso
342# CFLAGS = $(COPT) -fPIC -pipe -mcpu=ev5 -D__osf__ -D__alpha
343# FFLAGS = $(FOPT) -nofor_main -warn noinformational -taso $(CLIBFOPT)
344# # rmkdepend flags for building dependencies of FORTRAN files
345# DEPENDFFLAGS = $(filter-out -warn noinformational,$(FFLAGS))
346#
347# # rootcint flags
348# CINTFLAGS = -D__DECCXX
349#
350# LD = cxx
351# LDFLAGS =
352#
353# SHLD = ld
354# SOFLAGS = -L/usr/lib/cmplrs/cxx -rpath /usr/lib/cmplrs/cxx \
355# -expect_unresolved "*" -msym -shared -taso \
356# /usr/lib/cmplrs/cc/crt0.o /usr/lib/cmplrs/cxx/_main.o
357#
358# SHLIB = -lUfor -lfor -lFutil
359# SOEXT = so
360#
361# #System libraries
362#
363# # Flags for static libraries
364# AFLAGS = $(filter-out -rpath /usr/lib/cmplrs/cxx -msym -shared /usr/lib/cmplrs/cc/crt0.o,$(SOFLAGS))
365# AFLAGS += $(SHLIB)
366#
367# # Additional flags and libraries for building aliroot executable
368# SYSLIBS := -lXm -lXt -lX11 -lPW -lUfor -lfor -lFutil -lots -taso -lbsd
369#
370# # Cure funny problem
371# # sometimes in dependencies system include files of the sort
372# # /usr/.../filename AND /usr/.../filename.cc are present
373# # DEC believes that /usr/.../filename is the executable to be
374# # built from /usr/.../filename.cc
375# # Just avoid this to happen
376#
377# % : %.cc
378# @;
379#
380#
381#
382#
383#
384#
385#
386#
387#
388# ../build/Makefile.hpuxacc
389# # -*- mode: makefile -*-
390# # Makefile to build AliRoot on HP-UX
391#
392# # System dependent commands
393#
394# XARGS = xargs
395#
396# # The compilers
397# CXX = aCC
398# F77 = f77
399# CC = cc
400#
401# # Global optimisation
402# OPT = -g -O
403# NOOPT = -g
404#
405# CXXOPT = $(OPT)
406# CXXNOOPT = $(NOOPT)
407# COPT = $(OPT)
408# FOPT = $(OPT)
409#
410# # CERNLIB defines
411# CLIBDEFS = -DCERNLIB_HPUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
412# CLIBCXXOPTS =
413# CLIBCOPT = +z -Ae
414# CLIBFOPT = $(CLIBDEFS) -WF,-P
415#
416# CXXFLAGS = $(CXXOPT) -Wc,-ansi_for_scope,on +Z -z +W70,495,740,749,823,829 -Dextname
417# CXXFLAGSNO = $(CXXNOOPT) -Wc,-ansi_for_scope,on +Z -z +W70,495,740,749,823,829 -Dextname
418# CFLAGS = $(COPT) +Z -Ae
419# FFLAGS = $(CLIBFOPT) $(FOPT) +ppu +Z
420# # rmkdepend flags for building dependencies of FORTRAN files
421# DEPENDFFLAGS = $(FFLAGS)
422#
423# # rootcint flags
424# CINTFLAGS =
425#
426# LD = aCC
427# LDFLAGS = $(OPT) -z -Wl,+s -Wl,-E
428#
429# SHLD = $(LD)
430# SOFLAGS = -b /usr/lib/libm.sl
431#
432# SOEXT = sl
433#
434# # additional ROOT libraries
435# SYSLIBS := -lcrypt -L/usr/lib/X11R6 -lX11
436#
437#
438#
439#
440#
441# ../build/Makefile.linux
442# # -*- mode: makefile -*-
443# # Makefile to build AliRoot for Linux
444#
445# # System dependent commands
446#
447# XARGS = xargs -r
448#
449# # The compilers
450# CXX = g++
451# CC = gcc
452# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
453# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
454# F77 = $(shell root-config --f77)
455#
456# # Global optimisation
457# OPT = -O -g
458# NOOPT = -g
459#
460# CXXOPT = $(OPT)
461# CXXNOOPT = $(NOOPT)
462# COPT = $(OPT)
463# FOPT = $(OPT)
464#
465# # CERNLIB defines
466# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
467# CLIBCXXOPTS =
468# CLIBCOPT =
469# CLIBFOPT = $(CLIBDEFS)
470#
471# # Compiler flags
472# ifeq ($(CCMAJORV),2)
473# CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe
474# CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe
475# else
476# ifeq ($(CCMAJORV),3)
477# CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
478# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
479# else
480# ifeq ($(CCMAJORV),4)
481# CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
482# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
483# else
484# CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
485# CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
486# endif
487# endif
488# endif
489# CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
490# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
491#
492# ifeq (g95,$(F77))
493# FFLAGS +=-DFORTRAN_G95
494# else
495# ifeq (gfortran,$(F77))
496# FFLAGS +=-DFORTRAN_GFORTRAN
497# else
498# FFLAGS +=
499# endif
500# endif
501#
502# # rmkdepend flags for building dependencies of FORTRAN files
503# DEPENDFFLAGS = $(FFLAGS)
504#
505# # rootcint flags
506# CINTFLAGS =
507#
508# LD = g++
509# LDFLAGS = $(OPT)
510#
511# SHLD = $(LD)
512# SOFLAGS = $(OPT) -shared -Wl
513# SOEXT = so
514#
515# #System libraries
516# SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11
517#
518# ifeq (g95,$(F77))
519# SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
520# else
521# ifeq (gfortran,$(F77))
522# SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
523# SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
524# SYSLIBS += $(SHLIB)
525# else
526# SHLIB = -lg2c
527# SYSLIBS += -lg2c
528# endif
529# endif
530#
531# ALLD = ar
532# ALFLAGS = cr
533# ALLIB =
534# AEXT = a
535#
536# # additional ROOT libraries
537#
538#
539#
540#
541#
542#
543# ../build/Makefile.linuxalphagcc
544# # -*- mode: makefile -*-
545# # Makefile to build AliRoot for Linux on alpha
546#
547# # System dependent commands
548#
549# XARGS = xargs -r
550#
551# # The compilers
552# CXX = g++
553# F77 = g77
554# CC = gcc
555# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
556# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
557#
558# # Global optimisation
559# OPT = -O -g -mieee -mno-soft-float
560# NOOPT = -g -mieee -mno-soft-float
561#
562# CXXOPT = $(OPT)
563# CXXNOOPT = $(NOOPT)
564# COPT = $(OPT)
565# FOPT = $(OPT)
566#
567# # CERNLIB defines
568# CLIBDEFS = -DCERNLIB_UNIX -DCERNLIB_DECS -DCERNLIB_BLDLIB -DCERNLIB_CZ
569# CLIBCXXOPTS =
570# CLIBCOPT =
571# CLIBFOPT = $(CLIBDEFS)
572#
573# # Compiler flags
574#
575# CXXFLAGS = $(OPT) -Wall -fPIC -pipe
576# CXXFLAGSNO = $(NOOPT) -Wall -fPIC -pipe
577# CFLAGS = $(OPT) -Wall -fPIC -pipe -ansi
578# FFLAGS = $(CLIBFOPT) $(FOPT) -Wall -fPIC -pipe -fno-second-underscore
579# # rmkdepend flags for building dependencies of FORTRAN files
580# DEPENDFFLAGS = $(FFLAGS)
581#
582# # rootcint flags
583# CINTFLAGS =
584#
585# LD = g++
586# LDFLAGS = $(OPT)
587#
588# SHLD = $(LD)
589# SOFLAGS = $(OPT) -Wall -fPIC -pipe -shared -Wl
590# SHLIB = -lg2c
591# SOEXT = so
592#
593# ALLD = ar
594# ALFLAGS = cr
595# ALLIB =
596# AEXT = a
597#
598# #System libraries
599# SYSLIBS := -ldl -lg2c -lcrypt -L/usr/X11R6/lib -lX11
600#
601#
602#
603#
604#
605# ../build/Makefile.linuxia64ecc
606# # -*- mode: makefile -*-
607# # Makefile for AliRoot for Itanium/Linux with Intel icc compiler
608#
609# # System dependent commands
610#
611# XARGS = xargs -r
612#
613# # The compilers
614# CXX = icc
615# F77 = ifort
616# CC = icc
617#
618# # Global optimisation
619# OPT = -g #-O
620# NOOPT = -g
621#
622# CXXOPT = $(OPT)
623# CXXNOOPT = $(OPT)
624# COPT = $(OPT)
625# FOPT = $(OPT)
626#
627# # CERNLIB defines
628# CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
629# CLIBCXXOPTS =
630# CLIBCOPT =
631# CLIBFOPT = $(CLIBDEFS)
632#
633# # Compiler flags
634# CXXFLAGS = $(CXXOPT)
635# CXXFLAGSNO = $(CXXNOOPT)
636# CFLAGS = $(COPT)
637# FFLAGS = $(CLIBFOPT) $(FOPT)
638# # rmkdepend flags for building dependencies of FORTRAN files
639# DEPENDFFLAGS = $(FFLAGS)
640#
641# # rootcint flags
642# CINTFLAGS =
643#
644# LD = icpc
645# LDFLAGS = $(OPT)
646#
647# SHLD = $(LD)
648# SOFLAGS = -Wl,-soname,$$TMPLIB -shared -O
649# SHLIB =
650# SOEXT = so
651#
652# ALLD = ar
653# ALFLAGS = cr
654# ALLIB =
655# AEXT = a
656#
657# # additional ROOT libraries
658#
659# LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
660#
661# SYSLIBS := $(LIBNOVER) -lcrypt -L/usr/local/lib -lXt -lCEPCF90 -lF90 \
662# -lPEPCF90 -lintrins -L/usr/X11R6/lib -lX11
663# ../build/Makefile.linuxia64gcc
664# # -*- mode: makefile -*-
665# # Makefile for AliRoot for Itanium/Linux with gcc
666#
667# # System dependent commands
668#
669# XARGS = xargs -r
670#
671# # The compilers
672# CXX = g++
673# F77 = g77
674# CC = gcc
675#
676# # Global optimisation
677# OPT = -g -O
678# NOOPT = -g
679#
680# CXXOPT = $(OPT)
681# CXXNOOPT = $(NOOPT)
682# COPT = $(OPT)
683# FOPT = $(OPT)
684#
685# # CERNLIB defines
686# CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
687# CLIBCXXOPTS =
688# CLIBCOPT =
689# CLIBFOPT = $(CLIBDEFS)
690#
691# # Compiler flags
692# CXXFLAGS = $(CXXOPT) -Wall -Weffc++ -fPIC -pipe
693# CXXFLAGSNO = $(CXXNOOPT) -Wall -Weffc++ -fPIC -pipe
694# CFLAGS = -Wall -fPIC -pipe
695# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
696# # rmkdepend flags for building dependencies of FORTRAN files
697# DEPENDFFLAGS = $(FFLAGS)
698#
699# # rootcint flags
700# CINTFLAGS =
701#
702# LD = g++
703# LDFLAGS = $(OPT) -Wl,-Map -Wl,$@.map
704#
705# SHLD = $(LD)
706# SOFLAGS = -shared -Wl -O2
707# SOEXT = so
708#
709# ALLD = ar
710# ALFLAGS = cr
711# ALLIB =
712# AEXT = a
713#
714# # additional ROOT libraries
715#
716# LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
717#
718# #System libraries
719# SYSLIBS := -ldl -lbsd -lg2c -L/usr/X11R6/lib -lX11 $(LIBNOVER)
720#
721#
722#
723#
724#
725# ../build/Makefile.linuxicc
726# # -*- mode: makefile -*-
727# # Makefile for AliRoot for Linux with the Intel icc compiler
728#
729# # System dependent commands
730#
731# XARGS = xargs -r
732#
733# # The compilers
734# CXX = icc
735# CC = icc
736#
737# # Compiler version:
738# ICC_MAJOR := $(shell $(CXX) -V 2>&1 | awk '{ if (NR==1) print $$8 }' | \
739# cut -d'.' -f1)
740# ICC_MINOR := $(shell $(CXX) -V 2>&1 | awk '{ if (NR==1) print $$8 }' | \
741# cut -d'.' -f2)
742#
743# F77 = ifort
744#
745# # Global optimisation
746# OPT = -O -ip
747# NOOPT = -O0
748#
749# CXXOPT = $(OPT)
750# CXXNOOPT = $(NOOPT)
751# COPT = $(OPT)
752# FOPT = $(OPT)
753#
754# # CERNLIB defines
755# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
756# CLIBCXXOPTS =
757# CLIBCOPT =
758# CLIBFOPT = $(CLIBDEFS)
759#
760# # Compiler flags
761# CXXFLAGS = $(CXXOPT)
762# CXXFLAGSNO = $(CXXNOOPT)
763# CFLAGS = $(COPT)
764# FFLAGS = $(CLIBFOPT) $(FOPT)
765# # rmkdepend flags for building dependencies of FORTRAN files
766# DEPENDFFLAGS = $(FFLAGS)
767#
768# # rootcint flags
769# CINTFLAGS =
770#
771# LD = icpc
772# LDFLAGS = $(OPT)
773#
774# SHLD = $(LD)
775# SOFLAGS = -Wl,-soname,$$TMPLIB -shared $(OPT)
776# SHLIB =
777# SOEXT = so
778#
779# ALLD = ar
780# ALFLAGS = cr
781# ALLIB =
782# AEXT = a
783#
784# # additional ROOT libraries
785#
786# LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'`
787#
788# #System libraries
789# SYSLIBS := -lcrypt -L/usr/X11R6/lib -lX11 $(LIBNOVER) -L/usr/local/lib \
790# -lXt -L$(shell which ifort | sed -e 's|bin/ifort|lib|') \
791# -lifcore -lifport
e969a926 792# ../build/Makefile.macosxicc
793# # -*- mode: makefile -*-
794# # Makefile for AliRoot for MacOS X with gcc
795#
796# XARGS = xargs
797#
798# # fink directories
799# FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
800# ifeq (,$(FINK_ROOT))
801# # No fink, build will probably fail, but we try a guess
802# FINK_ROOT=/usr/local
803# endif
804#
805# # The compilers
806# CXX = icc
807# CC = icc
808#
809# F77 = ifort
810#
811# # Global optimisation
812# OPT = -O -g
813# NOOPT = -g
814#
815# CXXOPT = $(OPT)
816# CXXNOOPT = $(NOOPT)
817# COPT = $(OPT)
818# FOPT = $(OPT)
819#
820# # CERNLIB defines
821# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
822# CLIBCXXOPTS =
823# CLIBCOPT =
824# CLIBFOPT = $(CLIBDEFS)
825#
826# # Compiler flags
827# CXXFLAGS = $(CXXOPT) -fPIC -wd1476 -I/usr/X11R6/include -I$(FINK_ROOT)/include
828#
829# CXXFLAGSNO = $(CXXNOOPT)
830#
831# CFLAGS = $(COPT) -fPIC -restrict -I$(FINK_ROOT)/include
832#
833# FFLAGS = $(CLIBFOPT) $(FOPT)
834# # rmkdepend flags for building dependencies of FORTRAN files
835# DEPENDFFLAGS = $(FFLAGS)
836#
837# # rootcint flags
838# CINTFLAGS =
839#
840# LD = icpc
841# LDFLAGS = $(OPT) $(DICTLOAD)
842#
843# SHLD := $(LD)
844# SOFLAGS := $(OPT) -dynamiclib -undefined dynamic_lookup -single_module
845# SHLIB :=
846# SOEXT := so
847#
848# DYLD := $(LD)
849# DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
850# DYLIB :=
851# DYEXT := dylib
852#
853# ALLD = ar
854# ALFLAGS = cr
855# ALLIB =
856# AEXT = a
857#
858# DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
859#
860# EXEFLAGS := -bind_at_load
861#
862# #System libraries
863#
864# SYSLIBS := -L/usr/X11R6/lib -lX11 -lGL $(LIBNOVER) -L/usr/local/lib \
865# -lXt -L$(shell which ifort | sed -e 's|bin/ifort|lib|') \
866# -lifcore -lifport
867#
868#
869# ../build/Makefile.macosxxlc
870# # -*- mode: makefile -*-
871# # Makefile for AliRoot for MacOS X using the IBM xlc compiler
872#
873# # The compilers
874# CXX = xlC
875# F77 = xlf
876# CC = xlc
877#
878# # Global optimisation
879# OPT = -qnoopt #-O3 -g
880# NOOPT = -qnoopt
881#
882# CXXOPT = $(OPT)
883# CXXNOOPT = $(NOOPT)
884# COPT = $(OPT)
885# FOPT = $(OPT)
886#
887# # CERNLIB defines
888# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
889# CLIBCXXOPTS =
890# CLIBCOPT =
891# CLIBFOPT = $(shell echo $(CLIBDEFS) | sed -e's/-D/-WF,-D/g')
892#
893# # Compiler flags
894# CXXFLAGS = $(CXXOPT) -qpic -I/sw/include \
895# -qflttrap=overflow:zerodivide:invalid:inexact:enable
896# CXXFLAGSNO = $(CXXNOOPT) -qpic -I/sw/include \
897# -qflttrap=overflow:zerodivide:invalid:inexact:enable
898# CFLAGS = -qpic -qextname -I/sw/include \
899# -qflttrap=overflow:zerodivide:invalid:inexact:enable
900# FFLAGS = $(CLIBFOPT) $(FOPT) -qpic \
901# -qflttrap=overflow:zerodivide:invalid:inexact:enable
902# # rmkdepend flags for building dependencies
903# DEPENDFFLAGS = $(FFLAGS)
904# DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
905#
906# # rootcint flags
907# CINTFLAGS =
908#
909# LD = xlC
910# LDFLAGS = $(OPT)
911#
912# SHLD := export MACOSX_DEPLOYMENT_TARGET=10.3 ; \
913# unset LD_PREBIND ; \
914# xlC
915# SOFLAGS := -bundle -undefined dynamic_lookup
916# #SHLIB := -lg2c
917# SHLIB :=
918# SOEXT := so
919#
920# DYLD := export MACOSX_DEPLOYMENT_TARGET=10.3 ; \
921# unset LD_PREBIND ; \
922# xlC
923# DYFLAGS = -qmkshrobj -undefined dynamic_lookup -single_module
924# DYLIB :=
925# DYEXT := dylib
926#
927# ALLD = ar
928# ALFLAGS = cr
929# ALLIB =
930# AEXT = a
931#
932#
933# #System libraries
934# SYSLIBS := -ldl -L/usr/X11R6/lib -lX11
935#
936# EXEFLAGS := -Wl,-bind_at_load
937#
938#
939#
940#
941# ../build/Makefile.solarisCC5
942# # -*- mode: makefile -*-
943# # Makefile to build ALIROOT for SunOS
944#
945# # System dependent commands
946#
947# XARGS = xargs
948#
949# # The compilers
950# CXX = /opt/SUNWspro/bin/CC
951# CC = /opt/SUNWspro/bin/cc
952# F77 = /opt/SUNWspro/bin/f77
953#
954# # Global optimisation
955# OPT = -g -O
956# NOOPT = -g
957#
958# CXXOPT = $(OPT)
959# CXXNOOPT = $(NOOPT)
960# COPT = $(OPT)
961# FOPT = $(OPT)
962#
963# # CERNLIB defines
964# CLIBDEFS = -DCERNLIB_SUN -DCERNLIB_BLDLIB -DCERNLIB_CZ
965# CLIBCXXOPTS =
966# CLIBCOPT =
967# CLIBFOPT = $(CLIBDEFS) -xpp=cpp
968#
969# # Compiler flags
970# CXXFLAGS = $(CXXOPT) +w -KPIC -features=rtti -D_XOPEN_SOURCE -D_XOPEN_VERSION=4 -D__EXTENSIONS__
971# CXXFLAGSNO = $(CXXNOOPT) +w -KPIC -features=rtti
972# CFLAGS = $(COPT) -KPIC -erroff=%none
973# FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS) -KPIC
974# # rmkdepend flags for building dependencies of FORTRAN files
975# DEPENDFFLAGS = $(FFLAGS)
976#
977# # rootcint flags
978# CINTFLAGS =
979#
980# SHLIB =
981# SOEXT = so
982#
983# LD = /opt/SUNWspro/bin/CC
984# LDFLAGS = $(OPT) -Qoption ld -t
985#
986# SHLD = $(LD)
987# SOFLAGS = -G $(LDFLAGS) $(SHLIB)
988#
989# SYSLIBS := -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt \
990# -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl
991#
992# # Additional flags and libraries for building aliroot executable
993#
994# EXEFLAGS := -O -Qoption ld -t
995#
996#
997#
998#
999#
1000# ../build/Makefile.win32gcc
1001# # -*- mode: makefile -*-
1002# # Makefile to build AliRoot for Linux
1003#
1004# # System dependent commands
1005#
1006# XARGS = xargs -r
1007#
1008# # The compilers
1009# CXX = g++
1010# F77 = g77
1011# CC = gcc
1012# CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1)
1013# CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2)
1014#
1015# # Global optimisation
1016# OPT = -O -g
1017# NOOPT = -g
1018#
1019# CXXOPT = $(OPT)
1020# CXXNOOPT = $(NOOPT)
1021# COPT = $(OPT)
1022# FOPT = $(OPT)
1023#
1024# # CERNLIB defines
1025# CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
1026# CLIBCXXOPTS =
1027# CLIBCOPT =
1028# CLIBFOPT = $(CLIBDEFS)
1029#
1030# # Compiler flags
1031# CXXFLAGS = $(OPT) -Wall -pipe -Woverloaded-virtual -Weffc++ -D_DLL
1032# CXXFLAGSNO = $(NOOPT) -Wall -pipe -Woverloaded-virtual -Weffc++ -D_DLL
1033# CFLAGS = $(OPT) -Wall -D_DLL
1034# FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore
1035# # rmkdepend flags for building dependencies of FORTRAN files
1036# DEPENDFFLAGS = $(FFLAGS)
1037#
1038# # rootcint flags
1039# CINTFLAGS =
1040#
1041# LD = g++
1042# LDFLAGS = $(OPT)
1043#
1044# SHLD = $(LD)
1045# SOFLAGS = $(OPT) -shared -Wl,--export-all-symbols -Wl,-soname=$$TMPLIB -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc
1046# SHLIB = $(shell root-config --libs) -lg2c
1047# SOEXT = dll
1048#
1049# ALLD = ar
1050# ALFLAGS = cr
1051# ALLIB =
1052# AEXT = a
1053#
1054# # additional ROOT libraries
1055#
1056# #System libraries
1057# SYSLIBS := -ldl -lg2c -lcrypt -L/usr/X11R6/lib -lX11
1058#
1059#
1060#
1061#
1062#
1063
1064
1065
1066
1067
1068