1 # Makefile for AliRoot for MacOS X with gcc
6 MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
7 MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
10 FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
12 # No fink, build will probably fail, but we try a guess
20 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
33 FOPT = $(OPT) -fno-second-underscore
34 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
35 FOPT += -fbounds-check
39 CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
42 CLIBFOPT = $(CLIBDEFS)
44 CXXSTF = -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
47 CXXFLAGS = $(CXXOPT) $(CXXSTF) -Weffc++
49 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
50 CXXFLAGS+=-DFORTRAN_G95
52 CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
54 CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
56 FFLAGS = $(CLIBFOPT) $(FOPT) -ftrace=full
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 SYSLIBS := -L/usr/X11R6/lib -lX11
87 EXEFLAGS := -bind_at_load
91 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
92 SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
94 SYSLIBS += -ldl -L$(shell gfortran --print-search-dirs | sed -n -e 's/install: //p') -lgfortranbegin -lgfortran