1 # Makefile for AliRoot for MacOS X with gcc
4 MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
5 MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
8 FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
14 ifneq ($(MACOSX_MINOR),4)
17 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
31 FOPT = $(OPT) -fno-second-underscore
35 CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
38 CLIBFOPT = $(CLIBDEFS)
41 CXXFLAGS = $(CXXOPT) -Wall -W -Wno-long-double -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include
42 ifneq ($(MACOSX_MINOR),4)
43 CXXFLAGS+=-fweak-coalesced
45 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
46 CXXFLAGS+=-DFORTRAN_G95
48 CXXFLAGSNO = $(CXXNOOPT) -Wall -W -pipe -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include -Wno-long-double
49 ifneq ($(MACOSX_MINOR),4)
50 CXXFLAGSNO+=-fweak-coalesced
52 CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
53 ifneq ($(MACOSX_MINOR),4)
54 CFLAGS+=-fweak-coalesced
56 FFLAGS = $(CLIBFOPT) $(FOPT)
57 # rmkdepend flags for building dependencies of FORTRAN files
58 DEPENDFFLAGS = $(FFLAGS)
63 LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
66 LDFLAGS = $(OPT) $(DICTLOAD)
69 SOFLAGS := -bundle -undefined dynamic_lookup
74 DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
83 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
85 GLIBS = -L/usr/X11R6/lib -lX11
87 EXEFLAGS += -bind_at_load
90 ifneq ($(MACOSX_MINOR),4)
93 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
94 SYSLIBS := -L$(dir $(shell find $(FINK_ROOT) -name libf95.a)) -lf95
96 SYSLIBS := -ldl -L$(dir $(shell find $(FINK_ROOT) -name libgfortran.dylib)) -lgfortranbegin -lgfortran