+# -*- mode: makefile -*-
# Makefile for AliRoot for MacOS X with gcc
XARGS = xargs
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
CXXNOOPT = $(NOOPT)
COPT = $(OPT)
FOPT = $(OPT) -fno-second-underscore
-ifeq (g95,$(findstring g95,$(ROOTBUILD)))
+ifeq (,$(findstring g95,$(F77)))
FOPT += -fbounds-check
endif
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
+CXXWARN = -Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi
+
+CXXSTF = -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
# Compiler flags
CXXFLAGS = $(CXXOPT) $(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
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 =
#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)