]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/Makefile.macosx64
Coding rule violations corrected.
[u/mrichter/AliRoot.git] / build / Makefile.macosx64
index e87a195b9c3861ea39e22e5518a0d3e2ebcc20ea..df94e5edad9fafc209eddead8abcc85d9d526c72 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: makefile -*-
 # Makefile for AliRoot for MacOS X with gcc
 
 XARGS = xargs
@@ -13,16 +14,6 @@ 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         = -O0 -g
@@ -30,40 +21,35 @@ NOOPT         = -O0 -g
 CXXOPT        = $(OPT) 
 CXXNOOPT      = $(NOOPT) 
 COPT         = $(OPT)
-FOPT         = $(OPT) -fno-second-underscore -m64
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+FOPT         = $(OPT) -fno-second-underscore
+ifneq (,$(findstring 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        = -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
 
-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        = -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
 
 # Compiler flags
-CXXFLAGS      = $(CXXOPT) $(CXXSTF) -Weffc++
-
-ifneq (,$(findstring g95,$(ROOTBUILD)))
-FFLAGS       +=-DFORTRAN_G95
-else
-ifneq (,$(findstring gfortran,$(ROOTBUILD)))
-FFLAGS       +=-DFORTRAN_GFORTRAN
-else
-FFLAGS       +=
-endif
-endif
+CXXFLAGS      = $(CXXOPT) $(CXXSTF)
 
 CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
 
-CFLAGS       = $(COPT) -m64 -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
+CFLAGS       = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
 
 FFLAGS        = $(CLIBFOPT) $(FOPT)
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+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)
 
@@ -72,19 +58,14 @@ CINTFLAGS     =
 
 LD            = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
                unset LD_PREBIND ; \
-               g++
-LDFLAGS       = $(OPT) -m64 $(DICTLOAD)
+               $(shell root-config --ld)
+LDFLAGS       = $(OPT) $(DICTLOAD)
 
 SHLD        := $(LD)
-SOFLAGS      := -m64 -bundle -undefined dynamic_lookup
+SOFLAGS      := -m64 -dynamiclib -undefined dynamic_lookup -single_module
 SHLIB        := 
 SOEXT       := so
 
-DYLD        := $(LD)
-DYFLAGS       = -m64 -dynamiclib -undefined dynamic_lookup -single_module
-DYLIB        := 
-DYEXT        := dylib
-
 ALLD         = ar
 ALFLAGS       = cr
 ALLIB         = 
@@ -98,9 +79,9 @@ 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
 else
-SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
-SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
+SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
+SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
 endif