+# -*- mode: makefile -*-
# Makefile for AliRoot for MacOS X with gcc
XARGS = xargs
# 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
CXXNOOPT = $(NOOPT)
COPT = $(OPT)
FOPT = $(OPT) -fno-second-underscore -m64
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+ifeq (g95,$(F77))
FOPT += -fbounds-check
endif
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
#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)