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 ifeq (,$(findstring g95,$(F77)))
26 FOPT += -fbounds-check
30 CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
33 CLIBFOPT = $(CLIBDEFS)
35 CXXSTF = -pipe -Wall -W -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
38 CXXFLAGS = $(CXXOPT) $(CXXSTF)
40 CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
42 CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
44 FFLAGS = $(CLIBFOPT) $(FOPT)
45 ifneq (,$(findstring g95,$(F77)))
46 FFLAGS += -ftrace=full
47 FFLAGS +=-DFORTRAN_G95
49 FFLAGS +=-DFORTRAN_GFORTRAN
52 # rmkdepend flags for building dependencies of FORTRAN files
53 DEPENDFFLAGS = $(FFLAGS)
58 LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
60 $(shell root-config --ld)
61 LDFLAGS = $(OPT) $(DICTLOAD)
64 SOFLAGS := -dynamiclib -undefined dynamic_lookup -single_module
73 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
75 SYSLIBS := -L/usr/X11R6/lib -lX11
77 EXEFLAGS := -bind_at_load
81 ifneq (,$(findstring g95,$(F77)))
82 SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
83 DYLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
85 SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
86 SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)