X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=build%2FMakefile.macosx;h=3d23a42fc4a7c989298d71c79f7bd80d67ae964c;hb=8316711a80fdea70785d884c12e57e6336cc9892;hp=d2b59f36b30a4f598f01b70e47963497f96034c2;hpb=7da87db6ffbed65b43409c2edc5831c074fb3f5a;p=u%2Fmrichter%2FAliRoot.git diff --git a/build/Makefile.macosx b/build/Makefile.macosx index d2b59f36b30..3d23a42fc4a 100644 --- a/build/Makefile.macosx +++ b/build/Makefile.macosx @@ -1,3 +1,4 @@ +# -*- mode: makefile -*- # Makefile for AliRoot for MacOS X with gcc XARGS = xargs @@ -14,14 +15,9 @@ FINK_ROOT=/usr/local endif # The compilers -CXX = g++ -CC = gcc - -ifeq (g95,$(findstring g95,$(ROOTBUILD))) -F77 = g95 -else -F77 = gfortran -endif +CXX = $(shell root-config --cxx) +CC = $(shell root-config --cc) +F77 = $(shell root-config --f77) # Global optimisation OPT = -O -g @@ -31,7 +27,7 @@ CXXOPT = $(OPT) CXXNOOPT = $(NOOPT) COPT = $(OPT) FOPT = $(OPT) -fno-second-underscore -ifeq (g95,$(findstring g95,$(ROOTBUILD))) +ifeq (g95,$(F77)) FOPT += -fbounds-check endif @@ -41,7 +37,7 @@ CLIBCXXOPTS = CLIBCOPT = CLIBFOPT = $(CLIBDEFS) -CXXSTF = -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 -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) @@ -51,7 +47,7 @@ CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF) CFLAGS = $(COPT) -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 @@ -66,7 +62,7 @@ CINTFLAGS = LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \ unset LD_PREBIND ; \ - g++ + $(shell root-config --ld) LDFLAGS = $(OPT) $(DICTLOAD) SHLD := $(LD) @@ -92,8 +88,9 @@ 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 +DYLIB += -L$(shell g95 --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)