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