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