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