# -*- mode: makefile -*- # $Id$ # MacOSX platform dependent definitions # 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)) # Architecture: PPC or x86 ARCH_PPCI386 := $(shell arch) # fink directories FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??') # The compilers CXX = $(shell root-config --cxx) CC = $(shell root-config --cc) F77 = $(shell root-config --f77) # Global optimisation OPT = -g #-O # Shared library suffix SL = dylib # AWK AWK = awk # The options # # CXXOPTS = $(OPT) -m32 -pipe -Wall -W -Woverloaded-virtual COPT = $(OPT) -m32 FOPT = $(OPT) -m32 -fno-second-underscore # CERNLIB defines CLIBDEFS_TMP = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ ifeq (i386,$(findstring i386,$(ARCH_PPCI386))) CLIBDEFS = $(CLIBDEFS_TMP) else CLIBDEFS = $(CLIBDEFS_TMP) -DCERNLIB_PPC endif ifneq (,$(findstring g95,$(F77))) CLIBDEFS += -DCERNLIB_G95 else CLIBDEFS += -DCERNLIB_GFORTRAN endif CLIBCXXOPTS = $(CLIBDEFS) CLIBCOPT = $(CLIBDEFS) CLIBFOPT = $(CLIBDEFS) LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \ unset LD_PREBIND ; \ $(shell root-config --ld) LDFLAGS = $(OPT) -m32 -bind_at_load SHLD = $(LD) SOFLAGS = -m32 -dynamiclib -undefined dynamic_lookup -single_module ifneq (,$(findstring g95,$(F77))) SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 else SHLIB := $(shell $(F77) -m32 -print-file-name=libgfortran.dylib) SHLIB += $(shell $(F77) -m32 -print-file-name=libgfortranbegin.a) SHLIB += -ldl endif