]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/Makefile.macosx
set new run range and root version, do only run k_T cluster analysis for now, change...
[u/mrichter/AliRoot.git] / build / Makefile.macosx
index 4042d0daf961c3673c3f748de486e2277ac510c6..a2d1f69966158b6b2b4d0b07fb472db8eeafc8c7 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: makefile -*-
 # Makefile for AliRoot for MacOS X with gcc
 
 XARGS = xargs
@@ -13,25 +14,15 @@ ifeq (,$(FINK_ROOT))
 FINK_ROOT=/usr/local
 endif
 
-# The compilers
-CXX           = g++ 
-CC           = gcc
-
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
-F77          = g95
-else
-F77          = gfortran
-endif
-
 # Global optimisation
 OPT           = -O -g
-NOOPT         = -g
+NOOPT         = -O0 -g
 
 CXXOPT        = $(OPT) 
 CXXNOOPT      = $(NOOPT) 
 COPT         = $(OPT)
 FOPT         = $(OPT) -fno-second-underscore 
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+ifeq (,$(findstring g95,$(F77)))
 FOPT        += -fbounds-check
 endif
 
@@ -41,17 +32,23 @@ CLIBCXXOPTS   =
 CLIBCOPT      =
 CLIBFOPT      = $(CLIBDEFS)
 
+CXXSTF        =  -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
+
 # Compiler flags
-CXXFLAGS      = $(CXXOPT)   -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -I/usr/X11R6/include -I$(FINK_ROOT)/include -Woverloaded-virtual -Weffc++ 
+CXXFLAGS      = $(CXXOPT) $(CXXSTF)
 
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
-CXXFLAGS+=-DFORTRAN_G95
-endif
-CXXFLAGSNO    = $(CXXNOOPT) -Wall -W -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include  -Wno-long-double
+CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
 
 CFLAGS       = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
 
 FFLAGS        = $(CLIBFOPT) $(FOPT)
+ifneq (,$(findstring g95,$(F77)))
+FFLAGS        += -ftrace=full
+FFLAGS        +=-DFORTRAN_G95
+else
+FFLAGS        +=-DFORTRAN_GFORTRAN
+endif
+
 # rmkdepend flags for building dependencies of FORTRAN files
 DEPENDFFLAGS  = $(FFLAGS)
 
@@ -60,19 +57,14 @@ CINTFLAGS     =
 
 LD            = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
                unset LD_PREBIND ; \
-               g++
+               $(shell root-config --ld)
 LDFLAGS       = $(OPT) $(DICTLOAD)
 
 SHLD        := $(LD)
-SOFLAGS      := -bundle -undefined dynamic_lookup
+SOFLAGS      := -dynamiclib -undefined dynamic_lookup -single_module
 SHLIB        := 
 SOEXT       := so
 
-DYLD        := $(LD)
-DYFLAGS       = -dynamiclib -undefined dynamic_lookup -single_module
-DYLIB        := 
-DYEXT        := dylib
-
 ALLD         = ar
 ALFLAGS       = cr
 ALLIB         = 
@@ -86,8 +78,10 @@ EXEFLAGS     := -bind_at_load
 
 #System libraries
 
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
-SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
+ifneq (,$(findstring g95,$(F77)))
+SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
+DYLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
 else
-SYSLIBS += -ldl -L$(shell gfortran --print-search-dirs | sed -n -e 's/install: //p') -lgfortranbegin -lgfortran
+SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
+SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
 endif