X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=build%2FMakefile.macosx;h=4652c8d919d5a8820c8a9e0a9f882ca4ebed78e6;hb=59f6cc12123bba6112302b7323d0e91d6cf996e1;hp=e36d3e9432548efb34da4573da9c66969c305fd4;hpb=8ac4fa648389f393be78916ff78d398e7d989b8e;p=u%2Fmrichter%2FAliRoot.git diff --git a/build/Makefile.macosx b/build/Makefile.macosx index e36d3e94325..4652c8d919d 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 (,$(findstring 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 -Wshadow -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++ -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))) +ifneq (,$(findstring 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,9 +88,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 -DYLIB += -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 $(shell $(F77) -print-file-name=libgfortran.dylib) SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)