1 # -*- mode: makefile -*-
2 # Makefile for AliRoot for MacOS X with gcc
7 MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
8 MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
11 FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
13 # No fink, build will probably fail, but we try a guess
24 FOPT = $(OPT) -fno-second-underscore
25 ifneq (,$(findstring g95,$(F77)))
26 FOPT += -fbounds-check
30 CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
33 CLIBFOPT = $(CLIBDEFS)
35 CXXWARN = -Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi
37 CXXSTF = -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
40 CXXFLAGS = $(CXXOPT) $(CXXSTF)
42 CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
44 CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
46 FFLAGS = $(CLIBFOPT) $(FOPT)
47 ifneq (,$(findstring g95,$(F77)))
48 FFLAGS += -ftrace=full
49 FFLAGS +=-DFORTRAN_G95
51 FFLAGS +=-DFORTRAN_GFORTRAN
54 # rmkdepend flags for building dependencies of FORTRAN files
55 DEPENDFFLAGS = $(FFLAGS)
60 LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
62 $(shell root-config --ld)
63 LDFLAGS = $(OPT) $(DICTLOAD)
66 SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module
75 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
77 SYSLIBS := -L/usr/X11R6/lib -lX11
79 EXEFLAGS := -bind_at_load
83 ifneq (,$(findstring g95,$(F77)))
84 SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
86 SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
87 SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)