# -*- mode: makefile -*- # Makefile for AliRoot for MacOS X with gcc XARGS = xargs # OS version MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1)) MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)) # fink directories FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??') ifeq (,$(FINK_ROOT)) # No fink, build will probably fail, but we try a guess FINK_ROOT=/usr/local endif # Global optimisation OPT = -O -g NOOPT = -O0 -g CXXOPT = $(OPT) CXXNOOPT = $(NOOPT) COPT = $(OPT) FOPT = $(OPT) -fno-second-underscore ifneq (,$(findstring g95,$(F77))) FOPT += -fbounds-check endif # CERNLIB defines 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 = -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) CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF) CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include FFLAGS = $(CLIBFOPT) $(FOPT) 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) # rootcint flags CINTFLAGS = LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \ unset LD_PREBIND ; \ $(shell root-config --ld) LDFLAGS = $(OPT) $(DICTLOAD) SHLD := $(LD) SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module SHLIB := SOEXT := so ALLD = ar ALFLAGS = cr ALLIB = AEXT = a DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys SYSLIBS := -L/usr/X11R6/lib -lX11 EXEFLAGS := -bind_at_load #System libraries ifneq (,$(findstring g95,$(F77))) SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 else SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib) SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a) endif