]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/Makefile.macosx64
Compilation on Windows/Cygwin
[u/mrichter/AliRoot.git] / build / Makefile.macosx64
index 2b940cc04897b0fcf74aba7b5fab4eb31b2dbc21..b56957097e2d8128057210a1c94f5b9ef99d8801 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: makefile -*-
 # Makefile for AliRoot for MacOS X with gcc
 
 XARGS = xargs
@@ -16,12 +17,7 @@ endif
 # The compilers
 CXX           = g++ 
 CC           = gcc
-
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
-F77          = g95
-else
-F77          = gfortran
-endif
+F77          = $(shell root-config --f77)
 
 # Global optimisation
 OPT           = -O -g
@@ -31,39 +27,33 @@ CXXOPT        = $(OPT)
 CXXNOOPT      = $(NOOPT) 
 COPT         = $(OPT)
 FOPT         = $(OPT) -fno-second-underscore -m64
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+ifeq (g95,$(F77))
 FOPT        += -fbounds-check
 endif
 
 # CERNLIB defines
-CLIBDEFS      = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
+CLIBDEFS      = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
 CLIBCXXOPTS   =
 CLIBCOPT      =
 CLIBFOPT      = $(CLIBDEFS)
 
-CXXSTF        = -m64 -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
+CXXSTF        = -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
 
 # Compiler flags
 CXXFLAGS      = $(CXXOPT) $(CXXSTF)
 
-ifneq (,$(findstring g95,$(ROOTBUILD)))
-FFLAGS       +=-DFORTRAN_G95
-else
-ifneq (,$(findstring gfortran,$(ROOTBUILD)))
-FFLAGS       +=-DFORTRAN_GFORTRAN
-else
-FFLAGS       +=
-endif
-endif
-
 CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
 
 CFLAGS       = $(COPT) -m64 -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
 
 FFLAGS        = $(CLIBFOPT) $(FOPT)
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+ifeq (g95,$(F77))
 FFLAGS        += -ftrace=full
+FFLAGS       +=-DFORTRAN_G95
+else
+FFLAGS       +=-DFORTRAN_GFORTRAN
 endif
+
 # rmkdepend flags for building dependencies of FORTRAN files
 DEPENDFFLAGS  = $(FFLAGS)
 
@@ -98,7 +88,7 @@ EXEFLAGS     := -bind_at_load
 
 #System libraries
 
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+ifeq (g95,$(F77))
 SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
 else
 SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)