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??')
10 # No fink, build will probably fail, but we try a guess
18 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
31 FOPT = $(OPT) -fno-second-underscore
32 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
33 FOPT += -fbounds-check
37 CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
40 CLIBFOPT = $(CLIBDEFS)
43 CXXFLAGS = $(CXXOPT) -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -I$(FINK_ROOT)/include #-Weffc++ -Woverloaded-virtual
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
50 CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
52 FFLAGS = $(CLIBFOPT) $(FOPT)
53 # rmkdepend flags for building dependencies of FORTRAN files
54 DEPENDFFLAGS = $(FFLAGS)
59 LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
62 LDFLAGS = $(OPT) $(DICTLOAD)
65 SOFLAGS := -bundle -undefined dynamic_lookup
70 DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
79 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
81 SYSLIBS := -L/usr/X11R6/lib -lX11
83 EXEFLAGS := -bind_at_load
87 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
88 SYSLIBS += -L$(dir $(shell find $(FINK_ROOT) -name libf95.a)) -lf95
90 SYSLIBS += -ldl -L$(dir $(shell find $(FINK_ROOT) -name libgfortran.dylib)) -lgfortranbegin -lgfortran